Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 13,776 through 13,800 (of 32,503 total)
  • Author
    Search Results
  • #137081
    inspirationally
    Participant

    Allright, another thing I need help with:

    In WBB, there's the field isClosed to create a WordPress status from it with this:
    // Topic status (Open or Closed)
    		$this->field_map[] = array(
    			'from_tablename'  => 'wbb1_1_thread',
    			'from_fieldname'  => 'isClosed',
    			'to_type'         => 'topic',
    			'to_fieldname'    => 'post_status',
    			'callback_method' => 'callback_topic_status'
    		);

    and

    public function callback_topic_status( $status = 0 ) {
    		switch ( $status ) {
    			case 1 :
    				$status = 'closed';
    				break;
    
    			case 0  :
    			default :
    				$status = 'publish';
    				break;
    		}
    		return $status;
    	}

    But there’s also a field called “isDeleted”, so I could also use

    `// Topic status (Deleted)
    $this->field_map[] = array(
    ‘from_tablename’ => ‘wbb1_1_thread’,
    ‘from_fieldname’ => ‘isDeleted’,
    ‘to_type’ => ‘topic’,
    ‘to_fieldname’ => ‘post_status’,
    ‘callback_method’ => ‘callback_trash_status’
    );`

    and

    public function callback_trash_status( $status = 1 ) {
    		switch ( $status ) {
    			case 1 :
    				$status = 'trash';
    				break;
    
    			case 0  :
    			default :
    				$status = 'publish';
    				break;
    		}
    		return $status;
    	}

    The second, though, would overwrite the first, so that even closed topics that are not trash have the status publish again. Is there any chance to combine these two?

    #137071
    jnarain
    Participant

    Hi,

    I realize that the old workarounds (Code, Plugins etc.) for enabling the TinyMCE Full editor does not work anymore.

    The newly added Post Formatting/ Add toolbar & buttons to textareas to help with HTML formatting option, does not enable the editor with full range of buttons and capabilities.

    Any solution to bring the editor in full?

    Regards,

    Jinobi

    #137067
    Stephen Edgar
    Keymaster

    3. some users are twice now (like myself..who have been admins of wordpress and users of the forum). Can I simply merge them with
    UPDATE wp_posts SET post_author = ’1′ WHERE post_author = ’2′; and it will count for the forum, too?

    If a user already exists in WordPress during the import a new user will be created called ‘Imported_Username’, you can go to wp-admins user panel and when you select ‘Delete User’ you will be prompted to delete all posts or attribute them to another user, select the later and all the topics/replies etc will be attributed to the user you selected.

    4. the passwords – in WBB they are hashed by this:
    $passwort = sha1($row->salt.sha1($row->salt.sha1($_POST[‘passwort’])));
    so what do I write at the end of wbb3.php
    public function authenticate_pass( $password, $serialized_pass ) {
    $pass_array = unserialize( $serialized_pass );
    return ( $pass_array[‘hash’] == md5( md5( $password ). $pass_array[‘salt’] ) );
    }
    or is this impossible and the users have to get the new password by mail?

    I am going to look at passwords next week for all the importers as my skills with PHP are only just beginning so this is all a bit tricky for me at the moment. 😉

    So the best workaround is to have the users reset their password by email for now.

    5. the imported users have no “Forum Role”. Is is “normal”? Is there any chance to automatically give them the forum role “Participant”?

    Go to bbPress tools and run the repair tool ‘Remap existing users to default forum roles’ and that will do the trick. https://codex.bbpress.org/repair-forums/

    6. do I have to keep the wbb3.php “forever” because of the passwords or can I delete it one day, even if not all members have com back yet?

    If the passwords are not being converted you do not need to keep it, though I don’t see any issues why you would need to delete it.

    Speaking of keeping it, can we include your WBB v3 Importer and distribute it with bbPress?

    7. until now we have everything like private messages, profiles, friends and especially user groups (Moderators, crew members) with hidden forums. Do I see correct, that I can install both, import bbpress and afterwards attach for example our “Mods Only” to the group “Moderators” as group forum?

    Currently bbPress only has: https://codex.bbpress.org/getting-started-with-bbpress/#creating-your-first-forum

    Visibility: decide whether your forum is public, private or hidden.
    Public – Anyone can see these forums
    Private – Only logged in registered users can see these forums
    Hidden: Only Moderators/Admins can see these forums

    I see that every user gets a new User ID – old IDs are saved in table _bbp_converter_translator – will that table be kept? Maybe by this I have a chance to later import – somehow – private messages for buddy press!?

    The translator table is not kept and the old user ID is stored in wp_usermeta as per this item in the ‘Example.php’ importer.

    https://bbpress.trac.wordpress.org/browser/trunk/includes/admin/converters/Example.php#L458

                    // Store old User id (Stored in usermeta)
    459	                $this->field_map[] = array(
    460	                        'from_tablename'  => 'users_table',
    461	                        'from_fieldname'  => 'the_users_id',
    462	                        'to_type'         => 'user',
    463	                        'to_fieldname'    => '_bbp_user_id'
    464	                );

    I’ll take closer look at the importer and structure you linked to over the weekend and post back with anything else I can think of.

    #137066
    Stephen Edgar
    Keymaster

    As far as I know there are no issues importing from phpBB v3.0.11

    This doc has any known issues when using the phpBB importer:
    https://codex.bbpress.org/import-forums/phpbb/

    Did your import fail at one point and you started the import again which would have caused duplicates?

    To debug the issue further I would need some detailed information, particularly some SQL examples would be helpful.

    If you still have issues after resting your forums and this constantly happpens please create a ticket on Trac https://bbpress.trac.wordpress.org/ with some detailed steps to reproduce the issue and I will take a look.

    #137063

    In reply to: SMF Import to bbPress

    Stephen Edgar
    Keymaster

    Joe,

    Thanks for looking at this I uploaded a new version with the fix above for the ‘to_type’ you mentioned above.

    I have not started with the passwords as of yet, this is next weeks job to look at all the importers passwords sections and begin writing custom callbacks for all of them. With my limited PHP skills this is going to be a challenge indeed. I will be calling heavily on the code found in the phpBB importer to base the code on and then changing any calculating/algorithms as needed.

    If you beat me to it, I could live with that 😉

    SysFailure0x5a
    Participant

    For some reason my last comment isnt showing up…

    No, I even stripped all the plugins and themes out of the install, and removed/reinstalled bbpress. Same issue. I don’t feel that I had anything abnormal installed for plugins. Most of the popular plugins, jetpack, basic functionality stuff like image resizing/fitting, stat tracking, google analytics, shortcode stuff…

    Here is another person who had the problem. I also found a thread on your bug tracking site regarding this issue for multisite from several versions back. Can’t find the link right now, but it said resolved… Not so sure that’s true.

    You do not have sufficient permissions to access this page.

    and another

    You do not have sufficient permissions to access this page.

    and another…

    Admin user: "You do not have sufficient permissions to access this page"

    It’s also broken for BRAND NEW sub sites with brand new admin usernames.

    #137056
    PureLoneWolf
    Participant

    Hi there

    I have bbPress (along with BuddyPress) on two, fundamentally, identical websites.

    However, on http://www.wolflan.com, I have no issues, but on clan.wolflan.com I have a couple of weird ones.

    They are both even using themes from the same author.

    On wolflan.com, I was able to use

    function custom_bbp_list_forums() {
      $args['separator'] = '<br />';
     
      return $args;
    }
     
    add_filter('bbp_before_list_forums_parse_args', 'custom_bbp_list_forums' );

    in my themes functions.php, and therefore get the sub-forums on their own line. Additionally, I was able to add individual forums to the site navigation menu (Appearance/Menus).

    On clan.wolflan.com I was able to get the sub-forums on their own line, up until I upgraded to 2.4. At which point, my private forums moved to the bottom and the code above stopped putting the sub-forums on their own line. Today, I decided that I would like to have forums on the navigation and noticed that I have no option for this.

    Both sites are running an identical plugin list, they are both on the latest versions of all plugins and are also running WP3.6.1 as of this morning.

    Would anyone have any ideas?

    I have linked to images that show the issue:

    wolflan.com
    Fully working, modded functions.php
    fullworkingfunctionsmod.png
    Fully working, wordpress menu editor
    fullworkingmenueditor.png

    clan.wolflan.com
    Not working, modded functions.php
    nonworkingfunctionsmod.png
    Not working, wordpress menu editor
    nonworkingmenueditor.png

    Would anyone have any ideas as to what I can do to solve these two issues?

    Many thanks
    Dave

    #137052

    In reply to: SMF Import to bbPress

    bigtreesjoe
    Participant

    By the way, shouldn’t this:

    		// User password verify class (Stored in usermeta for verifying password)
    		$this->field_map[] = array(
    			'to_type'      => 'members',
    			'to_fieldname' => '_bbp_class',
    			'default'      => 'SMF'
    		);
    
    be this instead:
    

    // User password verify class (Stored in usermeta for verifying password)
    $this->field_map[] = array(
    ‘to_type’ => ‘user’,
    ‘to_fieldname’ => ‘_bbp_class’,
    ‘default’ => ‘SMF’
    );

    #137048
    inspirationally
    Participant

    Hello,

    after exactly 10 years and over 500.000 posts with our board deppheads.com running with Woltlab Burning Board (right now version 3.1.8), social networks have sort of won – instead of 150 new posts the day we have now maximum 5 posts. WBB4 will be coming out soon, so this is the right time to sell my WBB license and move it all to my site johnny-depp.org, powered by WordPress. This is where I seek help.

    I already deleted inactive members, so that we now have “just” over 300, but I don’t want to delete all the written things like movie reviews and serious discussion, as this is still the home of many. So there are 500.000 posts and nearly 10.000 topics to be imported.

    I edited the example.php and so far it worked with importing members and forums (just on a test WordPress installation for now).

    However, there are some problems/questions I’ve come up with and I’m almost sure, there will be more following.

    1. there is, equally to phpBB, the problem, that there are topics and posts, and the first post of the topic has to become “topic content” of WBB.
    Here I used

    // Topic content.
    // Note: We join the posts table because topics do not have content.
    $this->field_map[] = array(
    'from_tablename' => 'wbb1_1_post',
    'from_fieldname' => 'message',
    'join_tablename' => 'topics',
    'join_type' => 'INNER',
    'join_expression' => 'USING (threadID) WHERE wbb1_1_post.postID = wbb1_1_thread.firstPostID',
    'to_type' => 'topic',
    'to_fieldname' => 'post_content',
    'callback_method' => 'callback_html'
    );

    Unfortunately, I get the error, that wbb1_1_post.message does not exist:

    WordPress database error: [Unknown column 'wbb1_1_post.message' in 'field list']
