Forum Replies Created
-
In reply to: bbpress should offer to login in forum
great, come back if you need further help
Regards
Robin
In reply to: customizing bbpress admin linksIn essence if I understand it you want to change the
reply/edit/merge/trash/close/trash/reply links that come up with a topic or reply so that only some show, and others are in a dropdown list.
is that correct?
if so then
my goal with this is to call each admin link individually and make only 2 or 3 to be visible
(reply,edit,maybe quote link from gd bbpress tools)simply requires you to filter for those you want to display
open up
bbpress/includes/replies/template.php
and you’ll see the admin links function line starting at line 1811
On lines 1840 to 1848 you’ll see the default links are added.
So lets create a function to just have the first two
you’ll see a filter in line 1841 (‘apply_filters’) and we can hook to that
so
//change admin links displayed function change_admin_links ($r) { $r['links'] = apply_filters( 'rw_reply_admin_links', array( 'edit' => bbp_get_reply_edit_link ( $r ), 'move' => bbp_get_reply_move_link ( $r ) ), $r['id'] ); return $r['links'] ; } add_filter ('bbp_reply_admin_links', 'change_admin_links' ) ;
just leaves us with edit and move.
This also gives you the ability to add a new link, with say your dropdown list.
You’ll also see that this function checks if it is a topic on line 1825, and you’ll need to similarly create a function for that – I’ll leave you to work that one out.
Come back if you need more help, and when you crack this, can you post the finished code to this site so we can see what it looks like.
In reply to: 404 after logout from private forumno the file is one that belongs to your theme called just functions.php
you’ll find it at
wp-content/themes/%yourthemename%/functions.php
where %yourthemename% is the name of your theme.
If you don’t have a child theme, then you should create one, see
In reply to: 404 after logout from private forumyes, drop this into your functions file.
This will send users to the /forums/ page whenever they log out -whether private or public forum or on a topic or reply, or anywhere within bbpress. If you logout, you’re saying your done, so taking you back to the index seems a logical place to end up !
You can change the $url to say ‘/home/’ if you want the home page,
//sends the user to $url - in this case '/forums/' function rw_logout ($redirect_to) { $url='/forums/' ; $redirect_to = '<a href="' . wp_logout_url( $url ) . '" class="button logout-link">' . esc_html__( 'Log Out', 'bbpress' ) . '</a>' ; return $redirect_to ; } add_filter ('bbp_get_logout_link', 'rw_logout') ;
In reply to: Specific User Write AccessIt could be coded, but it’s not possible at the moment.
My private groups plugin is probably the closest – it lets you assign users to forums, but as the name suggests keeps the forums private. http://www.rewweb.co.uk/bbp-private-groups/
I don’t currently have plans to offer that possibility.
In reply to: Specific User Write Accessbbpress has its own roles
so user not registered would see all public forums but not able to post, but would not see private forums
registered users with wordpress roles would be able to do all wordpress things but with ‘no role’ in the user profile under forum would not be able to post in the forum.
registered users with forum roles (eg participant, moderator) would be able to see public and private forums, and if wordpress roles set would be able to carry out wordpress roles
registered users with spectator role would be able to view both public & private forums but not participate.you should be able to achieve whatever you want with a role based solution.
come back with further details if this is not what you are trying to achieve
In reply to: No forum after BBP Private Groups plugin updateI have now fixed the issue, and posted the new version to my website
I have posted the new version in
I will post this to the wordpress plugins page in the next few days.
Robin
In reply to: Content Not Showingnot sure quite how threatening to remove something that is free, cost you nothing, and is supported by volunteers who are paid nothing and have tried to help you to get something working that you had working perfectly well at the start, but has somehow got messed up is really s’posed to progress to a resolution.
I know you are frustrated, but taking it out on here is not really the answer 🙂
I hope you are able to get it working, but if not find another solution, and wish you the best for the future.
In reply to: add_role on my site and influence of bbpressbbpress has a separate set of capabilities, so you can set permissions for the wordpress part of your site totally separately to the capabilities for bbpress.
see
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
and if needbe
In reply to: Content Not Showingdo you mean the permalink for your topic is
/edit.php?post_type=topic
as in example below where the permalink is under the title
long answer I’m afraid and in two parts
part 1 – setting the user permission to allow delete topic and delete reply
delete is easy, making it only trash is in part 2 !
Basically you’ll need to change a couple of capabilities of the participant role
see
https://codex.bbpress.org/bbpress-user-roles-and-capabilities/
you see the abilities delete topics and delete replies (as distinct from delete others topics and delete others replies)
Whilst you could amend the participant role, I haven’t documented that, so easiest is just for you to create a new role and give it the participant capabilities plus the ‘delete topics’ and ‘delete replies’. This article explains how
add this code to your functions file – see
part 2 – changing the function, so that delete is only shown for keymasters
This code will only allow a keymaster to permanently delete a topic
add the following to your functions file
add_filter ('bbp_get_topic_trash_link', 'topic_dont_delete'); add_filter ('bbp_get_reply_trash_link', 'reply_dont_delete'); function topic_dont_delete( $args = '') { // Parse arguments against default values $r = bbp_parse_args( $args, array( 'id' => 0, 'link_before' => '', 'link_after' => '', 'sep' => ' | ', 'trash_text' => esc_html__( 'Trash', 'bbpress' ), 'restore_text' => esc_html__( 'Restore', 'bbpress' ), 'delete_text' => esc_html__( 'Delete', 'bbpress' ) ), 'get_topic_trash_link' ); $actions = array(); $topic = bbp_get_topic( bbp_get_topic_id( (int) $r['id'] ) ); if ( empty( $topic ) || !current_user_can( 'delete_topic', $topic->ID ) ) { return; } if ( bbp_is_topic_trash( $topic->ID ) ) { $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'untrash', 'topic_id' => $topic->ID ) ), 'untrash-' . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-restore-link">' . $r['restore_text'] . '</a>'; } elseif ( EMPTY_TRASH_DAYS ) { $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'trash', 'topic_id' => $topic->ID ) ), 'trash-' . $topic->post_type . '_' . $topic->ID ) ) . '" class="bbp-topic-trash-link">' . $r['trash_text'] . '</a>'; } if ( bbp_is_topic_trash( $topic->ID ) || !EMPTY_TRASH_DAYS ) { if ( bbp_is_user_keymaster()) { $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_topic_trash', 'sub_action' => 'delete', 'topic_id' => $topic->ID ) ), 'delete-' . $topic->post_type . '_' . $topic->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-topic-delete-link">' . $r['delete_text'] . '</a>'; } } // Process the admin links $retval = $r['link_before'] . implode( $r['sep'], $actions ) . $r['link_after']; return $retval ; } function reply_dont_delete( $args = '' ) { // Parse arguments against default values $r = bbp_parse_args( $args, array( 'id' => 0, 'link_before' => '', 'link_after' => '', 'sep' => ' | ', 'trash_text' => esc_html__( 'Trash', 'bbpress' ), 'restore_text' => esc_html__( 'Restore', 'bbpress' ), 'delete_text' => esc_html__( 'Delete', 'bbpress' ) ), 'get_reply_trash_link' ); $actions = array(); $reply = bbp_get_reply( bbp_get_reply_id( (int) $r['id'] ) ); if ( empty( $reply ) || !current_user_can( 'delete_reply', $reply->ID ) ) { return; } if ( bbp_is_reply_trash( $reply->ID ) ) { $actions['untrash'] = '<a title="' . esc_attr__( 'Restore this item from the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'untrash', 'reply_id' => $reply->ID ) ), 'untrash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-restore-link">' . $r['restore_text'] . '</a>'; } elseif ( EMPTY_TRASH_DAYS ) { $actions['trash'] = '<a title="' . esc_attr__( 'Move this item to the Trash', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'trash', 'reply_id' => $reply->ID ) ), 'trash-' . $reply->post_type . '_' . $reply->ID ) ) . '" class="bbp-reply-trash-link">' . $r['trash_text'] . '</a>'; } if ( bbp_is_reply_trash( $reply->ID ) || !EMPTY_TRASH_DAYS ) { if ( bbp_is_user_keymaster()) { $actions['delete'] = '<a title="' . esc_attr__( 'Delete this item permanently', 'bbpress' ) . '" href="' . esc_url( wp_nonce_url( add_query_arg( array( 'action' => 'bbp_toggle_reply_trash', 'sub_action' => 'delete', 'reply_id' => $reply->ID ) ), 'delete-' . $reply->post_type . '_' . $reply->ID ) ) . '" onclick="return confirm(\'' . esc_js( __( 'Are you sure you want to delete that permanently?', 'bbpress' ) ) . '\' );" class="bbp-reply-delete-link">' . $r['delete_text'] . '</a>'; } } // Process the admin links $retval = $r['link_before'] . implode( $r['sep'], $actions ) . $r['link_after']; return $retval ; }
I haven’t fully tested this code as my test site is in some disarray whilst I test something else, so you’ll need to check that it works
In reply to: Forum Structure error1. go into dashboard>forums and under the title you will see the forum’s permalink. It should read forum-2. change it to forum
2. go into dashboard>settings>forums and look for forum prefix, and untick
In reply to: Content Not Showingok, thanks for that info
if you go into
Dashboard>topics>all topics –
1. can you see and edit the topic?
2. what is the topics permalink? (just under the heading)
(this is just for my info)
then reset the permalinks
dashboard>settings>permalinks
see what they are set to, change them to anything else and save, and then change them back and save.
The come back and tell me what happened !
In reply to: Content Not Showingjust seen you later post – you should have
dashboard>settings>forums
have you got that?
In reply to: Content Not Showingok, I presume the one topic posted is after you re-installed
did you have topics before that you are expecting to see?
In reply to: Content Not ShowingHi, sorry but can you post a screenshot of what it looks like via say photobucket?
Thanks
In reply to: Content Not Showingdid you install any other plugins in between?
try
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, switch to a default theme such as twentytwelve, and see if this fixes.
I know you’ve done themes already, but you need to test if it works on a default theme with just twentyfourteen and the bbpress plugin. If it doesn’t then something in your site is screwed up 🙂
In reply to: Remove Freshness date and Topic count columnpresume you removing the titles from
wp-content/bbpress/templates/default/bbpress/loop-forums
and renaming as per
https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-3/ section 3
then
wp-content/bbpress/templates/default/bbpress/loop-single-forum
has the content that you’ll want to take out
In reply to: Redirect user after they login to another pageIn reply to: I can't get my forum to functon at all.but you don’t have to do it al at once, so take a pause and go back to it in a short while… 🙂
In reply to: I can't get my forum to functon at all.yes it was supposed to change the color to black.
You can change it to whatever color you want
see
http://www.w3schools.com/html/html_colors.asp
and maybe use
to find the right color
Please don’t stop – keep improving that is what you are supposed to do, you’ve come a long way – learned how to create a test site, add functions and styles, but it requires effort ! Learning firebug will help you tailor your site’s styling. Adding color cop will let you choose colors – please keep working at getting a site that is what you want. 🙂
‘ I am afraid to mess with these things like firebug. 🙂 ‘ – 1. that is what the test site is for, 2. conquering fear is part of life’s journey, and surely this is only a very petty fear – work through it !
I’ll come back on registration when I get a moment.
In reply to: I can't get my forum to functon at all.hmmm.. ok but we’re starting to need lots of extra code
ok so add
#bbpress-forums a {
color: #111111 !important ;
}This will change the font throughout, and you can play with the colour.
If you want the topic and date to be different, we’re getting into some real css styling, which is beyond the purpose of the bbpress support forum, and perhaps you need to start to look at how to use firebug so you can see what you need to change eg
then you can style any forums part by preceding it with
#bbpress-forums as I’ve done above.
In reply to: I can't get my forum to functon at all.to change the font (sorry I missed that) , change it to
#bbpress-forums div.bbp-forum-title h3, #bbpress-forums div.bbp-topic-title h3, #bbpress-forums div.bbp-reply-title h3, #bbpress-forums a.bbp-forum-title, #bbpress-forums a.bbp-topic-permalink {
color: #666 !important;
font-family: ‘Open Sans’,Arial,sans-serif !important;
font-size: 16px !important;
}In reply to: I can't get my forum to functon at all.No 2 did not seem to work on the test so i did not add it live. I added it to the bottom of the style.css so I am unsure if that is the issue.
No 2 changed the font colour and size of the forum list – look at ‘prayer requests’ in you test and live sites to see the difference.
What else do you want to change?
In reply to: Per Forum Permissions by Group@marianne78 not quite sure what you are saying.
Can you detail
how many forums you have,
whether they are all private,
when the message appears (eg when not logged in),
whether you are using a forum page with bbp-index in it,
what settings you have for dashboard>settings>bbp private groups in forum visibility settings and general settingsThanks