synergywp1 (@synergywp1)

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, I can help you with this. I am doing the same and needed to figure it out as well. Hopefully they’ll add this in updated versions… Seems like a basic feature that can add awesome visual option via CSS. Anyways, I will assume you know a bit of CSS. For the PHP, I recommend that you create a folder “bbpress” inside your WP theme folder, i.e. wp-content/themes/yourtheme/bbpress Then go to /plugins/bbpress/bbp-theme-compat/bbpress and copy/paste the file “loop-single-reply.php” to your newly created bbpress folder from above. What this does is now make bbPress use that file instead of the default one. Now you can make changes to it and not worry about updates to bbPress overwriting your changes. On line ~ 30, you’ll see an opening DIV with id=”post-*some php”…

    On the next line, enter this:

    $reply_id = bbp_get_reply_id( $reply_id );
    $abc_role = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );

    Then the next line that’s already there should be:

    div class="bbp-reply-author"

    Turn it into this:

    div class="bbp-reply-author ?php echo $abc_role ?>"

    Add the bracket < before the first ?php in that above statment… I dont know why its not letting me show it.

    And there you have it. The CSS class name will now contain the verbatim user role… This means that "Key Master" will actually be in the class.. No problem, just use:

    div.Key { color: #abc }

    to target the admin. Sure, “Master” will be in there but, but it’ll be taken as 2 different classes, “Key” and “Master”. With additional pvp, you could turn it into “keymaster” but its not necessary for 99.9% of applications and would just run more PHP. I’m literally doing this right now, so i havent checked other template files, but it’s the same thing.. So for instance, if you want to change the css in the index for only admins, to have lets say a special color link, find the template file that displays the index, add that same snippet in, and it will work the same. have fun. 🙂



    Thanks again Jaredatch and JJJ. Very good insight.

    The site’s forum will pick up and to a pretty fair degree soon, which is why i thought to plan ahead. But you’re right, one step at a time, and revenue generated in relation to the number of posts/forum popularity will make it easy to remedy any performance problems like you’ve mentioned.

    I’ll be using W3TC, as I do already on the site. So I suppose I’ll be looking in on how to best optimize it for use with bbPress.

    Thanks again gentleman.



    Thanks Jaredatch,

    So the WordPress support forums have been around for as long as I’ve worked with WP. Well after that though, bbPress was still in standalone form, thus a different database. Is it better to have a site with lots of posts and comments (essentially posts) on the same database as the bbPress forums? (essentially posts)

Viewing 3 replies - 1 through 3 (of 3 total)