Forum Replies Created
-
this will let you change text if you need it – not as good as having an ‘accepted translation’ but better than English
add_filter( 'gettext', 'rew_bbpress_translate', 20 , 3 ); add_filter( 'ngettext', 'rew_bbpress_translate' , 20 , 3 ); function brexit_translate( $translated, $text, $domain ) { if ($domain == 'bbpress') { $words = array( 'Topic' => 'New-word', 'topic' => 'new-word', ); $translated = str_replace( array_keys($words), $words, $translated ); } return $translated; }
just change what you need and add to in the middle section
Put this in your child theme’s function file – or use
In reply to: Edit Profile Shows on WP menusorry, you might need to start again and express a single issue that I can try and help with.
1. At present I understand that you are using style pack, but have set to not have edit profile in the menu. I therefore do not understand what you are pressing/clicking/selecting that you need help with
2. which plugin are you referring to in ‘the workaround is this plugin, but I would rather not add another plugin, especially one that is not updated for the past two years.’
3. I simply don’t understand what you are saying about what works and doesn’t work – can you write it again into one single thread. The default edit for profile is /users/*username*/edit. what have you got set for dashboard>settings>forums>forum user slugs>user base ?In reply to: Edit Profile Shows on WP menuso if you have removed it from the settings, what are you pressing to get to that part?
In reply to: User Avatarsince bbpress just uses the WordPress avatar system, then anything that allows users to upload should work
https://wordpress.org/plugins/search/avatar/
simple local avatar looks like it is worth looking at
no problem
sorry I don’t understand – link to your site and an example please
In reply to: Featured image for all forum pages and topicsany chance of a link to your site ?
In reply to: Wrong user_id in posts, but not in topicok, not sure how to help further –
In reply to: How to hide the forum and its posts from visitorsprivate forums overrides bbpress, and you would simply need to make any ‘hidden’ forums only accessible to a group that say contains admins.
I think this still works
Put this in your child theme’s function file – or use
In reply to: Wrong user_id in posts, but not in topicok, is there any logic in what they are displaying – ie is it al the same name, the same name on any topic, etc. etc.
In reply to: Wrong user_id in posts, but not in topic‘topics’ and ‘replies’ are bbpress, ‘posts’ are WordPress.
What exactly do you mean by ‘posts’?
In reply to: Filter the Admin Links Contentok, the code works in my test site, so a reply edit admin link show ‘hello’ instead of ‘Edit’.
If this is not the case, then it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentyfifteen, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Then come back
In reply to: Allow Forum Moderators to delete usersgreat !
In reply to: Filter the Admin Links Contentah… and are you looking at a reply, not a topic?
In reply to: Filter the Admin Links Contentok, where did you put the code?
In reply to: Filter the Admin Links Contentso you still see ‘edit’ as the link word?
In reply to: Filter the Admin Links Contentok, so this (untested) one should put the class in for the edit, and change the word edit to ‘hello’
can you test and let me know that it works, and I’ll look at the others.
add_filter ('bbp_before_get_reply_edit_link_parse_args' , 'rew_get_reply_edit_link' ) ; function rew_get_reply_edit_link ($args) { $args['link_before'] = '<i class="fa fa-edit">' ; $args['link_after'] = '</i>' ; $args['edit_text'] = 'hello' ; return $args ; }
Put this in your child theme’s function file – or use
In reply to: How to avoid SMTP server blocking?most companies would send much more than 50 emails at a time, this limit seems very low, but yes most will block, many do it on bcc’s as these are the most used for spam.
In reply to: Translationsthat all looks good – I cannot say why it is not working in which directory did you put these?
In reply to: How to avoid SMTP server blocking?hmm…that’s awkward as would involve some custom code to fix, probably added to the above plugin.
I don’t have time to do this at the moment
In reply to: Filter the Admin Links Contentgreat – just wanted to check.
so is this a class per link, or a single class for all the links?
In reply to: Change forum date outputok, the existing function is
function bbp_get_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) { $topic_id = bbp_get_topic_id( $topic_id ); // 4 days, 4 hours ago if ( !empty( $humanize ) ) { $gmt_s = !empty( $gmt ) ? 'U' : 'G'; $date = get_post_time( $gmt_s, $gmt, $topic_id ); $time = false; // For filter below $result = bbp_get_time_since( $date ); // August 4, 2012 at 2:37 pm } else { $date = get_post_time( get_option( 'date_format' ), $gmt, $topic_id, true ); $time = get_post_time( get_option( 'time_format' ), $gmt, $topic_id, true ); $result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time ); } return apply_filters( 'bbp_get_topic_post_date', $result, $topic_id, $humanize, $gmt, $date, $time ); }
so we can filter this as follows :
add_filter ('bbp_get_topic_post_date' , 'rew_date' , 10 , 6) ; function rew_date ($result, $topic_id, $humanize, $gmt, $date, $time) { $result = 'hello' ; return $result ; }
This should then say ‘hello’ so all we want to do is change $result to read whatever you want – so what do you want it to say ?
In reply to: Filter the Admin Links Contentby admin links, do you mean the edit|merge|close things that appear for admins/mods on topics/replies?
In reply to: Change forum date outputok, how familiar with adding filters are you ?
In reply to: Change forum date outputok looks like you are going to need to get familiar with the templates and some coding then
In essence you need to copy some templates across to your child theme, and then amend them
You can copy all the templates across, but you only need to copy those that you want to change, and it is better just to do this, as then you know which you have altered.
so if you wanted to amend loop-single-forum you would do the following
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpresswhere %your-theme-name% is the name of your theme
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.php
bbPress will now use this template instead of the original
and you can amend this