Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 1,276 through 1,300 (of 14,219 total)
  • @robin-w

    Moderator

    I want it to show up underneath the bottom of the topic field.

    ok, no idea what you mean by that, as asked can you provide a link and say precisely where you would like it

    @robin-w

    Moderator

    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

    @robin-w

    Moderator

    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

    @robin-w

    Moderator

    great – glad we got there !!

    @robin-w

    Moderator

    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.

    @robin-w

    Moderator

    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?

    @robin-w

    Moderator

    so is this the front end of any topic post, or a specific topic post ?
    and exactly where do you want it?

    A link to a live example on your site, together with ‘under/over/beside xx’ would be useful.

    @robin-w

    Moderator

    ok, presuming the characters are exactly this

     

    sorry nothing further I can do.

    if different put that in the appropriate line

    @robin-w

    Moderator

    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

    @robin-w

    Moderator

    and the problem may well be with intervening parts of email system – emails have become very complicated in how they are delivered, and you may find that emails to you have this, but other email users don’t get the problem

    @robin-w

    Moderator

    no problem, we’ve all been there 🙂 🙂

    glad you are fixed !

    @robin-w

    Moderator

    ok, not sure how to help further, maybe try

    it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentytwenty, 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.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    @robin-w

    Moderator

    ok, so switch to html text

    @robin-w

    Moderator

    try

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Subscription Emails

    where you can amend what is sent, or indeed switch to plain text

    @robin-w

    Moderator

    great – glad you are fixed

    @robin-w

    Moderator

    @enkoes – thanks, I’ve amended the version above 🙂

    @robin-w

    Moderator

    oh have you run

    1. dashboard>tools>repair tools
    2. Dashboard>settings>permalinks and just click save – this resets the permalinks

    I am very doubtful that this will cure, but it is a good 2 things to eliminate

    @robin-w

    Moderator

    If the tests above proved nothing, then I can only suggest you have some form of corruption on either database or more likely software.

    But can you confirm that this does not happen every time, and if so how often (eg 1 in 3 posts, 1 in 10, 1 in 100)?

    Are you able to clone your site?

    @robin-w

    Moderator

    ok, so put this before it

    <?php

    @robin-w

    Moderator

    ok, so can you paste the bit of your child theme’s function file that you pasted this into, including 3 lines before and after

    @robin-w

    Moderator

    ok, again untested but this

    add_filter ('bbp_topic_admin_links' , 'surpress_moderator_links', 10 , 2) ;
    add_filter ('bbp_reply_admin_links' , 'surpress_moderator_links', 10 , 2) ;
    
    function surpress_moderator_links ($links , $id) {
    	
    	if (bbp_is_topic( $id)) $forum = bbp_get_topic_forum_id( $id ) ;
    	if (bbp_is_reply( $id)) $forum = bbp_get_reply_forum_id( $id) ;
    	if (!in_array($forum, array ('12345','34567','78945'))) return $links ;
    	//if user is moderator but not a keymaster...
    	$user_id = wp_get_current_user()->ID ;
    	if (bbp_is_user_keymaster($user_id)) return $links ;
    	if (current_user_can( 'moderate')) {
    		//check if the topic/reply is posted by another moderator, and if so unset the links
    		if (bbp_is_topic( $id)) $author_id = bbp_get_topic_author_id( $id ) ;
    		if (bbp_is_reply( $id)) $author_id = bbp_get_reply_author_id( $id ) ;
    		if (bbp_get_user_role( $author_id)  == 'bbp_moderator') {
    			 unset ( $links ['approve'] );
    			 unset ( $links ['spam'] );
    			 unset ( $links ['trash'] );
    			 unset ( $links ['move'] );
    			 unset ( $links ['split'] );
    			 unset ( $links ['edit'] );
    			 unset ( $links ['move'] );
    			unset ( $links ['merge'] );
    			unset ( $links ['close'] );
    			unset ( $links ['stick'] );
    		
    		}
    	}
    return $links ;
    }

    just change ‘array (‘12345′,’34567′,’78945′))’ to have a list of the forum ID’s you want to check against

    @robin-w

    Moderator

    @ph59 – ah I see, then yes try the code above, if it doesn’t work, let me know and I’ll try and find time to fix it

    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

    @robin-w

    Moderator

    maybe …not one the bbpress authors allowed for 🙂

    anyway, totally untested as I need to be doing other things, but this might do it
    revised code below

    of course if moderators are allowed into the backend, then this becomes pointless, but I would argue that only admins should be backend access 🙂

    @robin-w

    Moderator

    sorry I meant in which file are you seeing this

    ‘There is a css setting, if-no-js, that is setting display none before the button bar’

    @robin-w

    Moderator

    so in which file are you seeing this setting?

Viewing 25 replies - 1,276 through 1,300 (of 14,219 total)