Search Results for 'code'
-
Search Results
-
Topic: bbp_new_forum hook
Hello,
I am trying to write a plugin that adds some meta-information to a forum when it gets created. I can see that bbPress has a “bbp_new_forum” and a “bbp_edit_forum” hook, yet those never appear to fire, no matter what i do. I even added a php-die directly in front of their respective “do_action” calls inside the bbPress source code just to find out, that the part of the code that should call the new_forum hook appears to never actually be executed. What are those hooks for then, and what hooks DO get called when you create/edit a bbPress forum?
Thank you for your help!
My Version of WordPress is 3.8.1
My Version of bbPress is 2.5.3Topic: My customized sub-sub-forums
I HAVE DONE THAT, but you need to read all these instruction and do a customization:
//using add_filter, i have changed one original bbPress function (named bbp_list_forums, created from bbpress\includes\forums\template.php function) // copied that function, and inserted the additional code (you can easily see my added extra code) //so, after some time, someone, who will work on this website, may have to update the below "bbp_list_forums" function (according from the new version of bbPress package,as now its 2013-14 year), and insert again my added code in its place.. add_filter('bbp_list_forums','bbp_list_forumsNEWWWW',10); function bbp_list_forumsNEWWWW( $args = '' ) { // Define used variables $output = $sub_forums = $topic_count = $reply_count = $counts = ''; $i = 0; $count = array(); // Parse arguments against default values $r = bbp_parse_args( $args, array( 'before' => '<ul class="bbp-forums-list">', 'after' => '</ul>', 'link_before' => '<li class="bbp-forum">', 'link_after' => '</li>', 'count_before' => ' (', 'count_after' => ')', 'count_sep' => ', ', 'separator' => ', ', 'forum_id' => '', 'show_topic_count' => true, 'show_reply_count' => true, ), 'list_forums' ); // Loop through forums and create a list $sub_forums = bbp_forum_get_subforums( $r['forum_id'] ); if ( !empty( $sub_forums ) ) { // Total count (for separator) $total_subs = count( $sub_forums ); foreach ( $sub_forums as $sub_forum ) { $i++; // Separator count // Get forum details $count = array(); $show_sep = $total_subs > $i ? $r['separator'] : ''; $permalink = bbp_get_forum_permalink( $sub_forum->ID ); $title = bbp_get_forum_title( $sub_forum->ID ); // Show topic count if ( !empty( $r['show_topic_count'] ) && !bbp_is_forum_category( $sub_forum->ID ) ) { $count['topic'] = bbp_get_forum_topic_count( $sub_forum->ID ); } // Show reply count if ( !empty( $r['show_reply_count'] ) && !bbp_is_forum_category( $sub_forum->ID ) ) { $count['reply'] = bbp_get_forum_reply_count( $sub_forum->ID ); } // Counts to show if ( !empty( $count ) ) { $counts = $r['count_before'] . implode( $r['count_sep'], $count ) . $r['count_after']; } //------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------------ // ------------------------------------------------ HERE WHAT I HAVE ADDED ------------------------ //------------------------------------------------------- START ------------------------------- //------------------------------------------------------------------------------------------------ $fresnhesss=bbp_get_forum_last_topic_title( $sub_forum->ID ); if(empty($fresnhesss)) {$fresnhesss='NO TOPICS';} else {$fresnhesss='<a href="'. bbp_get_forum_last_topic_permalink( $sub_forum->ID ) .'">'. $fresnhesss .'</a>';} // Build this sub forums link $output .= $r['link_before'] . ' <li class="forumsSUUB"> <div class="s_LINe"><a href="' . esc_url( $permalink ) . '" class="bbp-forum-link">__' . $title . $counts . '</a></div>' . $show_sep . ' <div class="bbp-forum-lastactivee">'.$fresnhesss.'</div> <div class="bbp-forum-contenttt-descr">'. bbp_get_forum_content($sub_forum->ID) .'</div> </li>' . $r['link_after']; // sub-sub-forums list $sub_forums2 = bbp_forum_get_subforums( $sub_forum->ID ); if ( !empty( $sub_forums2 ) ) { $i = 0; // Total count (for separator) $total_subs = count( $sub_forums2 ); foreach ( $sub_forums2 as $sub_forum2) { $i++; // Separator count // Get forum details $count = array(); $show_sep = $total_subs > $i ? $r['separator'] : ''; $permalink = bbp_get_forum_permalink( $sub_forum2->ID ); $title = bbp_get_forum_title( $sub_forum2->ID ); // Show topic count if ( !empty( $r['show_topic_count'] ) && !bbp_is_forum_category( $sub_forum2->ID ) ) { $count['topic'] = bbp_get_forum_topic_count( $sub_forum2->ID ); } // Show reply count if ( !empty( $r['show_reply_count'] ) && !bbp_is_forum_category( $sub_forum2->ID ) ) { $count['reply'] = bbp_get_forum_reply_count( $sub_forum2->ID ); } // Counts to show if ( !empty( $count ) ) { $counts = $r['count_before'] . implode( $r['count_sep'], $count ) . $r['count_after']; } //fresnhess $fresnhesss2=bbp_get_forum_last_topic_title( $sub_forum2->ID ); if(empty($fresnhesss2)) {$fresnhesss2='NO TOPICS';} else {$fresnhesss2='<a href="'. bbp_get_forum_last_topic_permalink( $sub_forum2->ID ) .'">'. $fresnhesss2 .'</a>';} // Build this sub forums link $output .= ' <li class="bbp-forum forumsSUUB"> <div class="subsub_LINe"><a href="' . esc_url( $permalink ) . '" class="bbp-forum-link">__' . $title . $counts . '</a></div>' . $show_sep . ' <div class="bbp-forum-lastactivee">'.$fresnhesss2.'</div> <div class="bbp-forum-contenttt-descr">'. bbp_get_forum_content($sub_forum2->ID) .'</div> </li>'; } } //------------------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------------ //----------------------------- END of my inserted code (then continues normally)----------- //------------------------------------------------------------------------------------------ ////------------------------------------------------------------------------------------------------ } // Output the list echo apply_filters( 'bbp_list_forumss', $r['before'] . $output . $r['after'], $r ); } }Topic: Login Shortcode Assistance
I’m using the bbpress login shortcode [bbp-login]. The example shown on this page has a title and descriptive text but I don’t see any way/parameters for entering this:
I’m guessing this is just an image that was placed in a lightbox plugin. Wondering also if anyone knows how to get it into a modal window like this too.
Thanks for any assistance.
Tim
Topic: Forum root confusion
Hi all.
My apologies if this is a fairly rudimentary query, or one covered elsewhere, I did search but managed to only confuse myself more 😉
My site is:
http://www.gastronomicslc.com/Running latest WP and a Genesis based theme from Studiopress. I installed bbPress but am having issues generating a coherent main page, I guess the forum root if you will. I followed the install instructions and made my forum root slug (foodie-talk), I also then made the foodie-talk page, however that doesn’t seem to work:
http://www.gastronomicslc.com/foodie-talk/
I have created two test sub-forums
http://www.gastronomicslc.com/foodie-talk/forum/general-talk/
http://www.gastronomicslc.com/foodie-talk/forum/ask-expert/with a test post in each. I have yet to link to the bbPRess directly from my site while I work on this. On the foodie-talk page I have the [bbp-forum-index] code right now.
I imagine I have made some simpleton fault, appreciate anyone pointing it out 🙂
Hi guys. I am using the forum list widget to display the different forums. Can anyone help me with some code so that the number of topics under each forum is listed as well in the sidebar?
Hi. Is there a way to add mandatory custom fields in the BBPress registering process? I did get someone to add a text field for the location but it wasn’t mandatory and for the UK, they were adding variations like England, Britain etc so in my user directory and search, people looking for people in the UK would only find people in the UK and not in England or the United Kingdom etc. So I had to go and edit their profiles to say United Kindom so they would come up in the search. Sooo…what I really need is not a text field but a drop down or other thingy where new members have to choose where they are from from the options they are given. So I need a list of all countries and then for now, a list for US states and UK counties. I have a coder to do this for me (Ive not got a clue)….is it possible to do this by configuring BBpress or is a custom code thingy needed? If I can do it, I will show it here maybe so others can see?
It has been about two weeks since I converted my vBulletin forum over to BBPress. The existing forum has been around since 2008 and since the conversion, we have been receiving emails over entire history of the site that topics have been replied to. These are notifications that have been sent non-stop since the conversion.
I installed Buddypress and BBPress at the same time, so I’m not sure exactly what is causing all of these emails to continue to be sent out. How do I stop these notification emails from going out? I’ve already attempted to add the following code to my site specific plug-in, but it does not seem to have helped much. I guess it helped with mentions but not the replies.
remove_action( ‘bp_activity_posted_update’, ‘bp_activity_at_message_notification’, 10, 3 );
remove_action( ‘bp_groups_posted_update’, ‘groups_at_message_notification’, 10, 4 );What are the BBPress hooks to stop reply notifications? I just want them to stop for awhile without disabling email site wide.

