Search Results for 'code'
-
AuthorSearch Results
-
September 7, 2016 at 12:09 am #177679
In reply to: Threaded layout
Stephen Edgar
KeymasterI’m pretty sure you’d be able to get what you’re after đ
Once bbPress is activated, enable “threaded replies” in the settings.
Use
bbp_show_lead_topic(), grab the snippet from https://codex.bbpress.org/bbp_show_lead_topic/ and create a custom plugin using that code snippet.Then I’d suggest hoping over to the docs and do some reading:
September 6, 2016 at 2:02 pm #177667In reply to: text visibility
Robin W
ModeratorThat’s IE for you !
For some reason that I can’t immediately see, IE is ignoring the background setting, so is just saying it has no background so showing white
I’d suggest you try changing line 999 on dark.css from
/*media all*/ media screen #bbpress-forums fieldset.bbp-form p, #bbpress-forums fieldset.bbp-form textarea, #bbpress-forums fieldset.bbp-form select, #bbpress-forums fieldset.bbp-form input { background: rgba(18, 21, 24, 1); color: #fff !important; border: 0px !important; }to
/*media all*/ media screen #bbpress-forums fieldset.bbp-form p, #bbpress-forums fieldset.bbp-form textarea, #bbpress-forums fieldset.bbp-form select, #bbpress-forums fieldset.bbp-form input { background: rgba(18, 21, 24, 1) !important; color: #fff !important; border: 0px !important; }It may or may not work !
September 6, 2016 at 1:41 pm #177663In reply to: Participants cannot see topics in private forums
evanevans333
ParticipantI got the white screen of death with that code. The following error message:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘add_role_caps_filter’ not found or invalid function name in /home3/filmsco/public_html/testwebsite/wp-includes/plugin.php on line 235
Had to add this to the top from your prior code:
function add_role_caps_filter( $caps, $role )
{
/* Only filter for roles we are interested in! */
if( $role == ‘bbp_participant’ )
$caps = custom_capabilities( $role );
return $caps;
}P.S. Is this new code any different than the last code?
September 6, 2016 at 3:52 am #177654In reply to: Participants cannot see topics in private forums
Robin W
Moderatorok, I just did the following test.
Forum private, topic public
participant can readForum private, topic private
participant cannot readThe following code then added :
add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 ); function custom_capabilities( $role ) { switch ( $role ) { /* Capabilities for 'participant' role */ case bbp_get_participant_role() : return array( // Primary caps // 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; } }Forum private, topic private
participant can read !So the code works on my test site.
Can you duplicate this and come back with results?
September 5, 2016 at 10:05 pm #177645In reply to: Participants cannot see topics in private forums
evanevans333
ParticipantI came across this in a thread.
https://wordpress.org/support/topic/not-working-for-bbpress-rolesWould that be somehow useful? Probably not./** * FORUM - Role map * bbPress has its own internal ("dynamic") Roles, so we map our real wp roles to bbPress. */ add_filter('bbp_get_user_role_map','my_bbPress_role_map'); function my_bbPress_role_map($role_map){ $role_map['student'] = bbp_get_participant_role(); return $role_map; }September 5, 2016 at 9:28 am #177637In reply to: Remove bbPress forum profile URL link
crzyhrse
ParticipantYes, that is where it goes, in functions.php… I can confirm that the code is still working here… Have you cleared caches…?
September 5, 2016 at 9:02 am #177636In reply to: Remove bbPress forum profile URL link
kkpb8084
ParticipantI inputed Robin W’s code into functions.php in my child theme folder, and it didnt work. Should it go into a different file?
thanksSeptember 5, 2016 at 8:43 am #177635kkpb8084
ParticipantHi, can anyone help?
I cannot find the answer to my query from searching this forum and google.
At the moment, people need to enter a name and email to post a topic, or reply to a topic, on my forum (http://psychiatryadvice.com/).I would like to replace that with what they have at this forum: http://www.econjobrumors.com/
They seem to generate a random 4-digit code for each person posting. I am aiming for anonymity in my forum too.Does anyone know how I can do this please?
Thanks very much!I’m using:
Wordpress v 4.5.3
bbpress v 2.5.9-6017September 4, 2016 at 7:27 pm #177624In reply to: How do I change this color? (screenshot)
Robkk
ModeratorOkay your topic is closed and stickied, so adjust this css. Use a custom css plugin, or modify and place this css into a style.css file in a child theme.
#bbpress-forums .status-closed, #bbpress-forums .status-closed a { color: #ccc; }.bbp-topics-front ul.super-sticky, .bbp-topics ul.super-sticky, .bbp-topics ul.sticky, .bbp-forum-content ul.sticky { background-color: #ffffe0 !important; font-size: 1.1em; }September 4, 2016 at 4:14 pm #177622In reply to: Not work search on bbpress
Robkk
ModeratorWhat theme are you using?
EDIT: Forgot that I did make this guide for a user experiencing a similar issue.
https://codex.bbpress.org/getting-started/troubleshooting/search-redirects-to-front-page/
Although this might help, I would like to know your theme just in case it doesn’t so I could do some troubleshooting.
If its not the theme, we have to do some plugin troubleshooting.
September 3, 2016 at 10:16 pm #177613In reply to: Create a page like the support page here
Robkk
ModeratorIts a customized forum archive layout in the sidebar. I think they just put the forum index shortcode in the sidebar. Then in Settings > Forums they set the forum archive to show topics by freshness.
September 3, 2016 at 8:41 pm #177607In reply to: Genesis remove a widget area
Robkk
ModeratorI am trying to remove that from showing on the forums page and instead show a a login for bbpress.
This forum page you say, is it just the original forum index page at /forums, or is this a page that you inserted the forum index shortcode to create “forum page”??
The
is_bbpress()conditional may not work if you went the shortcode in a page route.Well unless you made sure the pages slug was the same slug as the forum root, but even with that I feel like that odd procedure could cause issues.
September 3, 2016 at 1:36 pm #177601In reply to: Genesis remove a widget area
Robin W
Moderatorok, so you need to determine if it is the is_bbpress that is the issue. If you just have the other code does it work – ie is the issue with the other code or the conditional?
September 3, 2016 at 3:04 am #177595In reply to: Which is the file to edit the layout?
Robin W
ModeratorThe file is form-topic.php
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/form-topic.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/themes/%your-theme-name%/bbpress/form-topic.php
bbPress will now use this template instead of the original
and you can amend thisHowever the form has an action hook you can link to
<?php do_action( 'bbp_theme_after_topic_form' ); ?>September 3, 2016 at 2:58 am #177594In reply to: Genesis remove a widget area
Robin W
Moderatorok, thanks for confirming.
Without spending considerable time testing, why not just take out that entire section for bbpress (and if needed juts put back the bits you want) eg
//* Hook social icons and click here widget areas add_action( âgenesis_after_headerâ, âthe_411_extrasâ, âgenesis_after_sidebar_widget_areaâ ); function the_411_extras() { if (!is_bbpress { if ( is_active_sidebar( âsocial-iconsâ ) || is_active_sidebar( âclick-hereâ ) || is_active_sidebar( âsplit-sidebar-leftâ ) || is_active_sidebar( âsplit-sidebar-rightâ )) { echo â<div class=âsite-extrasâ>â; genesis_widget_area( âsocial-iconsâ, array( âbeforeâ => â<div class=âsocial-iconsâ>â, âafterâ => â</div>â ) ); genesis_widget_area( âclick-hereâ, array( âbeforeâ => â<div class=âclick-hereâ>â, âafterâ => â</div>â ) ); genesis_widget_area( âsplit-sidebar-leftâ, array( âbeforeâ => â<div class=âsplit-sidebar-leftâ>â, âafterâ => â</div>â, ) ); genesis_widget_area( âsplit-sidebar-rightâ, array( âbeforeâ => â<div class=âsplit-sidebar-rightâ>â, âafterâ => â</div>â, ) ); echo â</div>â; } } }I’m also not sure why your add action has two functions
add_action( âgenesis_after_headerâ, âthe_411_extrasâ, âgenesis_after_sidebar_widget_areaâ );all the coding I have ever done has one, and then maybe some arguments on priority etc.
September 2, 2016 at 8:04 am #177580In reply to: Unable to edit reply as Moderator or Participant
iliyan
Participantand when I add this code to disable only visual editing everything works but I don’t want to do this:
function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = false; $args['quicktags'] = true; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );September 1, 2016 at 6:07 pm #177567In reply to: Participants cannot see topics in private forums
Robin W
ModeratorI’ve just been digging further into the code
There is a filter on topics and replies which looks at posts with a private status, but topics and replies on a private forum don’t have that status UNLESS it is manually set on the admin backend (or imported with that status). So in the normal process they are viewable unless set by a moderator/admin to private within the backend.
So a standard participant should be able to see all topics and replies.
For creating topics and replies the code just looks at ‘publish topics’ and ‘publish replies’ so allows registered users to do this for both public and private forums.
This would then make great sense for then original poster who had imported the forum, so topics and replies were likely to have a post status of private so not viewable by participants.
I don’t know if that helps you understand your circumstances, but hope it explains it better.
September 1, 2016 at 5:46 pm #177566Topic: Genesis remove a widget area
in forum Themescrayc
ParticipantHello, I am using genesis theme the-411 which has no sidebars just a fixed widget area to the right showing social icons. The site is forced full width but the container sit at about 800px I am trying to remove that from showing on the forums page and instead show a a login for bbpress. Not sure how to go about doing this. I tried the If conditional tag on there but it does not seem to work.
here is the code
//* Hook social icons and click here widget areas
add_action( ‘genesis_after_header’, ‘the_411_extras’, ‘genesis_after_sidebar_widget_area’ );
function the_411_extras() {if ( is_active_sidebar( ‘social-icons’ ) || is_active_sidebar( ‘click-here’ ) || is_active_sidebar( ‘split-sidebar-left’ ) || is_active_sidebar( ‘split-sidebar-right’ )) {
echo ‘<div class=”site-extras”>’;
genesis_widget_area( ‘social-icons’, array(
‘before’ => ‘<div class=”social-icons”>’,
‘after’ => ‘</div>’
) );genesis_widget_area( ‘click-here’, array(
‘before’ => ‘<div class=”click-here”>’,
‘after’ => ‘</div>’
) );
genesis_widget_area( ‘split-sidebar-left’, array(
‘before’ => ‘<div class=”split-sidebar-left”>’,
‘after’ => ‘</div>’,
) );
genesis_widget_area( ‘split-sidebar-right’, array(
‘before’ => ‘<div class=”split-sidebar-right”>’,
‘after’ => ‘</div>’,
) );echo ‘</div>’;
if (is_bbpress( ‘forums’ ) ) {
/** Remove default sidebar */
remove_action( ‘genesis_after_sidebar_widget_area’ );
}}
}
I added the split right and left, but I only use the right for search box. Thanks!
September 1, 2016 at 5:01 pm #177562In reply to: Participants cannot see topics in private forums
Robin W
Moderatorwe’re probably both insane !
It worked on my test site, but then I do have a lot cooking on there.
back to my code above, can you try
case bbp_get_participant_role() :in place of the line
case 'bbp_participant':September 1, 2016 at 3:14 pm #177557In reply to: Translation German
Robkk
ModeratorSo in settings > General you have Deutsch as the Sprache der Website
I am not sure why you are using files with pt_DE instead of de_DE, and wonder if that could be the issue, or you need a different kind of language file to use. Also the language file directory has changed. It is now
/wp-content/languages/pluginsSeptember 1, 2016 at 2:24 pm #177554In reply to: Participants cannot see topics in private forums
evanevans333
ParticipantI don’t think so. According to this, those caps are not listed for Participant:
But it makes sense they should be part of Participant caps right? I’m not insane? đ
September 1, 2016 at 2:22 pm #177553In reply to: Participants cannot see topics in private forums
evanevans333
ParticipantOh no kidding. Well yeah that makes sense right? On my install, even with all plugins off (except bbpress), the user Participant does not get Read Private Topics and Replies perms. Yes, I can confirm that.
I am using the Thrive Community theme by Dunkahkdis, and he said that was not happening inside his Theme and to come over to bbPress and ask in here. He’s not irresponsible either. He’s an amazing coder, and excellent with tech support. But, you never know. You never know.
So, just for clarity. You are saying, outright, that the Participant Role by default in bbPress is supposed to HAVE the caps: Read Private Topics and Replies
?September 1, 2016 at 1:05 pm #177545In reply to: Participants cannot see topics in private forums
evanevans333
ParticipantWell I still appreciate you sending over the code. I will fiddle with it, and see where it gets me. Thanks so much. AND I will report back findings, in case it does solve something, so that others will see at least one solution. Thanks!
September 1, 2016 at 7:55 am #177544In reply to: Participants cannot see topics in private forums
Robin W
Moderatorps
I just cribbed this code from elsewhere, so the capabilities may not be the participant ones, you’ll need to check what they should be
September 1, 2016 at 7:51 am #177543In reply to: Participants cannot see topics in private forums
Robin W
Moderatoruntested, but this should in theory let you play with the capabilities of the participant role
function add_role_caps_filter( $caps, $role ) { /* Only filter for roles we are interested in! */ if( $role == 'bbp_participant' ) $caps = custom_capabilities( $role ); return $caps; } add_filter( 'bbp_get_caps_for_role', 'add_role_caps_filter', 10, 2 ); function custom_capabilities( $role ) { switch ( $role ) { /* Capabilities for 'participant' role */ case 'bbp_participant': 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; } } -
AuthorSearch Results