Forum Replies Created
-
In reply to: Cant access forum
great – glad you are fixed !
In reply to: Cant access forumSuspect you are using php 7.1
so 3 fixes
1. downgrade to a lesser version of php
2. upgrade to bbpress 2.6rc3
3. in bbpress 2.5.13 in includes/forums/functions.php
change line 1851 from
$meta_query = $posts_query->get( ‘meta_query’ );
to
$meta_query = $posts_query->get( ‘meta_query’, array() );
and change line 1796 from$post_stati = $posts_query->get( 'post_status' );
to
$post_stati = $posts_query->get( ‘post_status’ ); if (!is_array($post_stati)){ $post_stati = array($post_stati); }
In reply to: Remove Settings Capability for Editorskicked it round some more, and got to this as a better answer
add_filter( 'bbp_get_caps_for_role', 'rew_moderator', 10, 2); function rew_moderator ($caps, $role) { if ($role == bbp_get_moderator_role() ) { $caps['edit_others_forums'] = true ; $caps['delete_forums'] = true ; $caps['delete_others_forums'] = true ; } return $caps ; } add_filter ('bbp_map_forum_meta_caps', 'rew_mod', 10,4) ; function rew_mod ( $caps, $cap, $user_id, $args) { switch ( $cap ) { case 'bbp_forums_admin' : if ( user_can( $user_id, 'moderate' ) ) { $caps = array( 'moderate' ); } case 'edit_forums' : case 'edit_others_forums' : if ( user_can( $user_id, 'moderate' ) ) { $caps = array( 'moderate' ); } } return $caps ; }
In reply to: Remove Settings Capability for Editorsok, I’ve been kicking this around for the last 3 hours!!
Capabilities are spread all over the files in bbpress, so it’s taken a while to get to something.
But I’ve learnt some good stuff along the way !!
This is close to a perfect solution, and seems workable
add_filter ('bbp_register_forum_post_type', 'rew_change') ; function rew_change () { $rew = array( 'labels' => bbp_get_forum_post_type_labels(), 'rewrite' => bbp_get_forum_post_type_rewrite(), 'supports' => bbp_get_forum_post_type_supports(), 'description' => __( 'bbPress Forums', 'bbpress' ), 'capabilities' => bbp_get_topic_caps(), 'capability_type' => array( 'forum', 'forums' ), 'menu_position' => 555555, 'has_archive' => bbp_get_root_slug(), 'exclude_from_search' => true, 'show_in_nav_menus' => true, 'public' => true, 'show_ui' => current_user_can( 'moderate' ), 'can_export' => true, 'hierarchical' => false, 'query_var' => true, 'menu_icon' => '' ) ; return apply_filters( 'rew_change', $rew ); } add_filter( 'bbp_get_caps_for_role', 'rew_moderator', 10, 2); function rew_moderator ($caps, $role) { if ($role == bbp_get_moderator_role() ) { $caps['edit_others_forums'] = true ; $caps['delete_forums'] = true ; $caps['delete_others_forums'] = true ; $caps['publish_forums'] = true ; $caps['read_private_forums'] = true ; $caps['read_hidden_forums'] = true ; $caps['edit_forums'] = true ; } return $caps ; }
The line
'capabilities' => bbp_get_topic_caps(),
should say
'capabilities' => bbp_get_forum_caps(),
and my 2nd filter should then make that work, but for whatever reason it doesn’t.
But as it gives the topic permissions which for a moderator are what you want for forums, it should be fine.
try this in the additional css of the theme
dashboard>appearance>customise>additional css
.entry-header, .entry-content, .entry-summary, .entry-meta { max-width: 604px; }
and amend max width to whatever you want
In reply to: Forum Root Slug & Page Name Problemsyou need to get bbpress to use the correct theme template
see
item 8
In reply to: Remove Settings Capability for Editorsbbp capabilities are allocated against bbpress roles, so suspect that it would be easier to add forums to the moderator role
I think the capability you need to add is
bbp_forums_admin
so set to user to moderator and add the above capability to preferably the moderator role but could be the editor role
In reply to: Remove Settings Capability for EditorsIf you set them as moderators, then they don’t get forums in the dashboard
In reply to: group forum slugsorry that sounds buddypress to me, so I’ll back out
In reply to: Threaded Replies not workingI wish a plugin developer would chime in here, but that doesn’t seem likely.
I’m not sure how often they visit, but looks like you done some great stuff here.
I’ve made a note of this thread and I’ll post a trac ticket (bug report) shortly
Can you just confirm what version of bbpress you are using, and if not bbPress 2.6 Release Candidate 3, can you just check that the code is not improved in this – you’ll do this much faster than me.
In reply to: group forum slug@triixx – not sure what you are asking. The solution is listed in my response
Dashboard>settings>forums>etc.
In reply to: New user difficulty and log in problemsno problem, thanks for updating us
In reply to: group forum slugsilly question, but why not just change it in
Dashboard>settings>forums>etc.
and you are using a buddypress hook, not a bbpress one – bbpress is bbp_init and all your code refers to buddypress.
In reply to: Only show forum with contentno problem !!
In reply to: Forum category with subforum not displaying topicsit’s do-able but would require some code
in essence you need to hook to an action
‘bbp_template_after_topics_loop’
install bbp-style-pack
and then code to [bsp-display-topic-index show=’5′ forum =’10’] with a list of forum ID’s for each category.
I’m out of time to attempt this before my holidays, but above to remind me if you want to bump this topic in a few weeks time, I’ll see if I can fund some time to code
In reply to: Adding Widgets and Sidebars to all forum pagesIt’s all tied up with the theme’s page code
This all gets very code oriented, hence suggestion to go to theme provider
however if you’re a bit into code try
In reply to: Avatar freshnessok, so ‘are you certain that you have tested with a vanilla theme and no other plugins?’ means without wplms.
I remain fairly sure that the issue is wplms
In reply to: Adding Widgets and Sidebars to all forum pageshmm…. your theme is using lots of clever functions within the theme to do the page layout, which means I can’t say what you need to alter.
I’d suggest you contact your theme provider for help.
In reply to: Avatar freshnessCan you tell me where this setting is? I do not know of one in the base set-up, which makes me suspect you have something else, which may well also be causing the avatar not to display.
If you could answer in terms of go to dashboard>settings etc. that would be helpful.
In reply to: Can not open Forumsorry – don’t know what to suggest next.
Maybe contact you host provider
In reply to: Adding Widgets and Sidebars to all forum pagesok, you’ll need to be using the right template – see
item 8
In reply to: Multiple Forum Indexessorry – I’m not the right person to ask – I just support and leave the dev to others. Can’t comment on performance.
Sounds unhelpful – but not meant to be 🙂
In reply to: How to add a sidebarlooks like you’ve succeeded – do you still need help?
In reply to: Adding Widgets and Sidebars to all forum pageslooks like you’ve succeeded – do you still need help?
In reply to: Crash Victimyou will need to define what ‘all things have failed.’ means
Is you site at all accessible?