Search Results for 'code'
-
Search Results
-
Topic: bbPress User Ranks Released
Hi,
Just wanted to share a newly released plugin available called bbPress User Ranks and it allows you to create user ranks, star ranks, RPG ranks, user badges and month badges which display on forums and user profiles. It also has widgets and shortcodes.
You can view all the features and screenshots here:
http://pre55.com/downloads/bbpress-user-ranks/
You see the free lite version here:
https://wordpress.org/plugins/bbp-user-ranks-lite/
The plugin was created as I had been using the brilliant bbp user ranks plugin created by Robin W and although this worked great for what I initially wanted I eventually needed something a little more custom.
I have therefore built my plugin from scratch incorporating lots of great features I think will increase engagement for any bbPress forum.
Let me know what you guys think, if you have any suggestions please let me know.
Topic: Problem with custom role
Wordpress : WordPress 4.7.4 avec le thème BlackFyre.
bbpress : Version 2.5.12
http://www.vieuxetmechants.com/Hello i’ve created custom and i don’t understand the role MembreVetM can’t edit or delete their own post
function add_new_roles( $bbp_roles ) { $bbp_roles['bbp_gamer'] = array( 'name' => 'Gamer', 'capabilities' => custom_capabilities( 'bbp_gamer' ) ); $bbp_roles['bbp_membrevetm'] = array( 'name' => 'MembreVetM', 'capabilities' => custom_capabilities( 'bbp_membrevetm' ) ); $bbp_roles['bbp_veteran'] = array( 'name' => 'Vétéran', 'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) ); $bbp_roles['bbp_officier'] = array( 'name' => 'Officier', 'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) ); return $bbp_roles; } add_filter( 'bbp_get_dynamic_roles', 'add_new_roles', 1 ); function add_role_caps_filter( $caps, $role ) { /* Only filter for roles we are interested in! */ if( $role == 'bbp_gamer' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_membrevetm' ) $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 ) { case 'bbp_gamer': 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' => false, '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' => false, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => false, 'delete_replies' => false, 'delete_others_replies' => false, 'read_private_replies' => false, // Topic tag caps 'manage_topic_tags' => false, 'edit_topic_tags' => false, 'delete_topic_tags' => false, 'assign_topic_tags' => false, ); case 'bbp_membrevetm': 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' => true, 'delete_others_topics' => false, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => false, 'delete_replies' => true, 'delete_others_replies' => false, 'read_private_replies' => true, // Topic tag caps 'manage_topic_tags' => true, 'edit_topic_tags' => false, 'delete_topic_tags' => true, 'assign_topic_tags' => true, ); break; default : return $role; } }Topic: Update pagination values
Hello,
I’m using a plugin to integrate Amazon CloudSearch on my site. Whenever I exclude private topics from search results or private forums from search results, I might use some code like this.
function exclude_private_topics_search() { $topic_id = bbp_get_topic_id(); if(gdbbx_is_topic_private($topic_id) ) { add_post_meta($topic_id, 'acs_exclude', 1, true ); } else { delete_post_meta($topic_id, 'acs_exclude'); } } add_action('bbp_new_topic', 'exclude_private_topics_search' ); add_action('bbp_edit_topic', 'exclude_private_topics_search' ); function exclude_private_forums_search() { $forum_id = bbp_get_forum_id(); if (get_post_status($forum_id) == 'private') { add_post_meta($forum_id, 'acs_exclude', 1, true ); } else { delete_post_meta($forum_id, 'acs_exclude'); } } add_action('bbp_new_forum', 'exclude_private_forums_search' ); add_action('bbp_edit_forum', 'exclude_private_forums_search' );The problem is this does not update pagination counts. For example if 2 topics that are private are hidden and there are 5 topics in the forum, it will still display a total of 5 topics instead of 3 topics. How can I update the pagination values if there are less topics displaying AKA private ones?
Thanks.
Topic: Grab topic IDs from forum ID
Hello,
I have a plugin that is used to index search results in to Amazon CloudSearch. I’ve written the below code to exclude private forums from search results. Now I need some code to automatically exclude all topics inside a private forum.
function exclude_private_forums_search() { $forum_id = bbp_get_forum_id(); if (get_post_status($forum_id) == 'private') { add_post_meta($forum_id, 'acs_exclude', 1, true ); } else { delete_post_meta($forum_id, 'acs_exclude'); } } add_action('bbp_new_forum', 'exclude_private_forums_search' ); add_action('bbp_edit_forum', 'exclude_private_forums_search' );Is there anyway I can get a list of topic IDs inside a forum ID?
Running latest version of bbPress and WordPress.
Thanks.
main theme has breadcrumbs that don’t match forum breadcrumbs. In a perfect world I’d like
Home / Forum / Feedback / Marginally Clever Site Questions/Comments
I think I can hide the breadcrumbs with
div.bbp-breadcrumb { display: none; }but that won’t fix the upper breadcrumb.
Please: what do you advise?
Hi all
Shared Windows hosting.
WordPress 4.6.5 running Karma theme.Hosting provider will not change the IIS config for just me, they recommend me adding a Linux shared hosting and host the bbpress on that server, external to the site.
When I search with one word – it works fine. When I search with two words it gives the error:
HTTP Error 404.11 – Not Found
The request filtering module is configured to deny a request that contains a double escape sequence.Most likely causes:
The request contained a double escape sequence and request filtering is configured on the Web server to deny double escape sequences.Things you can try:
Verify the configuration/system.webServer/security/requestFiltering@allowDoubleEscaping setting in the applicationhost.config or web.confg file.Detailed Error Information:
Module RequestFilteringModule
Notification BeginRequest
Handler ExtensionlessUrlHandler-Integrated-4.0
Error Code 0x00000000
Requested URL https://www.ciproza.co.za:443/forums/search/annual+returns/
Physical Path D:\Websites\ciproza.co.za\httpdocs\forums\search\annual+returns\
Logon Method Not yet determined
Logon User Not yet determinedMore Information:
This is a security feature. Do not change this feature unless the scope of the change is fully understood. You should take a network trace before changing this value to confirm that the request is not malicious. If double escape sequences are allowed by the server, modify the configuration/system.webServer/security/requestFiltering@allowDoubleEscaping setting. This could be caused by a malformed URL sent to the server by a malicious user.
View more information »Anybody got a solution for me?
Hi.
According Enable visual editor I put on my child theme’s functions.php code
`// Additional Functions
// =============================================================================// bbPress Visual Editor
function bbp_enable_visual_editor( $args = array() ) {
$args[‘tinymce’] = true;
$args[‘teeny’] = false;
return $args;
}
add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );`But not work.
Also I try to install plugin TinyMCE Advanced but not work.
I’m using X Theme (Theme.co)