SELECT convert(wbb1_1_thread.threadID USING "utf8") AS threadID,convert(wbb1_1_thread.replies USING "utf8") AS replies,convert(wbb1_1_thread.boardID USING "utf8") AS boardID,convert(wbb1_1_thread.userID USING "utf8") AS userID,convert(wbb1_1_post.message USING "utf8") AS message,convert(wbb1_1_thread.topic USING "utf8") AS topic,convert(wbb1_1_thread.time USING "utf8") AS time,convert(wbb1_1_thread.lastPostTime USING "utf8") AS lastPostTime FROM wbb1_1_thread AS wbb1_1_thread LIMIT 0, 100

    But it does!
    I attached both, my wbb3.php import script and the database structure of the most important tables, here you go:
    http://deppheads.com/uploads/wbb.txt
    http://deppheads.com/uploads/database_structure.txt

    2. I hope/guess, this is also the reason that all topics (once I remove that passage that produces an error) are started either by Anonymous or by ME (although I haven’t done it)?

    3. some users are twice now (like myself..who have been admins of wordpress and users of the forum). Can I simply merge them with
    UPDATE wp_posts SET post_author = ‘1’ WHERE post_author = ‘2’; and it will count for the forum, too?

    4. the passwords – in WBB they are hashed by this:
    $passwort = sha1($row->salt.sha1($row->salt.sha1($_POST[‘passwort’])));
    so what do I write at the end of wbb3.php
    public function authenticate_pass( $password, $serialized_pass ) {
    $pass_array = unserialize( $serialized_pass );
    return ( $pass_array[‘hash’] == md5( md5( $password ). $pass_array[‘salt’] ) );
    }
    or is this impossible and the users have to get the new password by mail?

    5. the imported users have no “Forum Role”. Is is “normal”? Is there any chance to automatically give them the forum role “Participant”?

    6. do I have to keep the wbb3.php “forever” because of the passwords or can I delete it one day, even if not all members have com back yet?

    7. until now we have everything like private messages, profiles, friends and especially user groups (Moderators, crew members) with hidden forums. Do I see correct, that I can install both, import bbpress and afterwards attach for example our “Mods Only” to the group “Moderators” as group forum?

    8. I see that every user gets a new User ID – old IDs are saved in table _bbp_converter_translator – will that table be kept? Maybe by this I have a chance to later import – somehow – private messages for buddy press!?

    Alone if my first point is solved, I’d be thankful.

    Kind regards, inspirationally.

    PureLoneWolf
    Participant

    Hi there

    Unfortunately, when I add that code, I get a server error when trying to load the forums page. You have used ‘ instead of ‘.

    That said, it has to be something to do with my theme. I applied this code to another site, and it worked (both are fully up to date), whereas the site that it originally worked on, won’t do anything with that code.

    Ah well, I needed a new theme anway lol

    #137036
    #137035
    Kaliceos
    Participant

    Hi,

    I’m in the process of migrating a phpBB forum to WordPress with bbPress. I don’t know if the bbPress style is better but my users are used to the phpBB style for displaying Forums on the main page. So I tried to reproduce that layout in bbPress using categories. With the default theme, I was not happy with the way it looked. After a quick search in these forums, I saw some interesting topics from @lynq (here and there) but it didn’t work as intended in the last bbpress release and ticket #1958 has been moved to 2.6.

    So after a few hours of searching codex, and a lot of tries, I managed to do what I wanted. As there is still some demand in Lynq’s topic, I thought I should share my little work.

    I’m not a developper, so my code may be a little messy, but it works as intended. I’ve tried using the bbpress functions, and commented my code. If any PHP expert would like to review it and make it better, any feedback is welcome.

    The only file to change is loop-forums.php with this code.
    You just need to create it and paste the code. Then upload it to /wp-content/your-theme/bbpress/. Use a child-theme if you don’t want to loose it on next theme update.

    The forums are not yet online, so here are some screenshots with descriptions. (In French, because, as you may have noticed, English is not my native language 🙂 )

    I’ve tested many situations (even a category inside a forum, which bbpress doesn’t consider anymore as a category, probably normal behavior) and I think everything works as intended. Feel free to report any bug.

    #137034

    Topic: Conditionals

    in forum Troubleshooting
    Squirrel
    Participant

    Hi there

    Does anyone know if BBPress has conditionals like BuddyPress does such as in the following link: buddypress conditionals?

    I am trying to find a condition for if you are on the forum index and the users forum list when on a profile. I can’t seem to find anything that works so if anyone knows that would be great.

    Thanks

    #137033
    kriskl
    Participant

    this code should put sub forums the way you want, add it to your functions.php child theme

    function custom_bbp_list_forums() {
    $args[‘separator’] = ‘<br />’;

    return $args;
    }

    add_filter(‘bbp_before_list_forums_parse_args’, ‘custom_bbp_list_forums’ );

    kriskl
    Participant

    I think this code will work if you add it to your functions file

    function custom_bbp_list_forums() {
    $args[‘separator’] = ‘<br />’;

    return $args;
    }

    add_filter(‘bbp_before_list_forums_parse_args’, ‘custom_bbp_list_forums’ );

    #137021
    kandrite
    Participant

    Hello!

    I can’t seem to find any answers via Google, so maybe you fine folks could help me. I just started delving into bbpress themeing. I’m basically skeletonizing the default bbpress theme so I can start working in depth with it.

    The way I have my forums structured is in three category forums, with variable amounts of subforums. The default theme uses bbp_list_forums to return an unordered list of all subforums of a category. I’ve been messing with the arguments and made each list item separated in its own div. My problem with that is only the text inside the div links to the forum, whereas I would like the entire div to be the link.

    My arguments look like so:

    		<?php bbp_list_forums( array(
    			'before'              => '<ul class="bbp-forums-list">',
            	'after'               => '</ul>',
            	'link_before'         => '<li class="bbp-forum"><a href="<?php the_permalink(); ?>"><div class="forum-list-item">',
            	'link_after'          => '</div></a></li>',
    			'count_before'        => '<div class="forum-list-item-count"><span class="forum-list-item-topics">Topics: </span>',
            	'count_after'         => '',
            	'count_sep'           => '<br><span class="forum-list-item-replies">Replies: </span>',
            	'separator'           => '<br>',
            	'forum_id'            => '',
            	'show_topic_count'    => true,
            	'show_reply_count'    => true,
    		)); ?>

    Any way I can get the permalinks to the individual subforums?

    #137018

    In reply to: SMF Import to bbPress

    bigtreesjoe
    Participant

    I had basically finished writing a converter template for smf 1.1.8 when I came across your post and your script. Good news is it looks like I got pretty close.

    I would like to understand better what the authenticate_pass function is supposed to do. If it is just supposed to return true if the current user’s password matches the old smf hashed password then it seems that I should be able to use a function similar to ssi_checkPassword that was included in the SMF ssi.php script, assuming that the sha1 function is available.

    Is there something more complicated that I am missing?

    I realize that due to SMF licensing issues I would not be able to distribute the code I write for myself based on the ssi.php code.

    #137014
    jralston
    Participant

    I feel like I am missing something very basic here… why are breadcrumbs not showing at all? I used a custom template for the main bbpress page. I’ve added in <?php bbp_breadcrumb(); ?> into that custom template – nothing changed and no breadcrumbs appearing. Help? What am I missing here?

    Jamil Ahmed
    Participant

    Hi

    I have used topic index shortcode on forum page and the pagination is all messed with line breaking. I have tried to search a lot but cant fix it. Hoping any one solve this. thanks

    pagination issues when using topics shortcode on front page.

    http://www2.dekritischebelegger.nl/forum/

    #137009
    Zack Tollman
    Participant

    Hi there!

    I just updated to bbPress 2.4 and experienced the same problem. All titles not on bbPress pages were rendered as blank titles.

    It seems bbPress 2.4 introduced a new function that filters the wp_title function. As a temporary workaround that does not required bbPress plugin file changes, I have added the following to my theme’s functions.php:

    /**
     * Restore non bbPress page titles.
     *
     * v2.4 of bbPress introduced a bug where titles for all non-bbPress pages were blank. This function restores order
     * without overwriting the bbPress core files. It uses the exact same function as bbPress for the titles with one
     * change: if none of the bbPress queries match, it returns the original title.
     *
     * The function first removes the bbPress filter that performs this action, then uses it's own routine to determine the
     * title.
     *
     * @param  string    $title          Optional. The title (not used).
     * @param  string    $sep            Optional, default is '&raquo;'. How to separate the various items within the page title.
     * @param  string    $seplocation    Optional. Direction to display title, 'right'.
     * @return string                    Modified title.
     */
    function my_prefix_bbp_title( $title, $sep, $seplocation ) {
    	// Get rid of the core "bbp_title" filter callback
    	remove_filter( 'wp_title', 'bbp_title', 10, 3 );
    
    	// Store original title to compare
    	$_title = $title;
    
    	// Title array
    	$title = array();
    
    	/** Archives **************************************************************/
    
    	// Forum Archive
    	if ( bbp_is_forum_archive() ) {
    		$title['text'] = bbp_get_forum_archive_title();
    
    	// Topic Archive
    	} elseif ( bbp_is_topic_archive() ) {
    		$title['text'] = bbp_get_topic_archive_title();
    
    	/** Edit ******************************************************************/
    
    	// Forum edit page
    	} elseif ( bbp_is_forum_edit() ) {
    		$title['text']   = bbp_get_forum_title();
    		$title['format'] = esc_attr__( 'Forum Edit: %s', 'bbpress' );
    
    	// Topic edit page
    	} elseif ( bbp_is_topic_edit() ) {
    		$title['text']   = bbp_get_topic_title();
    		$title['format'] = esc_attr__( 'Topic Edit: %s', 'bbpress' );
    
    	// Reply edit page
    	} elseif ( bbp_is_reply_edit() ) {
    		$title['text']   = bbp_get_reply_title();
    		$title['format'] = esc_attr__( 'Reply Edit: %s', 'bbpress' );
    
    	// Topic tag edit page
    	} elseif ( bbp_is_topic_tag_edit() ) {
    		$title['text']   = bbp_get_topic_tag_name();
    		$title['format'] = esc_attr__( 'Topic Tag Edit: %s', 'bbpress' );
    
    	/** Singles ***************************************************************/
    
    	// Forum page
    	} elseif ( bbp_is_single_forum() ) {
    		$title['text']   = bbp_get_forum_title();
    		$title['format'] = esc_attr__( 'Forum: %s', 'bbpress' );
    
    	// Topic page
    	} elseif ( bbp_is_single_topic() ) {
    		$title['text']   = bbp_get_topic_title();
    		$title['format'] = esc_attr__( 'Topic: %s', 'bbpress' );
    
    	// Replies
    	} elseif ( bbp_is_single_reply() ) {
    		$title['text']   = bbp_get_reply_title();
    
    	// Topic tag page
    	} elseif ( bbp_is_topic_tag() || get_query_var( 'bbp_topic_tag' ) ) {
    		$title['text']   = bbp_get_topic_tag_name();
    		$title['format'] = esc_attr__( 'Topic Tag: %s', 'bbpress' );
    
    	/** Users *****************************************************************/
    
    	// Profile page
    	} elseif ( bbp_is_single_user() ) {
    
    		// Current users profile
    		if ( bbp_is_user_home() ) {
    			$title['text'] = esc_attr__( 'Your Profile', 'bbpress' );
    
    		// Other users profile
    		} else {
    			$title['text']   = get_userdata( bbp_get_user_id() )->display_name;
    			$title['format'] = esc_attr__( "%s's Profile", 'bbpress' );
    		}
    
    	// Profile edit page
    	} elseif ( bbp_is_single_user_edit() ) {
    
    		// Current users profile
    		if ( bbp_is_user_home_edit() ) {
    			$title['text']   = esc_attr__( 'Edit Your Profile', 'bbpress' );
    
    		// Other users profile
    		} else {
    			$title['text']   = get_userdata( bbp_get_user_id() )->display_name;
    			$title['format'] = esc_attr__( "Edit %s's Profile", 'bbpress' );
    		}
    
    	/** Views *****************************************************************/
    
    	// Views
    	} elseif ( bbp_is_single_view() ) {
    		$title['text']   = bbp_get_view_title();
    		$title['format'] = esc_attr__( 'View: %s', 'bbpress' );
    
    	/** Search ****************************************************************/
    
    	// Search
    	} elseif ( bbp_is_search() ) {
    		$title['text'] = bbp_get_search_title();
    	} else {
    		return $_title;
    	}
    
    	// This filter is deprecated. Use 'bbp_before_title_parse_args' instead.
    	$title = apply_filters( 'bbp_raw_title_array', $title );
    
    	// Set title array defaults
    	$title = bbp_parse_args( $title, array(
    		'text'   => '',
    		'format' => '%s'
    	), 'title' );
    
    	// Get the formatted raw title
    	$title = sprintf( $title['format'], $title['text'] );
    
    	// Filter the raw title
    	$title = apply_filters( 'bbp_raw_title', $title, $sep, $seplocation );
    
    	// Compare new title with original title
    	if ( $title === $_title )
    		return $title;
    
    	// Temporary separator, for accurate flipping, if necessary
    	$t_sep  = '%WP_TITILE_SEP%';
    	$prefix = '';
    
    	if ( !empty( $title ) )
    		$prefix = " $sep ";
    
    	// sep on right, so reverse the order
    	if ( 'right' === $seplocation ) {
    		$title_array = array_reverse( explode( $t_sep, $title ) );
    		$title       = implode( " $sep ", $title_array ) . $prefix;
    
    	// sep on left, do not reverse
    	} else {
    		$title_array = explode( $t_sep, $title );
    		$title       = $prefix . implode( " $sep ", $title_array );
    	}
    
    	// Filter and return
    	return apply_filters( 'bbp_title', $title, $sep, $seplocation );
    }
    
    add_filter( 'wp_title', 'my_prefix_bbp_title', 9, 3 );
    #137008
    Jamil Ahmed
    Participant

    Hi,

    I just used this shortcode [bbp-topic-tags] in widget and also in template file and its showing the tags but with <br> tag after each …. tag. Its means all tag clouds are displaying in a long list style and not displaying like wordpress default Tag cloud are displaying.

    Is this bug or please help to fix thanks

    #136990
    Stephen Edgar
    Keymaster

    Firstly, thanks for looking further into this, it gave me enough info to run a quick test import.

    bbPress uses WordPress tables and doesn’t create any of its own and not having answers to something you don’t know doesn’t make anyone dumb. 😉

    Ok…. Here we go….

    I installed this plugin https://wordpress.org/plugins/wp-ultimate-csv-importer/

    I realised the csv file had to be split into 3, one for the forum, one for topics and one for replies. Here is a copy of the 3 CSV files I used https://gist.github.com/ntwb/6532360

    Next jump into WP Admin and and open up the WP CSV Tool and select ‘Custom Post’ to import from and select your forum.csv file to upload and click import.

    Set the options and field mappings as per this:

    Import Data Configuration

    Select Post Type = forum
    Import with post status = publish
    post_author = post_author
    post_date = post_date
    post_content = post_content
    post_title = post_title

    And click import.

    Topics is up next and you will notice that it includes the field ‘post_parent’ so this is the forum ID that the topic will be imported into. As we do not know the forum ID you will need to open up the bbPress forums panel in wp-admin. Select the forum you want the topics to be imported and this will take you into the forum edit section, look at the URL in your browser and it should be similar to /wp-admin/post.php?post=348830&action=edit what we want here is the ‘348830’ as that will be the parent forum for each topic imported. Update your topic.csv file with this number as per my sample linked above.

    Back to the CSV importer to import your topics.csv

    Set the options and field mappings as per this:

    Import Data Configuration

    Select Post Type = topic
    Import with post status = publish
    post_author = post_author
    post_date = post_date
    post_content = post_content
    post_title = post_title
    post_parent = post_parent

    The replies section is basically the same as the topics section, you need to get the ID orf each topic ID for each reply and update your reply.csv file for each entry.

    Lastly run each of the ‘Recalculate’ and ‘Count’ bbPress ‘Repair Tools’ from wp-admin-> Tools- Forums -> Repair Forums (more info here https://codex.bbpress.org/repair-forums/)

    And I think that’s it, there is a bit of juggling your data around, give it a bash and let me know how it works out for you and here’s the result 🙂

    #136988

    The reason it doesn’t exist is because the audience for this is relatively small compared to users asking for other things. Right now, I see 3 people that need this. That’s not saying it’s trivial, but it’s non-urgent.

    The actual clean-up of this is not super straight forward, unfortunately. There is an uninstall script located in Tools > Forums that will permanently purge most data, but it doesn’t remove user roles yet.

    Open a feature request at http://bbpress.trac.wordpress.org, and we’ll put in a milestone and work towards getting it in.

    #136979
    CC-Cailin
    Participant

    I am integrating bbpress files into my own wordpress theme. But, I don’t get why there is so many loop files?

    “content-archive-forum.php” links to “loop-forums.php”, and inside that, it links to “single-forum.php”.
    Why on earth is there one loop linked to another, and then another, and then another? It sees confusing to me…

    Can’t I just leave out files like “loop-forums.php” and add that code directly in “content-archive-forum.php and do the same with the other files? Or is it necessary to keep them broken up?

    Tenebral
    Participant

    i want to add some custom fields inside <div class="bbp-reply-author"> </div>.

    I can do this inside user-profile.php using this code:

    <div>
    <?php if ( bbp_get_displayed_user_field( 'twitter' ) ) : ?>
    <a class="tooltip" href="http://twitter.com/<?php bbp_displayed_user_field( 'twitter' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Twitter', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/twitter.png" alt="" /></a>
    <?php endif ?>	
    <?php if ( bbp_get_displayed_user_field( 'facebook' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'facebook' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Facebook', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/facebook.png" alt="" /></a>
    <?php endif ?>
    <?php if ( bbp_get_displayed_user_field( 'google' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'google' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Google+', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/google_plus.png" alt="" /></a>
    <?php endif ?>	
    <?php if ( bbp_get_displayed_user_field( 'linkedin' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'linkedin' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Linkedin', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/linkedin.png" alt="" /></a>
    <?php endif ?>				
    <?php if ( bbp_get_displayed_user_field( 'flickr' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'flickr' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Flickr', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/flickr.png" alt="" /></a>
    <?php endif ?>	
    <?php if ( bbp_get_displayed_user_field( 'youtube' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'youtube' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on YouTube', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/youtube.png" alt="" /></a>
    <?php endif ?>
    <?php if ( bbp_get_displayed_user_field( 'pinterest' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'pinterest' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( '  on Pinterest', 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/pinterest.png" alt="" /></a>
    <?php endif ?>
    <?php if ( bbp_get_displayed_user_field( 'user_url' ) ) : ?>
    <a class="tooltip" href="<?php bbp_displayed_user_field( 'user_url' ); ?>" title="<?php bbp_displayed_user_field( 'display_name' ); ?><?php _e( " 's site", 'todo' ); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/images/socialicons/site.png" alt="" /></a>
    <?php endif ?>
    </div>

    But for some reason this didn’t work at loop-single-reply.php, there’s something i’m missing? ty

Viewing 25 results - 13,776 through 13,800 (of 32,503 total)
Skip to toolbar