Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 16,176 through 16,200 (of 32,506 total)
  • Author
    Search Results
  • #100471
    jotaace
    Participant

    Hi AlexKramer,

    Sorry but i can’t find the way to use the plugin. Would you mind to post a little instructions on its usage? I only know how to paste the code in a txt file, renaming as php, zipping and installing as a plugin.

    And where to paste the code lines of your previous post in the plugin, please?

    I’ll be very grateful if I really can import my forum.

    Thanks in advance.

    #105571
    jotaace
    Participant

    Hi AlexKramer,

    Sorry but i can’t find the way to use the plugin. Would you mind to post a little instructions on its usage? I only know how to paste the code in a txt file, renaming as php, zipping and installing as a plugin.

    And where to paste the code lines of your previous post in the plugin, please?

    I’ll be very grateful if I really can import my forum.

    Thanks in advance.

    #55256
    qmic76
    Member

    I want to hide page links in my main header navigation from non registered members, then have them show up after the user has logged in.

    I’m currently using custom menu manager and wp-members for plugins. The custom menu manager allows me to set which page links show up in the assigned navigation menu (ie: only “about” and “register” are shown on home page the other page links are hidden), but it doesn’t recognize whether the user is logged in or not and the hidden page links are not shown after you’ve logged in still. With wp-members plugin I have the “members” and “project” pages set to block access unless logged in, but this only effects the page access, the nav link for those pages were still showing up in the main navigation until I used the menu manager plugin which hid them totally not conditionally based on log in status which is what I want.

    Is there a php block of code to use or plugin you guys recommend that handles nav link access/visibilty based on log in status? I’m at total loss. Please help me. Visit my site mks76.com/wp/

    #113564
    LIB53
    Member

    I’m making a post count plugin for bbpress 2.1, but the problem is that I’m new to PHP/MySQL, WordPress, and bbPress. From what I understand, I need to add a row called ‘post count’ to the usermeta table and hook the ‘bbp_theme_after_reply_form_submit_button’ action hook with a function that increases ‘post count’ by 1. I believe I must assign this newly hooked action a low priority as well so that the increase only comes after the post gets submitted into the database.

    I should also add a function that builds all post counts for first time run, and even leave a button possibly called “rebuild post count” in the dashboard to run the function. Preferably, I’d like to add a feature where it can run itself every now and then to ensure things the posts are accurate.

    I can count up everyone’s post count by filtering through the ‘posts’ table. All replies and topics are labeled as ‘reply’ and ‘topic’ in the post_type column, and there is a post_author column as well. Given these two columns, writing this function should be very simple. But I’m new to PHP/MySQL, and only a computer science student… So even this is a bit of work for me :(

    Additionally, I can add another row so we can add artificial post count increase or decrease as well. Another row is needed because we don’t want the build/rebuild post count function mentioned above overwriting any increase or decrease an admin wants to have in effect. I personally need this row because I’m moving a 2yr old community off of IPB.

    #44809

    Topic: GD bbPress Tools

    in forum Plugins
    Milan Petrovic
    Participant

    GD bbPress Tools is a new free plugin for bbPress 2.0/2.1 for WordPress. Currently adds these new features:

    * BBCode shortcodes support

    * Quote Reply or Topic

    * User signature with BBCode and HTML support

    * Additional custom views

    * Basic topics search results view

    * Toolbar menu integration

    * Limit bbPress admin side access

    Plugin supports BBCodes based on the phpBB implementation. Right now, plugin has 30 BBCodes. Latest plugin version is 1.2:

    http://www.dev4press.com/2012/blog/plugins-news/gd-bbpress-tools-1-2-0/

    #58800

    In reply to: How to disable rss ?

    xmasons
    Participant

    I’ve found the following works well in functions.php

    function disable_our_feeds() {

    wp_redirect(get_option('siteurl'));

    }

    add_action('bbp_feed', 'disable_our_feeds', 1);

    #44764
    scheena
    Member

    Hello, good day to you.

    I would like to ask for help please,

    Check out this link

    http://crankyoldmen.com/topic/profession-builder-links/

    There is that link between an author and his post, is there a css code i could add to my code so it can show up?

    #113551
    SilverNL
    Member

    I have exact the same problem and question!

    #113550
    Nate
    Participant

    anyone on this?

    #44731

    I think I broke my forum.

    I am using the plugin version of bbPress on WordPress, and recently deactivated all of my plugins trying to troubleshoot a theme error. I reactivated them, and when I go to Forums in the dashboard, “All Forums”, my forum is still there, but when I click on “View” it says:

    Permission Denied

    Not Found / No Access

    The page you are looking for either does not exist, or you do not have the permissions to access it.

    Going to http://mysite.com/forums takes me back to the main page.

    Any suggestions? :(

    #110585

    How can i disable HTML and/or VISUAL editor? (2.1 plugin version)

    Have you tried Settings > Forum? :)

    Unless you’re talking about conditionally toggling the mode, in which case you’re on your own to build that as a plugin, similar to WordPress.

    #113561

    In reply to: 2.0.2 –> 2.1

    Hey thanks! :) Good to hear it’s working out!

    #100470
    Oleksandr Kramer
    Participant

    Solved!

    $wpdb->query("UPDATE wp_posts SET post_author = '0' WHERE ID =".$inserted_topic.";");

    #105570
    Oleksandr Kramer
    Participant

    Solved!

    $wpdb->query("UPDATE wp_posts SET post_author = '0' WHERE ID =".$inserted_topic.";");

    #100469
    Oleksandr Kramer
    Participant

    Please tell me what to write here

    Now the author of topic is always admin.

    //Topic Author - Guest (What code here?)

    if(!($sp_topic->user_id))

    {

    echo("  Guest start topic: {$sp_posts[0]->guest_name}n");

    // update_post_meta( $inserted_topic, '_bbp_anonymous_name', "{$sp_posts[0]->guest_name}" );

    // update_post_meta( $inserted_topic, '_bbp_anonymous_email', "{$sp_posts[0]->guest_email}" );

    // ??????

    }

    I am a newbie in php – use at your own risk!!!

    <?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/

    using: http://site.com?bbpressimport=1&delete=1

    */

    if (isset($_GET))

    add_action (‘init’, ‘mbbb_init’);

    function mbbb_init () {

    global $wpdb;

    define(‘WP_IMPORTING’, true);

    //Delete existing posts

    if (isset($_GET)) {

    $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}n”;

    update_post_meta( $inserted_forum, ‘_mbbb_sp_id’, “forum_{$sp_forum->forum_id}” );

    } else

    echo “Failed to add {$sp_forum->forum_name}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, guest_name, guest_email, 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) {

    if(! empty($sp_posts[0]->guest_name))

    {

    echo(“Topic: {$sp_topic->topic_name}n”);

    echo(“Guest name: {$sp_posts[0]->guest_name}n”);

    $inserted_topic = wp_insert_post( array(

    ‘post_parent’ => $forum_map[$sp_topic->forum_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) {

    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}” );

    update_post_meta( $inserted_topic, ‘_bbp_anonymous_name’, “{$sp_posts[0]->guest_name}” );

    update_post_meta( $inserted_topic, ‘_bbp_anonymous_email’, “{$sp_posts[0]->guest_email}” );

    } else

    echo “Failed to add {$sp_forum->topic_name}n”;

    }

    else

    {

    if(!($sp_posts[0]->user_id))

    echo(“Guest TOPICStart: {$sp_posts[0]->guest_name}n”);

    $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}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}n”;

    }

    }

    else{

    echo “ADD”;

    $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) {

    if(! empty($sp_post->guest_name))

    {

    echo(”    Reply To: {$sp_topic->topic_name}n”);

    echo(”    Guest name: {$sp_post->guest_name}n”);

    $inserted_post = wp_insert_post( array(

    ‘post_parent’ => $inserted_topic,

    ‘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}” );

    update_post_meta( $inserted_post, ‘_bbp_anonymous_name’, “{$sp_post->guest_name}” );

    update_post_meta( $inserted_post, ‘_bbp_anonymous_email’, “{$sp_post->guest_email}” );

    bbp_update_reply_walker( $inserted_post );

    }

    }

    else

    {

    $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;

    // echo(“Guest start topic:n”);

    }

    $post_count ++;

    }

    }

    // echo(“Guest start topic:{$sp_topic->user_id}n”);

    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 );

    //Topic Author – Guest (What code here?)

    if(!($sp_topic->user_id))

    {

    echo(”  Guest start topic: {$sp_posts[0]->guest_name}n”);

    // update_post_meta( $inserted_topic, ‘_bbp_anonymous_name’, “{$sp_posts[0]->guest_name}” );

    // update_post_meta( $inserted_topic, ‘_bbp_anonymous_email’, “{$sp_posts[0]->guest_email}” );

    // ??????

    }

    bbp_update_topic_walker( $inserted_topic );

    $topic_count ++;

    }

    }

    global $wp_rewrite;

    $wp_rewrite->flush_rules(false);

    }

    #105569
    Oleksandr Kramer
    Participant

    Please tell me what to write here

    Now the author of topic is always admin.

    //Topic Author - Guest (What code here?)

    if(!($sp_topic->user_id))

    {

    echo("  Guest start topic: {$sp_posts[0]->guest_name}n");

    // update_post_meta( $inserted_topic, '_bbp_anonymous_name', "{$sp_posts[0]->guest_name}" );

    // update_post_meta( $inserted_topic, '_bbp_anonymous_email', "{$sp_posts[0]->guest_email}" );

    // ??????

    }

    I am a newbie in php – use at your own risk!!!

    <?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/

    using: http://site.com?bbpressimport=1&delete=1

    */

    if (isset($_GET))

    add_action (‘init’, ‘mbbb_init’);

    function mbbb_init () {

    global $wpdb;

    define(‘WP_IMPORTING’, true);

    //Delete existing posts

    if (isset($_GET)) {

    $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}n”;

    update_post_meta( $inserted_forum, ‘_mbbb_sp_id’, “forum_{$sp_forum->forum_id}” );

    } else

    echo “Failed to add {$sp_forum->forum_name}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, guest_name, guest_email, 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) {

    if(! empty($sp_posts[0]->guest_name))

    {

    echo(“Topic: {$sp_topic->topic_name}n”);

    echo(“Guest name: {$sp_posts[0]->guest_name}n”);

    $inserted_topic = wp_insert_post( array(

    ‘post_parent’ => $forum_map[$sp_topic->forum_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) {

    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}” );

    update_post_meta( $inserted_topic, ‘_bbp_anonymous_name’, “{$sp_posts[0]->guest_name}” );

    update_post_meta( $inserted_topic, ‘_bbp_anonymous_email’, “{$sp_posts[0]->guest_email}” );

    } else

    echo “Failed to add {$sp_forum->topic_name}n”;

    }

    else

    {

    if(!($sp_posts[0]->user_id))

    echo(“Guest TOPICStart: {$sp_posts[0]->guest_name}n”);

    $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}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}n”;

    }

    }

    else{

    echo “ADD”;

    $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) {

    if(! empty($sp_post->guest_name))

    {

    echo(”    Reply To: {$sp_topic->topic_name}n”);

    echo(”    Guest name: {$sp_post->guest_name}n”);

    $inserted_post = wp_insert_post( array(

    ‘post_parent’ => $inserted_topic,

    ‘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}” );

    update_post_meta( $inserted_post, ‘_bbp_anonymous_name’, “{$sp_post->guest_name}” );

    update_post_meta( $inserted_post, ‘_bbp_anonymous_email’, “{$sp_post->guest_email}” );

    bbp_update_reply_walker( $inserted_post );

    }

    }

    else

    {

    $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;

    // echo(“Guest start topic:n”);

    }

    $post_count ++;

    }

    }

    // echo(“Guest start topic:{$sp_topic->user_id}n”);

    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 );

    //Topic Author – Guest (What code here?)

    if(!($sp_topic->user_id))

    {

    echo(”  Guest start topic: {$sp_posts[0]->guest_name}n”);

    // update_post_meta( $inserted_topic, ‘_bbp_anonymous_name’, “{$sp_posts[0]->guest_name}” );

    // update_post_meta( $inserted_topic, ‘_bbp_anonymous_email’, “{$sp_posts[0]->guest_email}” );

    // ??????

    }

    bbp_update_topic_walker( $inserted_topic );

    $topic_count ++;

    }

    }

    global $wp_rewrite;

    $wp_rewrite->flush_rules(false);

    }

    #44709
    russwittmann
    Member

    What are you using for the code allowed option on the text field here on these forums? Id like to use on my forums as well?

    #100468
    Gautam Gupta
    Participant

    It looks like this importer doesn’t support anonymous replies. You’d have to add the appropriate conditions yourself and re-import. :)

    #105568
    Gautam Gupta
    Participant

    It looks like this importer doesn’t support anonymous replies. You’d have to add the appropriate conditions yourself and re-import. :)

    Do you remember to change the forum slug in Setting > Forums in your dashboard? By default, both of them are using the page slug “forums” so there’re conflict between Group Forum & Sitewide Forum.

    Read here for more info:

    https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/

    For installing group & sitewide forums:

    https://codex.buddypress.org/getting-started/installing-group-and-sitewide-forums/3/

    #113583
    JenniferNM
    Member

    Is there some sort of code we could put into one or more of the bbpress php files to exclude it?

    #44690

    pagination for all topic listing in archive forum page is not working.

    http://mydemozone.com/vividmagazine/web/?post_type=forum

    but it is working well for topics in particular forum but in the archive-forum.php page where all topics are listing,pagination not working.

    I need a help to implement pagination in the archive forum page where all topics are listed by short code and php code . but pagination not working.

    #112047

    pagination is not working for topic list in archive forum page. but it is working in particular forum page.

    link is here

    http://mydemozone.com/vividmagazine/web/?post_type=forum

    when I click on 2 then it shows page not found.

    how will I set pagination for topic list in archive-forum.php page.

    #44679
    javiarques
    Member

    Hi, I’m trying to activate post-thumbnail in forum post type, but it still fails. I tried with this code:

    function forum_post_thumbnails () {
    add_theme_support( 'post-thumbnails', array( 'forum', 'topic', 'reply', 'post', 'page' ) ); // Posts and Movies
    }
    add_action('after_setup_theme', 'forum_post_thumbnails');

    But it didn’t work. Any ideas on how activate it?

    Thanks

    #112081
    dannyjimmy
    Participant
Viewing 25 results - 16,176 through 16,200 (of 32,506 total)
Skip to toolbar