Search Results for 'code'
-
Search Results
-
I have a custom wp role that I have displaying under each user author link in all replies. There are different custom roles depending on the user. I was able to use it by implementing this snippet (inserted on loop-single-reply.php):
<?php $user = new WP_User( bbp_get_reply_author_id() ); echo $user->roles[0]; ?>My question is how to get some text (with link) to show if a user has a specific custom role. For example, is user has “Graduate” role, I need a link with text to show under the role, in all the replies for all users.
I’m not coder by any means, but I realize it will probably take a php “if” statement. Any suggestions on how I might accomplish this? Thanks for any help.

I’m trying to add a forum description. I used
<?php bbp_forum_content(); ?>in loop-single-forum and didn’t work! Any other way I can do this? I have not modified any theme fifle, I simply copied loop-forums & loop-single-forums into my bbpress folder in my them folder
Hello,
I got an issue while trying to put a background color under the role name on my forum.
I added this to my function file :
function rk_show_role_classes($classes) { $replyid = bbp_get_reply_author_id(); $bbp_get_role = bbp_get_user_display_role($replyid); $bbp_display_role = strtolower($bbp_get_role); $classes[] = $bbp_display_role; return $classes; } add_filter( 'bbp_get_topic_class','rk_show_role_classes' ); add_filter( 'bbp_get_reply_class','rk_show_role_classes' );and this into my css file :
#bbpress-forums .participant .bbp-author-role { background-color: blue; #bbpress-forums .keymaster .bbp-author-role { background-color: red; #bbpress-forums .moderator .bbp-author-role { background-color: green;But it only works with the participant role. Maybe I’m not using the correct keymaster and moderator role name. Is someone already did that and can help me to sold it out ?
Thanks!
So Buddypress, by default, has a nifty @function that allows you to look up users by username. As I understand it, bbpress works with this out of the box, in the reply boxes. However, when I enable TinyMCE using the tutorial above (https://codex.bbpress.org/enable-visual-editor/), Buddypress autocomplete goes away completely. We’d rather not have to choose between these two features, is there a way to restore autocomplete even with TinyMCE enabled?
Topic: preg_replace /e modifier
After upgrading to PHP 5.5 and running a compatibility test on a site, it has flagged the use of a deprecated modifier being used in preg_replace functions.
These occur on lines 1149 and 1150 in file /includes/admin/parser.php1149 | ERROR | preg_replace() – /e modifier is deprecated in PHP 5.5
1150 | ERROR | preg_replace() – /e modifier is deprecated in PHP 5.5Could you please let me know the best way to replace the code with the preg_replace_callback function and let me know if this is likely to be updated in a future patch as this can be seen as a security concern.
Thank you
Topic: code doesn’t work
Hi guys,
for some reason , in our bbpress forum (http://mdbootstrap.com/forums/forum/support/) code tag doesnt work . Regardless whether we use it or not all HTML markups are executed instead of displayed. The only way to display it is to replace all <> with > and <
Any idea?
Topic: Global Access
the codex mentions this for Allow Global Access
In a WordPress Multisite install bbPress is activated on individual sites. Allowing global access will permit all users from across the network to post topics and replies on the forums for this particular site.i activated bbpress per site on my 3 network sites. still i dont see any setings for global access? does global access happen by default?
Also is there some similar setting for bbpress like buddypress’s define(‘BP_ENABLE_MULTIBLOG’, true);?
i got define(‘BP_ENABLE_MULTIBLOG’, true); enabled for my wp+bp multinetwork. But forums on the root site dont show up on the sub sites like groups/members do with that setting enabled.
Thanks in advance.
Hello,
I have a forum currently set up for our organization. I am using some fellow employees to test it but it looks like people are able to go in and make posts for our blog (saved but not published in the Contributor, Participant roles). I don’t want that. Users should only be able to post to our website forum, and nothing else. Is there a line of code that I’m missing for this?
I would also like to know if there is a way to mask being able to see one another user’s posting stats. TIA!
website is creatingourcommonwealth.org. Our WordPress template is Ribosome, if that helps any.
I’ve successfully imported phpBB data into bbPress. Now, I’d like to redirect URLs like
http://my_phpbb_domain.com/viewtopic.php?f=1&t=2
to:
http://my_wordpress_domain.com/forums/topic/corresponding_topic/I’ve search the web and have been experimenting with several solutions but without any luck. Anything I do throws a 404.
These are some of the links I tried out:
As you can see, these topics are at least 7 years old. On the other hand, I don’t expect that something has changed on how to write redirects in an htaccess file.
Does somebody here has some experience with this?
Topic: Member Activity Shortcodes
Are there shortcodes for getting a member/user’s recent posts or comments? I don’t see anything like this in the documentation. It seems like a rather basic thing to have with a bulletin board or forum.
Hi All,
After configuring the importing form and clicking the start button, a failure message appears after amount of time;
Unknown column 'forums.forum_topics' in 'field list'After clicking again on the start button only the reactions will be converted from phpBB to bbpress.
How can I import the topics and users properly, without encounter these failures?
Grtz.
Willem