Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 18,501 through 18,525 (of 32,581 total)
  • Author
    Search Results
  • #38539
    seifip
    Member

    What’s the new URL of the separate page for adding a new topic? The one that was located at ?new=1 in the standalone bbPress, and the one I’m using right now to write this question after clicking “start new” :)

    #38428
    Mark Barnes
    Member

    I’ve been playing with bbPress v2 for a little while now, primarily to see how easy it would be to write an importer from Simple Press. I’m sure that bbPress is going to need importers if the adoption rate is to be significant. Here are some initial thoughts:

    (1) It’s easier than I thought – largely because of the v1 import file.

    (2) We need a bbPress equivalent of wp_insert_pages, so we can call a single function, instead of creating pages, then adding lots of metadata – it’s not always clear what metadata is required, either.

    (3) In addition, it would be even better to ship with a generic import file that plugins could either modify, or plug into.

    For what it’s worth, here’s my very basic Simple Press importer. There’s no UI, error-checking is poor, and it doesn’t migrate stickies or notifications yet. You also have to update the counts from the Tools menu afterwards. And sometimes it dies through a timeout or OOM, but if it does, it should pick up where it left off. It’s a proof of concept, not a finished product, and is intended to encourage other developers, rather than for end-users. But it does work – at least for me. I may or may not develop it further, so if anyone else wants to, feel free!

    <?php
    /*
    Plugin Name: Simple Press to bbPress
    Plugin URI: http://www.4-14.org.uk/
    Description: Import Simple Press forums to bbPress
    Author: Mark Barnes
    Version: 0.1
    Author URI: http://www.4-14.org.uk/
    */

    if (isset($_GET['bbpressimport']))
    add_action ('init', 'mbbb_init');

    function mbbb_init () {
    global $wpdb;
    define('WP_IMPORTING', true);
    //Delete existing posts
    if (isset($_GET['delete'])) {
    $post_ids = $wpdb->get_results("SELECT ID from {$wpdb->posts} WHERE post_type IN ('forum', 'reply', 'topic')");
    if ($post_ids)
    foreach ($post_ids as $post_id)
    wp_delete_post ($post_id->ID, true);
    }
    // Import forums
    $forum_map = array();
    $sp_forums = $wpdb->get_results("SELECT forum_desc, forum_name, forum_slug, forum_seq, forum_id FROM {$wpdb->prefix}sfforums ORDER BY forum_seq");
    if ($sp_forums) {
    foreach ($sp_forums as $sp_forum) {
    $post_id = $wpdb->get_var ("SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_value='forum_{$sp_forum->forum_id}' AND meta_key='_mbbb_sp_id'");
    if (!$post_id) {
    $inserted_forum = wp_insert_post( array(
    'post_author' => get_current_user_id(),
    'post_content' => $sp_forum->forum_desc,
    'post_title' => $sp_forum->forum_name,
    'post_excerpt' => '',
    'post_status' => 'publish',
    'comment_status' => 'closed',
    'ping_status' => 'closed',
    'post_name' => $sp_forum->forum_slug,
    'post_parent' => 0,
    'post_type' => bbp_get_forum_post_type(),
    'menu_order' => $sp_forum->forum_seq
    ) );
    if ($inserted_forum) {
    echo "Added {$sp_forum->forum_name}<br/>n";
    update_post_meta( $inserted_forum, '_mbbb_sp_id', "forum_{$sp_forum->forum_id}" );
    } else
    echo "Failed to add {$sp_forum->forum_name}<br/>n";
    } else
    $inserted_forum = $post_id;
    $forum_map[$sp_forum->forum_id] = $inserted_forum;
    }
    }
    // Import topics
    $topic_count = 0;
    $sp_topics = $wpdb->get_results ("SELECT forum_id, user_id, topic_name, topic_slug, topic_date, topic_id FROM {$wpdb->prefix}sftopics ORDER BY topic_date ASC");
    if ($sp_topics) {
    foreach ($sp_topics as $sp_topic) {
    $post_id = $wpdb->get_var ("SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_value='topic_{$sp_topic->topic_id}' AND meta_key='_mbbb_sp_id'");
    $sp_posts = $wpdb->get_results ("SELECT topic_id, user_id, post_date, post_content, poster_ip, post_id from {$wpdb->prefix}sfposts WHERE topic_id = '{$sp_topic->topic_id}' ORDER BY post_date ASC");
    if (isset($forum_map[$sp_topic->forum_id]) && $sp_posts) {
    if (!$post_id) {
    $inserted_topic = wp_insert_post( array(
    'post_parent' => $forum_map[$sp_topic->forum_id],
    'post_author' => $sp_posts[0]->user_id,
    'post_content' => $sp_posts[0]->post_content,
    'post_title' => $sp_topic->topic_name,
    'post_name' => $sp_topic->topic_slug,
    'post_status' => 'publish',
    'post_date_gmt' => $sp_topic->topic_date,
    'post_date' => get_date_from_gmt( $sp_topic->topic_date ),
    'post_type' => bbp_get_topic_post_type(),
    ) );
    if ($inserted_topic) {
    echo "Added {$sp_topic->topic_name}<br/>n";
    update_post_meta( $inserted_topic, '_bbp_forum_id', $forum_map[$sp_topic->forum_id] );
    update_post_meta( $inserted_topic, '_bbp_topic_id', $inserted_topic );
    update_post_meta( $inserted_topic, '_mbbb_sp_id', "topic_{$sp_topic->topic_id}" );
    } else
    echo "Failed to add {$sp_forum->topic_name}<br/>n";
    } else
    $inserted_topic = $post_id;
    }
    //Import posts
    $post_count = 0;
    if ($sp_posts) {
    foreach ($sp_posts as $sp_post) {
    $post_id = $wpdb->get_var ("SELECT post_id FROM {$wpdb->prefix}postmeta WHERE meta_value='post_{$sp_post->post_id}' AND meta_key='_mbbb_sp_id'");
    if (!$post_id) {
    if ($post_count != 0) {
    $inserted_post = wp_insert_post( array(
    'post_parent' => $inserted_topic,
    'post_author' => $sp_post->user_id,
    'post_date_gmt' => $sp_post->post_date,
    'post_date' => get_date_from_gmt( $sp_post->post_date ),
    'post_title' => 'Reply To: '.$sp_topic->topic_name,
    'post_status' => 'publish',
    'post_type' => bbp_get_reply_post_type(),
    'post_content' => $sp_post->post_content
    ) );
    if ($inserted_post) {
    update_post_meta( $inserted_post, '_bbp_author_ip', $sp_post->poster_ip );
    update_post_meta( $inserted_post, '_bbp_forum_id', $forum_map[$sp_topic->forum_id] );
    update_post_meta( $inserted_post, '_bbp_topic_id', $inserted_topic );
    update_post_meta( $inserted_post, '_mbbb_sp_id', "post_{$sp_post->post_id}" );
    bbp_update_reply_walker( $inserted_post );
    }
    }
    else
    update_post_meta( $inserted_topic, '_bbp_author_ip', $sp_post->poster_ip );
    } else
    $inserted_post = $post_id;
    $post_count ++;
    }
    }
    update_post_meta( $inserted_topic, '_bbp_last_reply_id', $inserted_post );
    update_post_meta( $inserted_topic, '_bbp_last_active_id', $inserted_post ? $inserted_post : $inserted_topic );
    update_post_meta( $inserted_topic, '_bbp_last_active_time', $inserted_post ? $sp_post->post_date : $sp_topic->topic_date );
    update_post_meta( $inserted_topic, '_bbp_reply_count', $post_count -1 );
    update_post_meta( $inserted_topic, '_bbp_hidden_reply_count', 0 );
    bbp_update_topic_walker( $inserted_topic );
    $topic_count ++;
    }
    }
    global $wp_rewrite;
    $wp_rewrite->flush_rules(false);
    }

    #105881

    Thanks for moving this here. :)

    Check the /bbp-includes/bbp-general-template.php file; there are a ton of _is_ functions.

    #100781

    Thanks for moving this here. :)

    Check the /bbp-includes/bbp-general-template.php file; there are a ton of _is_ functions.

    #95409

    @MelloMoose – Can you please start your own support topic and not post personal help requests in this one? Thanks. Once you do I’ll delete your posts here. :)

    @LPH2005 – Since the stable tag isn’t numeric yet, it’s likely that it won’t trigger the update notice until it goes gold. I’ll look into it though.

    #105863
    DigitalGdn
    Participant

    Thanks guys, I’ll start my adventure and have a look at the code.

    #100763
    DigitalGdn
    Participant

    Thanks guys, I’ll start my adventure and have a look at the code.

    #105850

    In reply to: Translating to spanish

    Thanks guys :)

    @VanDuch – Private and Hidden forums perform extra capability checks, and hide the contents of those forums from profile pages, widgets, and anyplace forum content is available. This was a bit complicated to pull off, so if you find any bugs I’m happy to investigate and fix.

    #100750

    In reply to: Translating to spanish

    Thanks guys :)

    @VanDuch – Private and Hidden forums perform extra capability checks, and hide the contents of those forums from profile pages, widgets, and anyplace forum content is available. This was a bit complicated to pull off, so if you find any bugs I’m happy to investigate and fix.

    #105862

    Yes, you’ll want to make them as WordPress plugins that specifically hook into bbPress actions and filters.

    There are tons of places where things can be overridden, and it shouldn’t take long to learn the hierarchy. Everything inside the php files is documented pretty well, and eventually that will get moved over to this site with a codex.

    #100762

    Yes, you’ll want to make them as WordPress plugins that specifically hook into bbPress actions and filters.

    There are tons of places where things can be overridden, and it shouldn’t take long to learn the hierarchy. Everything inside the php files is documented pretty well, and eventually that will get moved over to this site with a codex.

    #105861
    Mark Barnes
    Member

    This is slightly guesswork, but based on my understanding of the code.

    (1) You should write your bbPress plugin as if it’s a WordPress plugin.

    (2) Searching the bbPress folder for do_action will give you all the bbPress hooks, and searching for apply_filters will give you the list of filters (there are a LOT of them). Learning the important functions is trickier – they seem fairly spread out around the code amongst the less important functions. For that, I guess we’ll need to wait for documentation.

    #100761
    Mark Barnes
    Member

    This is slightly guesswork, but based on my understanding of the code.

    (1) You should write your bbPress plugin as if it’s a WordPress plugin.

    (2) Searching the bbPress folder for do_action will give you all the bbPress hooks, and searching for apply_filters will give you the list of filters (there are a LOT of them). Learning the important functions is trickier – they seem fairly spread out around the code amongst the less important functions. For that, I guess we’ll need to wait for documentation.

    #95404
     
    Member

    Hello,

    Not entirely sure if this would be the best topic to post this, but running WordPress in debug mode, I’m getting quite a few non-object notices.

    Notice: Trying to get property of non-object in /home/design24/public_html/klanten/20/wp-includes/general-template.php on line 1477
    Notice: Trying to get property of non-object in /home/design24/public_html/klanten/20/wp-includes/author-template.php on line 208
    Notice: Trying to get property of non-object in /home/design24/public_html/klanten/20/wp-includes/category-template.php on line 1081

    Also, when editing this post with some proper code markup there seems to be 2 Notify me of follow-up posts via email boxes available.

    #95402

    Yes it is possible. The shortcodes you want are most likely…

    [bbp-forum-index]

    [bbp-topic-index]

    When bbPress 2.0 officially launches, there will be an interface for these hidden shortcodes.

    #95401
    Tokyorock
    Member

    Hi.. not really….

    m theme work perfect…but if i click on the forum i get a blank site…nothing more.

    hm..should i make some changes in my theme? i dont use the twenty theme..

    It is possible to create a page and put a bbcode to insert the forum?

    #95398
    Arjun S Kumar
    Participant

    Congo JJJ and Gauti. ;-)

    #100621
    Gautam Gupta
    Participant

    You should install the development (trunk) version of bbPress standalone. That has this thing fixed. :)

    #105721
    Gautam Gupta
    Participant

    You should install the development (trunk) version of bbPress standalone. That has this thing fixed. :)

    #38534
    Gautam Gupta
    Participant

    Hey!

    I and Ben L. recently released a bbPress standalone to plugin converter (bbS2P) to help you out with importing. But now, that has been deprecated as most of the code that was in there has been ported into the bbPress plugin itself.

    Got some hint? (I think) You’re right! You can now convert your bbPress standalone install into the bbPress plugin from right inside the bbPress plugin itself! Just have the bbPress plugin activated, go to Tools -> Import -> bbPress Standalone and follow on-screen instructions.

    Note: It is highly recommended that you have a backup of your whole database before doing this.

    Thanks!

    – G

    #38533

    Where can I download it?

    1. Your WordPress admin area

    2. http://wordpress.org/extend/plugins/bbpress/

    Where do I report bugs?

    1. http://bbpress.org/forums/ (use the tag ‘bbpress-plugin’)

    2. http://bbpress.trac.wordpress.org

    Where can I report a security vulnerability?

    1. http://wordpress.org/about/contact/

    2. jjj in #bbpress on freenode on IRC

    Where do support questions go?

    Use these forums the same as always, and use the tag ‘bbpress-plugin’

    Does this integrate with BuddyPress?

    bbPress 2.0 integrates with BuddyPress activity streams, profile links, and avatars. bbPress 2.0 does not yet integrate with Groups, but it also will not conflict with them. This means there are no code conflicts or errors by leaving both activated.

    Forums and topics are not showing up in my theme!

    Try resaving your permalinks.

    Is there an importer from a 1.0 installation?

    A first attempt is included, and it needs testing. That’s where you come in! :)

    Where can I contribute translations

    http://translate.wordpress.org/projects/bbpress/plugin/

    Where is the documentation?

    In the code itself right now. There’s not a lot of sense in creating documentation for pre-release software, as anything is subject to change. There will be a bbPress codex coming soon after release, so sit tight.

    Why can my admin post videos, and normal users can’t?

    Admin accounts in WordPress are granted a specific capability that enables them to post any kind of content they choose. Normal users do not have this ability, and are restricted to a specific set of HTML tags.

    What is happening to bbPress 1.x?

    It will continue to be maintained into the foreseeable future but is feature frozen, meaning no new features will get put in.

    Can the bbPress Plugin 2.0 Beta be installed without WordPress?

    No. bbPress 2.0 is strictly a plugin for WordPress.

    How can I set which users can do what things?

    You’ll want to use existing WordPress plugins if you want to customize the capabilities of your users. Start with Members or User Role Editor but be careful! It’s possible to lock yourself out of your site if you remove your own capabilities, so don’t fuss about if you’re not sure what you’re doing. :)

    #95396
    tooltrainer
    Member

    P.S.

    We really do need a solution that allows members to post code in a “safe” way. I’ve already got members wanting to post helpful code snippets for each other, and they can’t.

    Is something like this in the plan? Or should I develop a custom plugin that makes it possible?

    Thanks,

    Jonathan

    #95395
    Tokyorock
    Member

    Awesome =3 i wai for the plugin…thats the reason why i wait to release my new project xD

    #38526
    SebbyH
    Member

    Hi All,

    I’ve recently added some forums to my site and although they look good I’m unable to resize the forum listing and as such the forum listing collides with the side bar and looks awful :(

    the forums are here: http://barnstormers.org.uk/forums/

    I have a ‘Forums’ page set up using the bbpress forum index page template.

    Can anyone let me know how to resolve this as the site will be going officially live in a few days.

    Cheers,

    Seb

    #105707
    Gautam Gupta
    Participant

    alsur: Only a few tickets are left for the alpha to be out. :)

Viewing 25 results - 18,501 through 18,525 (of 32,581 total)
Skip to toolbar