Forum Replies Created
-
In reply to: Uncheck “keep revision log” by default
in
form-reply.php
i find this line:<input name="bbp_log_reply_edit" id="bbp_log_reply_edit" type="checkbox" value="1" <?php bbp_form_reply_log_edit(); ?> tabindex="<?php bbp_tab_index(); ?>" />
it does not seem like, i can uncheck the box here.
I have my subscription boxes auto-checked via:
function pw_bbp_auto_checK_subscribe( $checked, $topic_subscribed ) { if( $topic_subscribed == 0 ) $topic_subscribed = true; return checked( $topic_subscribed, true, false ); }
is there maybe a way, to turn this around and use it on the log checkbox?
In reply to: Custom Roles not assignableI realized, that i used another code mentioned in this forum, to change the original names of the roles, so i deleted this code and afterwards it just worked.
In reply to: Custom Roles not assignableI put the code into a custom plugin.
In reply to: Custom Roles not assignableok, resolved.
It was a conflict with another code, that renames the roles.In reply to: Custom Roles not assignable*push*
In reply to: Custom Roles not assignablenow i added this to functions.php:
//code to add forum-roles function add_new_roles( $bbp_roles ) { /* Add a role called tutor */ $bbp_roles['bbp_mentor'] = array( 'name' => 'Mentor', 'capabilities' => custom_capabilities( 'bbp_mentor' ) ); /* Add a role called pupil */ $bbp_roles['bbp_kursteilnehmer'] = array( 'name' => 'Kursteilnehmer', 'capabilities' => custom_capabilities( 'bbp_kursteilnehmer' ) ); 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_mentor' ) $caps = custom_capabilities( $role ); if( $role == 'bbp_kursteilnehmer' ) $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 'mentor' role */ case 'bbp_mentor': 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, ); /* Capabilities for 'kursteilnehmer' role */ case 'bbp_kursteilnehmer': 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; } }
it still does not work.
Any hints, whats wrong here?
In reply to: Custom Roles not assignableIn reply to: Custom Roles not assignableChanging the name of existing roles through MU works.
But how would you recommend to handle it?
In reply to: Custom Roles not assignableIn a custom-functions-file in the mu-plugins folder.
In reply to: Custom Roles not assignable*push* an answer would be nice.
In reply to: How to display topics last reply author + avatar?Ok, ignore this, i struggled myself through it.
In reply to: How to display topics last reply author + avatar?Whats going on here? Why is it, that nobody reacts to the question?
In reply to: How to display topics last reply author + avatar?0 answers? Come on guys, please dont let me die here!
Thanks
DominikIn reply to: bbp_get_topic_last_reply_author FunctionsThe funcions i named in the OP are not integrated in the plugin, i just used the names, to describe exactly, what i am looking for.
Is there someone, who can help me on this one?
I would be realy grateful.
In reply to: bbp_get_topic_last_reply_author FunctionsWhat i am trying to do is, to add “Last reply from:” like its here in the Topic Info, i just want to include the avatar of the latest reply to it.
In reply to: bbp_get_topic_last_reply_author FunctionsHello John,
thank you for your kind reply.My goal is to show the name (including link to user page) and the avatar of the user, who wrote the last reply in an infobox on top of the topic.
If you want to have a look at it: https://bewusstewelt.de/topic/test-2/.
Its still in progress at the moment. In the right box i want to include the information about the last reply.Looking at it, i just remember, that i still ned to find out, how to get the view count for the 2nd box done.
If you have some wisdom to share on this one also i would be very thankful.