Simple codes do the tricks. Thanks for your kind support!
the keymaster function was wrong, revised code is above.
Thanks for replying me on yr holiday. 🙂
I applied yr given code with minor correction of syntax error:
unset($r['close']) ;
The code however return generic critical error message in the webpage. Anything wrong?
Regards
My GD bbPress Toolbox Pro plugin has 50 major new features, including BBCodes implementation that has 40+ shortcodes/BBCodes for bbPress forums, including SPOILER and HIDE, as well as full syntax highlighting SCODE shortcode.
I looked your pro plugin. Does your additions work with TinyMCE, text editor or both text and graphic editor? For me your BBCode- support is unnecessary wide. I try to find where TinyMCE defines how to print strikeout. I creates DEL-tags. I would just like to replace DEL-tags with SPOILER-tags as I dId for the text editor.
I found translation. With CSS I can change the text and icon. Dashicon f177 is closest available. With CSS can change the text just defining the font-size of the text 0 an replacing text by using the ::before pseudo-class.
on holiday at the moment, so untested solution !!
But try
add_filter( 'bbp_topic_admin_links' , 'rew_no_close', 10 , 1) ;
function rew_no_close ($r) {
if (!bbp_is_user_keymaster() && bbp_is_topic_open()) {
unset ($r['close']) ;
}
return $r ;
}
This should ensure that only keymasters can close topics (assumes moderators have no backend access)
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
I am hoping someone can answer this, I just started with BBPress for a charity gig, and they want a custom login so the user have to give name address and postcode to confirm they are based within the country and thus should be permitted to join
then assign the user a unique six digit ID so they can vote on concerns in the local community
is this something bbpress can do
Hello,
I created a bbpress forum on this site that is just available for approved members.
When I click on user profile links, I obtain the following error:
Sorry, but the page you were trying to view does not exist.
It looks like this was the result of either a mistyped address or an out-of-date link.
So, I would like to know how I can create the topics started page and others page displayed on user profile page. Is there any shortcode to do that or any other solutions?
Thanks in advance for your help!
I am keymaster on the website but I dont have access to source code of the site. I am using WordPress 6.2.2, bbpress Version 2.6.9.
I have a buddypress with a theme(youzify), I want to display activitys posts randomly on the wall, anyone knows any code, plugin or method for that
Hi, I tried to add the code snippet to my forum and as you can see on this page, the freshness is still appearing while it’s not on pc. Do you know how to fix this please ?
I was just about to post for a problem where some shortcodes were not working, when I actually READ THE POSTING INSTRUCTIONS! (Who would think?)
My problem was that the [bbp-register], [bbp-lost-pass], and [bbp-login] shortcodes weren’t working. The page / block with the shortcode was simply blank.
Per the ‘Before Posting’ topic, I switched my theme to Twenty Twelve. Poof! It all worked. So try that before digging deeper.
https://SolarGeoEngineeringNow.org
just got 10 minutes to look at this.
try this
add_action ('bbp_theme_after_reply_content' , 'rew_display_acf') ;
function rew_display_acf () {
$id = bbp_get_reply_id() ;
//if it is the topic...
if (bbp_is_topic( $id ) {
echo '<br>Lake Marker 2: ' .get_field( 'lake_marker_point_2' ) ;
}
}
or
add_action ('bbp_theme_after_reply_content' , 'rew_display_acf') ;
function rew_display_acf () {
$id = bbp_get_reply_id() ;
//if it is the topic...
if (bbp_is_topic( $id ) {
echo '<br>Lake Marker 2: ' .get_field( 'lake_marker_point_2', $id ) ;
}
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
Back end
So I want the custom field to show up here on the Front-end:
FYI the following code displays the custom field in the Front-end on pages, page.php in the template.
echo ‘Lake Marker 2: ‘ .get_field( ‘lake_marker_point_2’ );
I need this custom field in the front end of any topic post. I want it to show up underneath the bottom of the topic field.
Here is other code ACH generates. Not sure which one to use and what fle it is to be inserted into.
<div id=”view” class=”acf-view acf-view–id–57 acf-view–object-id–65″>
<div class=”acf-view__row acf-view__lake_marker_point”>
<div class=”acf-view__label”>Lake Marker Point</div>
<div class=”acf-view__field”>This is the marker location</div>
</div>
</div>
One more possible code:
echo ‘Lake Marker: ‘ .get_field( ‘lake_marker_point’ );
<div class=”acf-view__row acf-view__lake_marker_point”>
<div class=”acf-view__label”>Lake Marker Point</div>
<div class=”acf-view__field”>This is the marker location</div>
</div>
ok, so this should take them out
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
$message = str_replace (' ' , '', $message ) ;
return ($message) ;
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
ok, so this should take them out
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
$message = str_replace (' ' , '', $message ) ;
return ($message) ;
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
Yes Robin, this is working.
So : I tried again you first add and it is working fine !
the html space code is still visible in TEXTE mode but not in the email.
I am very sorry because of still in the TEXTE mode visible I didn’t even tried first time to send a test subject and make you loosing time !
thank you for your perseverance and kindness.
I tried on the staging clone but I am going to use it on the production one. Thanks again.
Fred
ok, try this
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
//$message = str_replace (' ' , '', $message ) ;
$message = 'hello'.$message ;
return ($message) ;
}
This should simply add the word ‘hello’ before the message, which will prove that the filter is firing.
ok, just tried that in my test site and the code above seems to work.
1. can you give me a exactly what you have put into your functions file, with a few lines above and below
2. are you using any other bbpress related plugins?
3. are you using any mail related plugins?
Here is the ACF shortcode for a custom field. What bbPress template/file do I place this shortcode so that the custom field displays on the frontend of a topic post. Where do I place it.
[acf_views view-id=”60″ name=”Lake Point Marker 2″]
ok, presuming the characters are exactly this
sorry nothing further I can do.
if different put that in the appropriate line
ok, so this should take them out
add_filter( 'bbp_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
add_filter( 'bbp_forum_subscription_mail_message' , 'rew_strip_nbsp', 40 , 1 );
function rew_strip_nbsp ($message) {
$message = str_replace (' ' , '', $message ) ;
return ($message) ;
}
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
Thanks for the code! I tested and it basically works well.
@ph59 if you found not working, try change
('12345,34567,78945')
to
('12345','34567','78945')
Regards.
ok, so put this before it
<?php
The only lines in the child theme functions.php file is the code you gave me. No lines before, nor after it.
Hello,
Please help me out with a code which I can use to display user’s topics started and replies created.
For example, being able to display this page
with only the “topic started” and “replies created” menu links.
I will appreciate a custom code which I can use to archive this.
NB; on the page where I want to display topics started/replies created, I’m also displaying a topic form using bbpress short code. I’d like the display of topics started/replies created to come after the bbpress topic form…
Thanks in anticipation that someone will help me out here with a code 🙏