Forum Replies Created
-
In reply to: Results of the 2014 bbPress Survey
Interesting results. Good work @mercime!
In reply to: remove rel=nofollow from bbpress postsThe next line after
<?php
In reply to: Damn, it has happened again!! Lost all postsGo to Tools -> Forum and recount. 🙂
Glad it worked.
In reply to: Damn, it has happened again!! Lost all postsI’d not suggest running anything like this but if it works well in your specific case, this should work:
DELETE bad_rows.* from wp_posts as bad_rows inner join ( select post_title, MIN(id) as min_id from wp_posts group by post_title having count(*) > 1 ) as good_rows on good_rows.post_title = bad_rows.post_title and good_rows.min_id <> bad_rows.id and bad_rows.post_type NOT IN ('forum', 'topic', 'reply');
In reply to: Need a little help with new bbPress pluginYou’re welcome. And the explanation:
First I got undifined Variable for $topic_id so I added the $topic_id = 0; at the code, Zero stands for getting the topic ID from the loop ?
Where the bbp_new_topic hook is called, the line says:
do_action( 'bbp_new_topic', $topic_id );
It calls all the functions hooked to bbp_new_topic and also passes the $topic_id parameter, which in our case is:
function shmoo_auto_save_tags( $topic_id ) {
During this stage, I do not think we’re in the loop (I maybe wrong, I haven’t checked). The topic id internally would be something different at the point of insertion, that’s why in our function we’re now passing the variable to other functions:
$bbp_topic_content = bbp_get_topic_content( $topic_id );
On a side note, you had done
$topic_id = 0;
at the very beginning of the function. Due to that, whatever topic id was being passed was being disregarded and instead set to 0.More on actions and filters: https://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
In reply to: Need a little help with new bbPress pluginTry this http://pastebin.com/z5HHv6hD
In reply to: Need a little help with new bbPress pluginPaste the full code again?
In reply to: Need a little help with new bbPress pluginJust realized that the ‘similar’ thing for topics doesn’t exist. Your method for topics is correct, and you’ll need something like this after you’ve the $words array:
$words = array_unique( array_merge( $words, wp_get_post_terms( $topic_id, bbp_get_topic_tag_tax_id(), array( 'fields' => 'names' ) ) ) ); if ( !empty( $words ) ) wp_set_post_terms( $topic_id, $words, bbp_get_topic_tag_tax_id(), true );
The top of the code should read as (to accept the $topic_id passed by do_action):
add_action( 'bbp_new_topic', 'shmoo_auto_save_tags', 10, 1 ); add_action( 'bbp_edit_topic', 'shmoo_auto_save_tags', 10, 1 ); function shmoo_auto_save_tags( $topic_id ) {
Again, untested, but should work in principle.
In reply to: Need a little help with new bbPress pluginBetter hook it to
bbp_new_reply_pre_set_terms
here: https://bbpress.trac.wordpress.org/browser/trunk/includes/replies/functions.php#L371 and return the $words array after joining in the supplied $terms array. Similarly for topic.I’d also suggest to have this at the very beginning:
if ( !bbp_allow_topic_tags() || !current_user_can( 'assign_topic_tags' ) ) return $terms;
Touche.
In reply to: I need help merging one topic with another.Go to the topic you want to merge into another. Click the merge option and the instructions will be onscreen.
All replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted. If the topic you’re merging to was created after the you’re on, its post date will be updated to a second earlier than the one you’re on. In effect, the topic you’re merging to acts as the ‘parent’ topic and the topic you’re on (where you pressed the merge link) acts as the ‘sub’ topic.
In reply to: remove rel=nofollow from bbpress postsUntested, but this should work (put it in theme’s
functions.php
):remove_filter( 'bbp_get_reply_content', 'bbp_rel_nofollow' ); remove_filter( 'bbp_get_topic_content', 'bbp_rel_nofollow' );
If you also want to remove nofollow from users’ urls, add this too:
remove_filter( 'bbp_get_reply_author_link', 'bbp_rel_nofollow' ); remove_filter( 'bbp_get_topic_author_link', 'bbp_rel_nofollow' );
In reply to: How to remove bbPress roles after uninstallmuyilleum, put those two lines in your theme’s functions.php after
<?php
. On pressing save, that code will automatically load and remove the roles. You can then remove the lines because they would not serve any further purpose.In reply to: bbPress.org Updated to 2.1Looks great!
In reply to: bbPress 2.0.2 and 1.6MM posts = painfully slow#1823 should address this.
In reply to: Better WYSIWYG text editor?bbPress 2.0 (the plugin) has built-in support for tinymce. I guess bbPress 1 would not see any more feature additions.
In reply to: new forum for every post plugin ?I guess using topic tags instead of forums would be a better idea performance-wise. The topic slug can be the tag slug and it could be automatically attached via a shortcode.
In reply to: v2: Simple Press importer, and first thoughtsIt looks like this importer doesn’t support anonymous replies. You’d have to add the appropriate conditions yourself and re-import.
In reply to: v2: Simple Press importer, and first thoughtsIt looks like this importer doesn’t support anonymous replies. You’d have to add the appropriate conditions yourself and re-import.
In reply to: Parse error: syntax error, unexpected ','drsim: Is there anything beside it, the location where it is happening?
In reply to: SEO Plugin?You might try WordPress SEO which has some support for custom post types, a feature of WordPress that bbPress uses.
In reply to: Any Way to Convert WordPress Comments to BBPressRastarr, you may try converting your WordPress blog into bbPress standalone forums via http://code.google.com/p/wordpress-to-bbpress-converter/ and then use the bbPress plugin importer to import from the bbPress standalone. Please have a backup, cheers!
In reply to: bbPress 2.0 Thesis CompatibilityYou all may try out a plugin made by @kristarella – http://kristarella.com/snaps/bbpress-thesis.zip and see if it works. (I haven’t tested it out myself)
Thanks for the share! You might want to use
is_bbpress()
function (found inbbp-includes/bbp-common-template.php
instead of$uri = $_SERVER['REQUEST_URI']; if ( strpos($uri,'YOUR-FORUM-BASE') !== false ) {
I have wrapped your code blocks in backticks for easier reading.
No, he actually wants to have threaded forum table so that the recent topic of the subforums is displayed too, instead of just topic and reply count in parenthesis. Am I right?