Search Results for 'code'
-
Search Results
-
Topic: HTML tags (again sorry)
I know the subject keeps coming up, and I’ve been through the posts and I’ve added the relevant code to my functions.php all good so far.
My visual editor is inserting tags that get filtered out by BBpress. Is there any plugin that I can say a particular user can have any html? I’m wanting to add more available tags like <h1 style=”text align:center”> etc. All my efforts have failed miserably. I like BBpress, but other forum software doesn’t have these restrictions on basic text formatting.
Maybe if you can explain what the code does rather than link to an example, I haven’t a clue about arrays or what => etc means and the syntax. I just want users to be able to add heading tags and a few other basic text formatting options to tie in with their visual editor.
Thanks in advance
Topic: Incorrect topics count
I use this function to display the total topics count for a single forum:
bbp_get_forum_topic_countIf I change the forum parent to –No Parent —, the topic dissapears from forum section but the count does not change. See the image below:


—————–
bbPress version: 2.5.14
WordPress version: 4.9.5Hi,
I’d like to remove the header from all bbPress pages on my site, but can’t quite figure it out!
I’m using the theme Total, and advice from the theme creator was to put
.ht-main-header{display:none;}in Appearance > Customise > Additional CSS. This worked, but removed the header from all pages across the website and forum. I’d like to keep the header on all main website pages and only remove it from bbPress pages.The main forum is here: https://economy10.com/f/
I can remove the header from an individual page by adding
.postid-994 .ht-main-header{display:none;}but this is only for a specific page. How can I do this for all forum pages?I’m relatively new to using wordpress/bbpress (and don’t really understand CSS tbh!) so any advice would be greatly appreciated.
Cheers
MarkTopic: add new roles
Hello,
I would like to create new roles in bbpress.
Since this is not easy, I have used this code/** * Neue Benutzerrollen */ function add_new_roles( $bbp_roles ) { /* Add a role called Super-Administrator */ $bbp_roles['bbp_super-administrator'] = array( 'name' => 'Super-Administrator', 'capabilities' => custom_capabilities( 'bbp_super-administrator' ) ); /* Add a role called Administrator */ $bbp_roles['bbp_administrator'] = array( 'name' => 'Administrator', 'capabilities' => custom_capabilities( 'bbp_administrator' ) ); /* Add a role called VIP-Member */ $bbp_roles['bbp_vip-member'] = array( 'name' => 'VIP-Member', 'capabilities' => custom_capabilities( 'bbp_vip-member' ) ); /* Add a role called Member */ $bbp_roles['bbp_member'] = array( 'name' => 'Member', 'capabilities' => custom_capabilities( 'bbp_member' ) ); /* Add a role called Trial-Member */ $bbp_roles['bbp_trial-member'] = array( 'name' => 'Trial-Member', 'capabilities' => custom_capabilities( 'bbp_trial-member' ) ); /* Add a role called User */ $bbp_roles['bbp_user'] = array( 'name' => 'User', 'capabilities' => custom_capabilities( 'bbp_User' ) ); 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_super-administrator' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_administrator' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_vip-member' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_member' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_trial-member' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_user' ) $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 'Super-Administrator' role */ case 'bbp_super-administrator': return array( // Keymasters only 'keep_gate' => true, // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => true, 'throttle' => true, 'view_trash' => true, // Forum caps 'publish_forums' => true, 'edit_forums' => true, 'edit_others_forums' => true, 'delete_forums' => true, 'delete_others_forums' => true, 'read_private_forums' => true, 'read_hidden_forums' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, 'edit_others_topics' => true, 'delete_topics' => true, 'delete_others_topics' => true, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => true, 'delete_replies' => true, 'delete_others_replies' => true, 'read_private_replies' => true, // Topic tag caps 'manage_topic_tags' => true, 'edit_topic_tags' => true, 'delete_topic_tags' => true, 'assign_topic_tags' => true ); /* Capabilities for 'Administrator' role */ case 'bbp_administrator': return array( // Primary caps 'spectate' => true, 'participate' => true, 'moderate' => true, 'throttle' => true, 'view_trash' => true, // Forum caps 'publish_forums' => true, 'edit_forums' => true, 'read_private_forums' => true, 'read_hidden_forums' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, 'edit_others_topics' => true, 'delete_topics' => true, 'delete_others_topics' => true, 'read_private_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, 'edit_others_replies' => true, 'delete_replies' => true, 'delete_others_replies' => true, 'read_private_replies' => true, // Topic tag caps 'manage_topic_tags' => true, 'edit_topic_tags' => true, 'delete_topic_tags' => true, 'assign_topic_tags' => true, ); /* Capabilities for 'VIP-Member' role */ case 'bbp_vip-member': return array( // Primary caps 'spectate' => true, 'participate' => true, // Forum caps 'read_private_forums' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, // Topic tag caps 'assign_topic_tags' => true, ); /* Capabilities for 'Member' role */ case 'bbp_member': return array( // Primary caps 'spectate' => true, 'participate' => true, // Forum caps 'read_private_forums' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, // Topic tag caps 'assign_topic_tags' => true, ); /* Capabilities for 'Trial-Member' role */ case 'bbp_trial-member': return array( // Primary caps 'spectate' => true, 'participate' => true, // Forum caps 'read_private_forums' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, // Topic tag caps 'assign_topic_tags' => true, ); /* Capabilities for 'User' role */ case 'bbp_user': return array( // Primary caps 'spectate' => true, 'participate' => true, // Forum caps 'read_private_forums' => true, // Topic caps 'publish_topics' => true, 'edit_topics' => true, // Reply caps 'publish_replies' => true, 'edit_replies' => true, // Topic tag caps 'assign_topic_tags' => true, ); break; default : return $role; } }Unfortunately, I have the problem that the rights are all set to deny, as soon as the user changes something in his profile.
Can I prevent that?In addition I have installed the plugin “bbPress Advanced Capabilities”
VeePay
Topic: syntax error in auto embed
So basically found that there is a syntax error be created with youtube links
<iframe width="560" height="315" src="https://www.youtube.com/embed/pt8VYOfr8To?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen><="" ifram=""></iframe><iframe src="https://www.youtube.com/embed/pt8VYOfr8To?rel=0" width="560" height="315" frameborder="0" allowfullscreen="allowfullscreen"></iframe>the allofulscreen and ifram
Does anyone now where in the plug this is generated.
wp autoembed seem to do the youtube but not sure where the iframe parameters are being generated.this is an issue mainly seen in mobile view only as other views seem to ignore the error.