Search Results for 'code'
-
AuthorSearch Results
-
February 6, 2015 at 4:30 pm #157926
In reply to: target=blank for external links in forum
Stagger Lee
Participantremove_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 4); remove_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 4);February 6, 2015 at 2:32 pm #157916In reply to: Are user can create topic in the front en?
Robin W
Moderatoryes, just create a wordpress page and put one of the following shortcodes in it
[bbp-topic-form] – Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.
[bbp-topic-form forum_id=$forum_id] – Display the ‘New Topic Form’ for a specific forum ID.February 6, 2015 at 2:26 pm #157914In reply to: Users Answer not in profile
Robin W
ModeratorNot quite sure why, but the replies class is not showing
Try adding
.forums.bbp-replies { clear: both !important; }to your style.css
that fixed it in my browser
February 6, 2015 at 2:22 pm #157912In reply to: Hook to bbpress notifications
andreippo
Participant@korobochkin, thanks a lot for sharing this.
Should I just paste you code on bbpress/includes/common/functions.php and change the attributes of it?
What does selena_network refer to?
Thanks a lot!
February 6, 2015 at 2:01 pm #157908In reply to: Replies not displaying; theme-related
Robin W
Moderatorok, it’s caused by your themes style sheet
line 5600 says
.no-touch .reply { visibility: hidden; }and this is hiding bbpress reply
you could try adding
#bbpress-forums .no-touch .reply { visibility: visible !important; }to your css file
see
February 6, 2015 at 12:02 pm #157897Stagger Lee
ParticipantTry to adapt this:
add_filter( 'nav_menu_css_class', 'namespace_menu_classes', 10, 2 ); function namespace_menu_classes( $classes , $item ){ if ( in_array(get_post_type(), array('forum','topic','reply')) ) { $classes = str_replace( 'current_page_parent', '', $classes ); $classes = str_replace( 'menu-item-22902', 'current-page-parent', $classes ); } return $classes; }February 6, 2015 at 11:45 am #157896Stagger Lee
ParticipantYou explained a bit confuse. You want parent-child menu highlightning ?
I am afraid it is not possible that way. Your menu link is simple page with shortcode (page-id-502).February 6, 2015 at 11:31 am #157895In reply to: TinyMCE Advance + BBPress + Custom Button/Plugin
Stagger Lee
ParticipantTry to play with this in functions.php:
For some buttons you will need to borrow them from TinyMCE advanced plugin and put in core folder, they dont come in the core. (emoticons, and some else, called “plugins”)function bbp_enable_visual_editor( $buttons = array() ) { $buttons['tinymce'] = array( 'toolbar1' =>'bold, italic, underline, strikethrough, blockquote, alignleft, aligncenter, alignright, alignjustify, justifyfull, bullist, numlist, outdent, indent, cut, copy, paste, undo, redo, link, unlink, table, fullscreen, image, media, cleanup, help, code, hr, removeformat, sub, sup, forecolor, forecolorpicker, backcolor, backcolorpicker, charmap, visualaid, anchor, newdocument, pastetext, separator, wp_adv,wptadv,media,image', 'toolbar2' => 'pastetext, pasteword, selectall, formatselect, fontselect, fontsizeselect, styleselect, strikethrough, outdent, indent, pastetext, removeformat, charmap, wp_more, emoticons, forecolor, wp_help,media,image', // 2nd row, if needed 'toolbar3' => 'pastetext,pasteword,selectall,paste_as_text,preprocess,paste,media,image', // 3rd row, if needed 'toolbar4' => 'media,image', // 4th row, if needed 'plugins' => 'anchor, code, insertdatetime, nonbreaking, print, searchreplace, table, visualblocks, visualchars, emoticons, advlist,wordpress,wplink, paste,fullscreen', ); // 4th row, if needed $buttons['quicktags'] = array ('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close'); return $buttons; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' ); add_filter('mce_buttons', 'bbp_enable_visual_editor');February 6, 2015 at 10:10 am #157889In reply to: Add forum roles
joop.stringer
ParticipantHey guys,
Can you please explain me where to put the functions.php file ?
If I put it in the child theme directory,my whole site goes blank …<?php /** * Functions .. additional to all the programs * * @package WordPress * @subpackage Twenty_Fourteen * @since Twenty Fourteen 1.0 */ function add_custom_role( $bbp_roles ) { $bbp_roles['DDC Member'] = array( 'name' => 'DDC Member', 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants ); $bbp_roles['Forumlid'] = array( 'name' => 'Forumlid', 'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants ); $bbp_roles['DDC Bestuur'] = array( 'name' => 'DDC Bestuur', 'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // i just want them to have the same capabilities as participants ); return $bbp_roles; } add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 ); ?>February 6, 2015 at 8:01 am #157885Rosa Parker
ParticipantThis is my website: http://ecoperate.com, WordPress version is 4.0.1 and bbPress version is 2.5.4.
I have two forum groups running on my website (‘Opportunities’ and ‘Forum’); both of them highlight a different item in the menu when they’re active. Now, what I can’t manage to do is highlighting the respective menu items in the forum topics. At least not in a way they can tell the parent forums apart.
This works perfectly:
.single-topic .genesis-nav-menu .menu-item-71 > aWith the exception that only ONE of the menu-items is highlighted for every single topic (71 refers to menu item ‘Opportunities’). What I want to achieve is differentiation, by somehow linking the single-topics to the right parent forum. How can I do this?
Any help would be greatly appreciated! 🙂
Thanks,
Rosa
February 6, 2015 at 4:39 am #157875In reply to: Stop users from making topics
Robin W
Moderatorok, at least we know you’ve got the right file !
Try the following
delete all the content from wp-content/themes/twentyeleven/bbpress/content-single-forum.php
and then paste the following in
<?php /** * Single Forum Content Part * * @package bbPress * @subpackage Theme */ ?> <div id="bbpress-forums"> <?php bbp_breadcrumb(); ?> <?php bbp_forum_subscription_link(); ?> <?php do_action( 'bbp_template_before_single_forum' ); ?> <?php if ( post_password_required() ) : ?> <?php bbp_get_template_part( 'form', 'protected' ); ?> <?php else : ?> <?php bbp_single_forum_description(); ?> <?php if ( bbp_has_forums() ) : ?> <?php bbp_get_template_part( 'loop', 'forums' ); ?> <?php endif; ?> <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php elseif ( !bbp_is_forum_category() ) : ?> <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?> <?php endif; ?> <?php endif; ?> <?php do_action( 'bbp_template_after_single_forum' ); ?> </div>save and then try it.
February 5, 2015 at 3:50 pm #157864Topic: SSL + bbp-single-forum shortcode
in forum TroubleshootingHaris Zulfiqar
Participant<div class="support-topics">[bbp-single-forum id=383269]</div>The above shortcode only works in http mode and not https mode. It stops the entire page content from rendering in SSL mode only.
Nope, this is not an HTML or CSS issue.
Any ideas?
February 5, 2015 at 1:19 pm #157857In reply to: Adding Custom View Shortcode
Robin W
Moderatorsee
https://codex.wordpress.org/Class_Reference/WP_Query
and look at the heading
Order & Orderby Parameters
my guess would be
‘orderby’ => array( ‘meta_value_num’ => ‘DESC’, ‘date’ => ‘desc’ ),
`
the date is the date of the post ie topic
February 5, 2015 at 12:12 pm #157847In reply to: Stop users from making topics
Robin W
Moderatorok, no problem, I can’t judge how technical people are 🙂
You can do this in your main theme, but you would do better to create a child theme
Don’t be intimidated, the following should explain
when you get to
What is FTP and how do I access it?
To access your files, you’ll need an FTP client. Some host providers do with within their administration area, check with your host provider if in doubt
I’m pretty sure form memory that hostgator has an area that does that called c-panel, but check with them if in doubt
February 5, 2015 at 5:17 am #157810In reply to: Adding Custom View Shortcode
Robin W
Moderatorand since bbp_reply_count is in the metadata, you’d need to refer to that
see
https://codex.wordpress.org/Class_Reference/WP_Query
so something like
add_action( 'bbp_init', 'view_twentyplus_posts_init' ); function view_twentyplus_posts_init() { $args = array( 'meta_key' => '_bbp_reply_count' , 'orderby' => array( 'meta_value_num' => 'DESC', 'title' => 'ASC' ), 'meta_query' => array( array( 'key' => '_bbp_reply_count' , 'value' => '19', 'compare' => '>', ), ); ); bbp_register_view( 'twentyplus_posts', __('Popular Posts', 'twentyplus'), $args, false ); }February 5, 2015 at 3:26 am #157800a298e
ParticipantI could solve this by adding following code to function.php.
add_filter( ‘bbp_get_the_content’, ‘amend_new_topic’, 10, 3);
Function amend_new_topic ($output, $args, $post_content) {
if ($args[‘context’] == ‘topic’ && $post_content == ”) $output=str_replace(‘></textarea>’, ‘>question1 question2 question3</textarea>’,$output) ;
return $output ;
}Thanks,
February 4, 2015 at 2:01 pm #157766In reply to: Adding Custom View Shortcode
Robin W
Moderatoryour code says
'_bbp_reply_count' => '19'shouldn’t that be
'_bbp_reply_count' => '>19'February 4, 2015 at 1:50 pm #157764In reply to: Adding Custom View Shortcode
Twist360
ParticipantSadly not,
add_action( 'bbp_init', 'view_twentyplus_posts_init' ); function view_twentyplus_posts_init() { //$args = array( '_bbp_topic_reply_count' => '>20' ); $args = array( '_bbp_reply_count' => '19' ); bbp_register_view( 'twentyplus_posts', __('Popular Posts', 'twentyplus'), $args, false ); }Shows me posts with no responses 🙁
February 4, 2015 at 1:16 pm #157763Topic: Import Forums
in forum TroubleshootingSpringgg
ParticipantMaybe I’m blind but …
I’ve just installed bbPress plugin to my WP, with the idea to import Mingle forums but “Getting There” is not getting me anywhere as there is no Import Forums tab.
The only tabs there are All Forums and New Forum

Am I in the wrong place or…?Help please! 🙁
February 4, 2015 at 12:40 pm #157755In reply to: User role upgrade
Robin W
Moderatorok, getting there, but a solution brief would be good. ie a long description of exactly what you want.
If it’s easy, I’ll drop some code
If not, I might look at it as a project
February 4, 2015 at 11:57 am #157748In reply to: Participants aren’t able to edit their own topics
Martyn Chamberlin
ParticipantHi Robin,
Okay, I’m just now realizing that we have two problems going on here then.
1. Problem #1 was a universal to bbPress problem, and your code above fixes that.
2. Problem #2 is the fact that at http://thewritepractice.com/bw, the forum does not realize that you are the author of the topic you’re posting. There is no Edit button in the in-box area. Only when I enable “Edit others topics” for Participants via the bbPress Advanced Capabilities plugin do you then see the Edit link in the in-box area.
Any ideas on how we can fix this problem, and what might be causing it?
February 4, 2015 at 8:41 am #157734In reply to: Move the textarea to the top of the page
Robin W
Moderatorok,
create a directory on your theme called ‘bbpress’
ie wp-content/%your-theme-name%/bbpress
find
wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php
Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/%your-theme-name%/bbpress/content-single-forum.php
bbPress will now use this template instead of the originalthen change lines
<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'form', 'topic' ); ?> <?php elseif ( !bbp_is_forum_category() ) : ?> <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?> <?php bbp_get_template_part( 'form', 'topic' ); ?> <?php endif; ?>to
<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?> <?php bbp_get_template_part( 'form', 'topic' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php elseif ( !bbp_is_forum_category() ) : ?> <?php bbp_get_template_part( 'form', 'topic' ); ?> <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?> <?php endif; ?>and save
that should do it
February 4, 2015 at 4:55 am #157721In reply to: Participants aren’t able to edit their own topics
Robin W
Moderatorok, the following code removes the edit for bbpress, but leaves it for normal wordpress pages
function wpse_remove_edit_post_link( $link ) { if (is_bbpress()) return '' ; else return $link ; } add_filter('edit_post_link', 'wpse_remove_edit_post_link');The users will still be able to edit their topics and replies via the in-box edit buttons
February 3, 2015 at 9:14 pm #157711In reply to: Participants aren’t able to edit their own topics
Martyn Chamberlin
ParticipantWow. Crazy that nobody has ever tried to use that feature before!
Here’s the interesting thing though. WordPress.org’s support forum is (I’m 99% sure) built in bbPress and it does successfully allow you to edit topics that you’ve posted. The interface you are sent to when editing your topic does not reside inside the WordPress admin area. Rather it is right there on the publicly facing page.
I wonder how they are doing that?
Another interesting wrinkle in this whole thing is that according to the bbPress User Roles and Capabilities, participants should be able to edit their own topics.
February 3, 2015 at 9:05 pm #157710Manny Rodrigues
ParticipantI too had this issue and found countless other posts dated many years ago with no solution. I am using bbpress v2.5.4 and buddypress v2.1.1 on WordPress v4.1. I “resolved” this by editing my functions.php file within the bbpress plugin directory and replacing any character values with a blank. Good enough for me. This “solution” IS NOT RECOMMENDED as any update to bbpress is more than likely to overwrite it. Unless you don’t mind going back in and remembering to re-hack it after each update. No doubt it can be done better. The client just requested I get rid of the code values. Without further to do…
GoTo: yoursite\wp-content\plugins\bbpress\includes\common\functions.php
Between Lines 1090 and 1091 Add:
$search_bbpress_titles = array("&# 039;", "&am p;", "R 11;", "&qu ot;"); // ' & - " $topic_title = str_replace($search_bbpress_titles, '', $topic_title);Then add the same two lines further down between Lines 1233 and 1234.
NOTE: You will have to remove the spaces from the $search_bbpress_titles array line as I was unable to post without it parsing that line. Don’t know the coding on this form to post properly. Email me if you need the code.
Looking forward to any other helpful input. No need to remind me how better you are at coding. 🙂
-
AuthorSearch Results