Search Results for '"wordpress"'
-
AuthorSearch Results
-
April 18, 2020 at 12:24 pm #210289
In reply to: Notify user when a reply goes into moderation
Robin W
Moderator@ajtruckle Most of the code I did is probably redundant as I think digital arms moderation tools does it
But the code for Clive immediately above notifies the user that their reply is in moderation.
so
1. create a WordPress page with a permalink of ‘/moderation/’
2. put whatever message you want in there eg ‘your reply is being held in moderation’
3. if you want you can also put the shortcode [mod-return] in the page as well which will post a return link to the topic
4. add the code above to functions file or code snippets
5. when a user (logged in or anonymous if you allow that) posts a reply that goes into moderation, they are directed to your moderation page, so get certainty that their post is being held in moderation, with a link back to their topic if you’ve added the shortcodeApril 18, 2020 at 9:17 am #210273In reply to: When I reply to topic I am taken to first topic page
Robin W
Moderatorthink it is already covered in this
April 18, 2020 at 7:41 am #210265In reply to: forum title in topics page
Robin W
ModeratorPut this in your child theme’s function file – or use
add_action ('bbp_template_before_replies_loop' ,'rew_show_forum' ) ; function rew_show_forum () { $forum_id = bbp_get_topic_forum_id() ; $title = bbp_get_forum_title($forum_id) ; echo '<div class="rew-in-forum">In forum : '.$title.'</div>' ; }
April 17, 2020 at 6:28 pm #210239In reply to: Forum Moderators Not Work
Robin W
Moderatorparticipants can create topics in all public and private forums.
Moderators have the ability to perform actins such as closing topics, deleting topics etc.
If you want some users to ony be able to create topics in ceraton forums, then you will need
April 17, 2020 at 6:04 pm #210238In reply to: Forum Moderators Not Work
gustavocave2
ParticipantbbPress version 2.6 and wordpress 5.4
April 17, 2020 at 5:42 pm #210237In reply to: Notify user when a reply goes into moderation
Robin W
Moderatorjust had a thought
create a WordPress page with a permalink of ‘/moderation’ and in that put some text say
‘your post is being held pending moderation’
tehn put this in your child theme’s function file – or use
//add message if reply held in moderation add_filter ('bbp_new_reply_redirect_to' , 'rew_pending_check', 10 , 3) ; function rew_pending_check ($reply_url, $redirect_to, $reply_id) $status = get_post_status ($reply_id) ; if ($status == 'pending' ) { $reply_url = '/moderation/' ; } return $reply_url ; }
not perfect by any means, but better than the nothing they now get
If you could test for me, I’ll see if I can improve how it works
April 17, 2020 at 2:14 pm #210229In reply to: Notify user when a reply goes into moderation
Robin W
ModeratorI’ve had a play this evening with this issue.
This code is very rough and ready, but if it works as I think it does, then it shows pending REPLIES to the user who posted them and moderators and keymasters. NOT topics !!
so when a user posts a reply and it goes into moderation, they see there reply in the topic with a warning.
If you want to try it, put this in your child theme’s function file – or use
add_filter ('bbp_has_replies' , 'rew_has_replies' ) ; function rew_has_replies( $args = array() ) { /** Defaults **************************************************************/ // Other defaults $default_reply_search = bbp_sanitize_search_request( 'rs' ); $default_post_parent = ( bbp_is_single_topic() ) ? bbp_get_topic_id() : 'any'; $default_post_type = ( bbp_is_single_topic() && bbp_show_lead_topic() ) ? bbp_get_reply_post_type() : array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ); $default_thread_replies = (bool) ( bbp_is_single_topic() && bbp_thread_replies() ); // Default query args $default = array( 'post_type' => $default_post_type, // Only replies 'post_parent' => $default_post_parent, // Of this topic 'posts_per_page' => bbp_get_replies_per_page(), // This many 'paged' => bbp_get_paged(), // On this page 'orderby' => 'date', // Sorted by date 'order' => 'ASC', // Oldest to newest 'hierarchical' => $default_thread_replies, // Hierarchical replies 'ignore_sticky_posts' => true, // Stickies not supported 'update_post_term_cache' => false, // No terms to cache // Conditionally prime the cache for all related posts 'update_post_family_cache' => true ); // Only add 's' arg if searching for replies // See https://bbpress.trac.wordpress.org/ticket/2607 if ( ! empty( $default_reply_search ) ) { $default['s'] = $default_reply_search; } // What are the default allowed statuses (based on user caps) if ( bbp_get_view_all( 'edit_others_replies' ) ) { // Default view=all statuses $post_statuses = array_keys( bbp_get_topic_statuses() ); // Add support for private status if ( current_user_can( 'read_private_replies' ) ) { $post_statuses[] = bbp_get_private_status_id(); } // Join post statuses together $default['post_status'] = $post_statuses; // Lean on the 'perm' query var value of 'readable' to provide statuses } else { //get public and pending (not sure if we need this or just to remove the perm status that was here ? $post_statuses = array_keys( rew_get_topic_statuses() ); } /** Setup *****************************************************************/ // Parse arguments against default values $r = bbp_parse_args( $args, $default, 'has_replies' ); // Set posts_per_page value if replies are threaded $replies_per_page = (int) $r['posts_per_page']; if ( true === $r['hierarchical'] ) { $r['posts_per_page'] = -1; } // Get bbPress $bbp = bbpress(); //now filter the query before execution // Add filter if participant $user_id = get_current_user_id() ; $role = bbp_get_user_role( $user_id ); if ($role == 'bbp_participant' || $role == 'bbp_moderator' || bbp_is_user_keymaster($user_id)) { add_filter( 'posts_where', 'rew_where' ); } // Call the query $bbp->reply_query = new WP_Query( $r ); // Remove filter if ($role == 'bbp_participant' || $role == 'bbp_moderator' || bbp_is_user_keymaster($user_id)) { remove_filter( 'posts_where', 'rew_where' ); } // Maybe prime the post author caches if ( ! empty( $r['update_post_family_cache'] ) ) { bbp_update_post_family_caches( $bbp->reply_query->posts ); } // Add pagination values to query object $bbp->reply_query->posts_per_page = (int) $replies_per_page; $bbp->reply_query->paged = (int) $r['paged']; // Never home, regardless of what parse_query says $bbp->reply_query->is_home = false; // Reset is_single if single topic if ( bbp_is_single_topic() ) { $bbp->reply_query->is_single = true; } // Only add reply to if query returned results if ( ! empty( $bbp->reply_query->found_posts ) ) { // Get reply to for each reply foreach ( $bbp->reply_query->posts as &$post ) { // Check for reply post type if ( bbp_get_reply_post_type() === $post->post_type ) { $reply_to = bbp_get_reply_to( $post->ID ); // Make sure it's a reply to a reply if ( empty( $reply_to ) || ( bbp_get_reply_topic_id( $post->ID ) === $reply_to ) ) { $reply_to = 0; } // Add reply_to to the post object so we can walk it later $post->reply_to = $reply_to; } } } // Only add pagination if query returned results if ( ! empty( $bbp->reply_query->found_posts ) && ! empty( $bbp->reply_query->posts_per_page ) ) { // Figure out total pages if ( true === $r['hierarchical'] ) { $walker = new BBP_Walker_Reply(); $total_pages = ceil( $walker->get_number_of_root_elements( $bbp->reply_query->posts ) / $bbp->reply_query->posts_per_page ); } else { // Total for pagination boundaries $total_pages = ( $bbp->reply_query->posts_per_page === $bbp->reply_query->found_posts ) ? 1 : ceil( $bbp->reply_query->found_posts / $bbp->reply_query->posts_per_page ); // Pagination settings with filter $bbp_replies_pagination = apply_filters( 'bbp_replies_pagination', array( 'base' => bbp_get_replies_pagination_base( bbp_get_topic_id() ), 'total' => $total_pages, 'current' => $bbp->reply_query->paged ) ); // Add pagination to query object $bbp->reply_query->pagination_links = bbp_paginate_links( $bbp_replies_pagination ); } } // Filter & return return apply_filters( 'rew_has_replies', $bbp->reply_query->have_posts(), $bbp->reply_query ); } function rew_get_topic_statuses( $topic_id = 0 ) { // Filter & return return (array) apply_filters( 'bbp_get_topic_statuses', array( bbp_get_public_status_id() => _x( 'Open', 'Open the topic', 'bbpress' ), ), $topic_id ); } function rew_where( $where ) { $user_id = get_current_user_id() ; global $wpdb; $posts = $wpdb->posts ; return $where . " OR ( ".$posts.".post_author = ".$user_id." AND ".$posts.".post_status = 'pending' ) "; } add_action ('bbp_theme_before_reply_content' , 'rew_pending' ); function rew_pending () { $id = bbp_get_reply_id() ; $status = get_post_status ($id) ; if ($status == 'pending' ) { echo '<i><b>This reply is pending review and can only be seen by you and the administrators</b></i>' ; } }
April 16, 2020 at 7:08 pm #210204In reply to: Turn off @mentions
shonty
ParticipantHi guys,
I’m also trying to remove @ mentions from Forums and Activity in Groups.
I have successfully removed the @Username from beneath the profile names of buddypress users.
I have both of the following in PHP Functions.
add_filter( ‘bp_activity_do_mentions’, ‘__return_false’ );
and
remove_filter( ‘bbp_make_clickable’, ‘bbp_make_mentions_clickable’, 8 );
Now what happens is, when I type “@” followed by a letter for example “J” for “Jack” it still brings up “Jack” user names but it doesnt actually tag them or turn into a link after selecting one. How do I turn off @mentions entirely so it doesnt bring up user names?
I hope that makes sense.
I am using the latest WordPress 5.4 and the latest Buddypress 5.1.2 and bbPress 2.6.4
Any help would be amazballs:)
April 16, 2020 at 10:24 am #210190In reply to: Best Theme for Event Forum?
Robin W
Moderatorbbpress will do fine, buddypress is not forum software, but the two work together if you want.
add this to get the styling of bbpress to match your forum
April 16, 2020 at 4:25 am #210182In reply to: Editing welcome section on home page
Robin W
Moderatorunfortunately we can’t see that link without login details (which please do not show).
You should create an ordinary WordPress page, add a block with your text, and then follow this with a shortcode block with
[bbp-forum-index]
in it
April 15, 2020 at 7:49 pm #210175Topic: Editing welcome section on home page
in forum Troubleshootingbbpresshelp
ParticipantWe have only just set up our WordPress page so have the latest business version and latest bbpress version. We are using a Hero theme.
We have added a ‘block’ to our home forum page. The title is showing “welcome to our local community forum” but the text that we have written underneath isn’t showing up. We have tried adding this text as another block but that doesn’t show up either. How can we get this to show on our home page?
Also, we would like to edit the text type of the title ‘welcome to our local community forum’ and reduce the size. We can’t seem to find where to do this.
We had the following reply from the help at WordPress: I checked the page for your homepage here: https://wordpress.com/page/connectbuzz.net/197 If you will look at “Page Attributes” on the right side, then “Template” you see you assigned this page for the bbPress Forum Index. It makes the page inevitable. The page has to be blank, because bbPress will override anything that’s in there.
How can we get the text to show up?
April 15, 2020 at 5:04 pm #210173Topic: Issues with loading more than one image into forum
in forum Troubleshootingsitm01
ParticipantHello, I am running WordPress 5.4, we have Memberium 2.158, and we have installed Image Upload for bbPress Pro so our users can import images. Our issue is that a forum user cannot import more than one image unless they are the Keymaster. Image Upload says that’s not their problem, that it’s another plugin’s issue. Do others have a similar setup and have any advice on how to fix this? I can’t have all forum users set as Keymasters just so they can upload images? Thank you very much.
April 15, 2020 at 9:07 am #210166In reply to: Forum roles issue
falabart
ParticipantThe process was as follows:
First, we added a field to our Active Directory, where we related each user to the WordPress role.
Then we downloaded that database from Active Directory to WordPress, syncing users and their WordPress roles
Also, once a day, WordPress syncs with Active Directory by rewriting the database with the modifications for that day.
Therefore, taking into account that the database is overwritten every day, I think that the most logical thing would be for bbpress to automatically assign the forum role of “Participant” to all users, except the administrator.
April 15, 2020 at 8:03 am #210161In reply to: Forum roles issue
Robin W
Moderatorok, I’ve done some more thinking whilst trying to compose a support ticket.
so the once a day ‘update’ what is this supposed to do and which way – eg are you adding and deleting users based on AD, or updating AD based on WordPress/bbpress
Does your WordPress/bbpress site have a local user database or is the AD database used for authentication?
April 15, 2020 at 7:19 am #210160In reply to: CSS styling query
Chuckie
ParticipantIn fact there are several style conflicts. The related issue is here:
https://github.com/EnlighterJS/Plugin.WordPress/issues/234
#confused #wanttofix
April 15, 2020 at 7:02 am #210159In reply to: Forum roles issue
falabart
ParticipantYes, users were imported from Active Directory, and WordPress user roles were synchronized from an Active Directory group created for this purpose.
Sorry, I don’t know very well how this forum works … who will you ask for help? Will I receive an answer in this post or should I look for it somewhere else?
Thanks for your help and for your patience.
April 15, 2020 at 6:48 am #210156In reply to: Forum roles issue
Robin W
Moderatoryes, that’s what I’m trying to get you to 🙂
So if you were using a WordPress user database, then the roles I posted a link to above would give you exactly what you want – participants would be able to post.
However I suspect this plugin references the AD database, and is not storing bbpress roles – so when it looks for permissions it finds no roles to allocate permissions against, so does not allow access.
now bbpress roles are stored in the same part of the database as WordPress roles, so it may well be that this plugin is not storing these settings, hence no access.
I’ll put a post in their support forum to see if they can help
April 15, 2020 at 6:31 am #210155In reply to: Forum roles issue
falabart
ParticipantI have that plugin installed and it is working.
But what I would like (but I don’t know if it is possible) is that there is only one Keymaster (the administrator of WordPress) and the rest of the users are Participants by default, being able to create and respond to topics.
April 15, 2020 at 6:21 am #210154In reply to: Forum roles issue
Robin W
Moderatorso if you look at
dashboard>plugins
do you have an active directory integration plugin such as
April 15, 2020 at 6:01 am #210153In reply to: Forum roles issue
falabart
ParticipantActive Directory updates the database daily, adding or deleting users. This database also synchronizes the WordPress roles of each user. But the bbpress forum roles do not appear in our Active Directory …
Would forum roles need to be synced from a specific Active Directory field?
Would this help the role “Participant” have the permissions it should have?
April 15, 2020 at 5:23 am #210151In reply to: Forum roles issue
Robin W
Moderatoryes, participants should be able to create topics and replies viz :
I strongly suspect the issue is with active directory, you already have said that it rolls back settings, which makes me suspect that the entire WordPress database is being rolled back – if you create say a test post on the website, does it stay overnight, or does it disappear – this would help determine where to go next.
April 15, 2020 at 4:25 am #210146In reply to: Forum roles issue
falabart
ParticipantRegarding the second question,
I go to the Users section of the WordPress backoffice, and once there I select all the users and go to the top tab: “Change forum role to …” and select “Participant”.
So that role assigns me well, but when Active Directory syncs again, those roles disappear, leaving it blank. This happens to me even though in Settings – Forums I have “Participant” selected in the “Roles” option.
April 14, 2020 at 1:43 am #210117In reply to: Too many redirects on forum, not on normal pages
webcreations907
Participant<!-- nextpage->
converts to paginated links when usingwp_link_pages()
WordPress function for pages, posts, etc content, some themes add it some may not. As stated on WordPresswp_link_pages()
must be in a loop/used for post content output.I don’t think(maybe wrong) that it would be a good idea to use it in topics and replies for bbpress since bbpress has it’s own pagination functionality.
Thought I’d mention it. 🙂
April 13, 2020 at 12:39 pm #210115In reply to: 2 questions
Robin W
Moderatoras far as I know this still works
April 12, 2020 at 1:48 pm #210105In reply to: Too many redirects on forum, not on normal pages
Robin W
Moderatorso are you running this plugin?
or another that does this, or does your theme add this ?
-
AuthorSearch Results