hey guys, im a complete noob to this whole CSS and webdesign stuff and need some help
I am trying to increase the size of the font in the forum titles, (the info, topic, replies and freshness)
i used this piece of css code but it isn’t working
#bbpress-forums ul.bbp-lead-topic,
#bbpress-forums ul.bbp-topics,
#bbpress-forums ul.bbp-forums,
#bbpress-forums ul.bbp-replies,
#bbpress-forums ul.bbp-search-results
{
font-size: 13px;
}
(the theme i am using gives me a built in css sheet to pop any snippets that i may require in there and updates it live without going into the back end)
here is the link to my forum.
http://kamikazenoodle.co.uk/forums/
Hello to all the bbPress Scientists out there.
I am almost mad about to show bbPress User Role on BuddyPress Profile Page. And I am currently using this code, but it is not perfect and correct.
function show_user_role ()
{
global $bp;
$reply_id = bbp_get_reply_id( $reply_id );
$abc_role = bbp_get_user_display_role( bbp_get_reply_author_id( $reply_id ) );
echo '<span class="profile-role ' . $abc_role . '"><i class="fa fa-star"></i> <em>';
echo $abc_role;
echo '</em></span>';
}
add_action( 'bp_before_member_header_meta', 'show_user_role' );
The demo output can be seen on http://www.punjabi.cc/ website by visiting any members profile.
First problem with this code is, it does not show correct name for dynamic roles when user is not logged in.
Second problem, the users who are blocked also tagged ‘Member’ not ‘Blocked’.
Please either correct it or provide me a another perfect piece of code, I will be highly thankful.
Regards,
Laddi
How do I go about getting into and editing the coding for the “img” button?
Currently the code that is applied is (img src=”xxxxxxxx” alt=”ffs” /) with the ( ) being < > and the xxx’s being the images URL.
I want to change the coding to (url=xxxxx)(img)xxxxx(/img)(/url) with the parentheses replaced with square brackets and xxxxx with the photo’s url.
By doing so, the images can be clicked which would open a lightbox
Thanks in advance for the help.
Wordpress 4.1
bbPress 2.5.4-5380
Well, Robin, I just heard back from my host provider and all possible checks were done and an error code:
Code:
brk(0x5419000) = 0x5419000
— SIGSEGV (Segmentation fault) @ 0 (0) —
is what was found and they said it’s back to you.
Now what?
Bob.
This is a theme issue.
You need to get bbpress to use the right theme template if possible.
Suggest you look at
Step by step guide to setting up a bbPress forum – Part 1
and/or check with the theme author
Hello. I have been trying to rename the navigation menu “forum” within groups.
Currently, I have this code implemented
function jm_move_group_activity_tab() {
global $bp;
if (isset($bp->groups->current_group->slug) && $bp->groups->current_group->slug == $bp->current_item) {
$bp->bp_options_nav[$bp->groups->current_group->slug]['forum']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['home']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['members']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['admin']['name'] = 'new name';
$bp->bp_options_nav[$bp->groups->current_group->slug]['send-invites']['name'] = 'new name';
}
}
add_action('bp_init', 'jm_move_group_activity_tab');
Everything works except for ‘forum’
Yes I have the code, but the file to edit and where exactly to paste the code.
Do you know what the code is that you would add at that location?
ok, gentle response !!
your forum is sitting within a class of .entry-content which is set to max-width: 474px;
so you need to add
.entry-content {
max-width: 100% !important;
}
to your theme style.css at the end
Strictly speaking you should add this to a child theme
Functions files and child themes – explained !
but if you add it to your main theme, juts keep a note of it, as you will need to re-add it should your theme be updated
Come back if anything not clear, and I’ll help further !
I want to add ShareThis sharing button at the top and bottom of every posts, but I dont know which file to edit and where exactly to add the code. Please someone guide me through. Am using bbpress 2.5.4 wordpress 4.1
you can have a look at this screenshot to understand what I really need,
http://s1382.photobucket.com/albums/ah248agbams/?action=view¤t=sharethis_zps1df4998b.png
ok, I’m planning to write some code for another purpose that will be using this function in the next few days, when I do I’ll take a look
Hi there,
I’m looking for an option to hold new topics by non-admin users in moderation for approval before they are visible. I’ve tried looking at this plugin: https://wordpress.org/plugins/bbpressmoderation/ but it deals with topics and replies together- you have to moderate both or not moderate both. I’m not interested in moderating replies, just topic starters.
Could anybody by any chance suggest a different plugin, a code snippet to use etc. to work around this issue?
(I’m running the latest versions on WordPress, BuddyPress and bbPress).
Thank you very much!
I had to create several new users but I could not just copied and paste the code again so I modified the code a bit
//code to add expert role
function add_expert_role( $bbp_roles )
{
/* Add a role called expert */
$bbp_roles['bbp_expert'] = array(
'name' => 'expert',
'capabilities' => custom_capabilities_expert( 'bbp_expert' )
);
return $bbp_roles;
}
add_filter( 'bbp_get_dynamic_roles', 'add_expert_role', 1 );
function expert_role_caps_filter( $caps, $role )
{
/* Only filter for roles we are interested in! */
if( $role == 'bbp_expert' )
$caps = custom_capabilities_expert( $role );
return $caps;
}
add_filter( 'bbp_get_caps_for_role', 'expert_role_caps_filter', 10, 2 );
function custom_capabilities_expert( $role )
{
switch ( $role )
{
/* Capabilities for 'expert' role */
case 'bbp_expert':
return array(
// Primary caps
'spectate' => true,
'participate' => true,
'moderate' => false,
'throttle' => false,
'view_trash' => false,
// Forum caps
'publish_forums' => false,
'edit_forums' => false,
'edit_others_forums' => false,
'delete_forums' => false,
'delete_others_forums' => false,
'read_private_forums' => true,
'read_hidden_forums' => false,
// Topic caps
'publish_topics' => true,
'edit_topics' => true,
'edit_others_topics' => false,
'delete_topics' => false,
'delete_others_topics' => false,
'read_private_topics' => true,
// Reply caps
'publish_replies' => true,
'edit_replies' => true,
'edit_others_replies' => false,
'delete_replies' => false,
'delete_others_replies' => false,
'read_private_replies' => true,
// Topic tag caps
'manage_topic_tags' => false,
'edit_topic_tags' => false,
'delete_topic_tags' => false,
'assign_topic_tags' => true,
);
break;
default :
return $role;
}
}
This creates the role Expert. I put this in my functions.php of my child-theme
I do it with this snippet. For WordPress and bbPress together. Local links are opened normally, only extern are target blank. Dont forget to change your domain line.
// Make URL Clickable In WordPress, bbPress (plus target=”_blank”)
add_filter( 'the_content', 'make_clickable');
function autoblank($text) {
$myurl = 'http://your-domain.com';
$external = str_replace('href=', 'target="_blank" href=', $text);
$external = str_replace('target="_blank" href="'.$myurl, 'href="'.$myurl, $external);
$external = str_replace('target="_blank" href="#', 'href="#', $external);
$external = str_replace('target = "_blank">', '>', $external);
return $external;
}
add_filter('the_content', 'autoblank');
add_filter('bbp_get_topic_content', 'autoblank',255);
add_filter('bbp_get_reply_content', 'autoblank',255);
Remove nofollow if you need to !
function mtn_weekly_fix_rel_follow( $content ) {
// Find rel="nofollow", replace with empty space.
$content = preg_replace( '/rel="nofollow"/', ' ', $content);
return $content;
}
add_filter( 'the_content', 'mtn_weekly_fix_rel_follow', 20 );
add_filter('bbp_get_topic_content', 'mtn_weekly_fix_rel_follow',255);
add_filter('bbp_get_reply_content', 'mtn_weekly_fix_rel_follow',255);
wherever it says (think it’s more than once)
'type' => 'both', 'size' => 14 ) );
change to
'type' => 'name', 'size' => 14 ) );
I am using a wordpress skin that integrates BBPress very nicely. One thing I am looking to do, however is make the bbpress forums have a hierarchy like any other software out there currently. I am not that amazing at coding and would appreciate if someone could explain in an easy to understand way. If it’s something that I would have to code completely over, i’d be willing to pay someone to help me code that.
Thank You
add the following to your functions file
add_filter('private_title_format', 'pg_remove_private_title');
function pg_remove_private_title($title) {
return '%s';
}
Functions files and child themes – explained !
That worked perfectly! And the code you mentioned earlier in the thread is perfect. Thanks for your help 🙂
You’ll need to register it for it to go live, try the following in your functions file
add_action( 'widgets_init', function(){
register_widget( 'BBP_Topics_Widget2');
});
I copied the entire Recent Topics widget code into my functions.php
You need to copy and rename it.
Then you use this new named widget, not the old one, so need to cal the new name in your sidebar.
Hi Robin
I’m trying to get the same functionality that SeeingBlue is looking for. I copied the entire Recent Topics widget code into my functions.php, and I added your code in the correct place, but the widget is still behaving exactly the same.. Any idea what else I need to do?
Thanks
Van
it could be just making the font-size smaller.
copy this CSS anywhere you can put custom CSS
#bbpress-forums div.bbp-forum-author a.bbp-author-name,
#bbpress-forums div.bbp-topic-author a.bbp-author-name,
#bbpress-forums div.bbp-reply-author a.bbp-author-name {
font-size:12px;
}
@discdemo
remove Dougs code and see if just using this will fix it. it does the same thing.
https://wordpress.org/plugins/bbpress-enable-tinymce-visual-tab/
also see if deactivating wp-edit will fix the problem , i tried it awhile ago with the visual editor code and it was kind of buggy.