Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 5,751 through 5,775 (of 14,219 total)
  • @robin-w

    Moderator

    can you post a link to an example and say EXACTLY where you want this

    In reply to: Search form styling

    @robin-w

    Moderator
    #bbp-search-form input[type="text"] {
    	font-size: 15px;
    	background: #fff;
    	border: 1px solid #bacad6;
    	margin-right: -4px;
    	border-right: 0;
    	border-top-left-radius: 5px;
    	border-bottom-left-radius: 5px;
    	border-top-right-radius: 0px;
    	border-bottom-right-radius: 0px;
    	width: calc(100% - 85px);
    }
    #bbp-search-form input[type="submit"] {
    	font-size: 15px;
    	border-top-right-radius: 5px;
    	border-bottom-right-radius: 5px;
    	border-top-left-radius: 0px;
    	border-bottom-left-radius: 0px;
    	width: 84px;
    }

    @robin-w

    Moderator

    great – not sure why it didn’t work in code snippets (in essence it’s the same code as you’ve just enabled in style pack), but that will help me – glad you are fixed !!

    @robin-w

    Moderator

    you guessed right, we might need to do that.

    This was found to happen with Theme my login plugin, which registered a public query which both use. My bug fix should have corrected that, even if another plugin is doing it.

    But yes, we need to find which plugin is doing that.

    however just before we do, can you take out the code above from code snippets

    then in

    dashboard>settings>bbp style pack>bug fixes, can you tick “Fix ‘A variable Mismatch has been detected’ ” save and try again.

    then come back

    @robin-w

    Moderator

    what other plugins are you using ?

    @robin-w

    Moderator

    Put this in your child theme’s function file – or use

    Code Snippets

    function rew_get_topic_split_link( $retval, $r, $args ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'          => 0,
    			'link_before' => '',
    			'link_after'  => '',
    			'split_text'  => esc_html__( 'Split',                           'bbpress' ),
    			'split_title' => esc_attr__( 'Split the topic from this reply', 'bbpress' )
    		), 'get_topic_split_link' );
    
    		// Get IDs
    		$reply_id = bbp_get_reply_id( $r['id'] );
    		$topic_id = bbp_get_reply_topic_id( $reply_id );
    
    		// Bail if no reply/topic ID, or user cannot moderate
    		if ( empty( $reply_id ) || empty( $topic_id ) || ! current_user_can( 'moderate', $topic_id ) ) {
    			return;
    		}
    
    		$uri = add_query_arg( array(
    			'action'   => 'bbp-split-topic',
    			'reply_id' => $reply_id
    		), bbp_get_topic_edit_url( $topic_id ) );
    
    		$retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" title="' . $r['split_title'] . '" class="bbp-topic-split-link">' . $r['split_text'] . '</a>' . $r['link_after'];
    
    		// Filter & return
    		return apply_filters( 'rew_get_topic_split_link', $retval, $r, $args );
    	}
    
    add_filter ('bbp_get_topic_split_link', 'rew_get_topic_split_link' , 10 , 3) ;
    
    function rew_is_topic_split() {
    
    	// Assume false
    	$retval = false;
    
    	// Check topic edit and GET params
    	if ( bbp_is_topic_edit() && ! empty( $_GET['action'] ) && ( 'bbp-split-topic' === $_GET['action'] ) ) {
    		$retval = true;
    	}
    
    	// Filter & return
    	return (bool) apply_filters( 'rew_is_topic_split', $retval );
    }
    
    add_filter ('bbp_is_topic_split' , 'rew_is_topic_split' ) ;

    and come back and confirm that it works

    @robin-w

    Moderator

    🙂

    @robin-w

    Moderator

    if you enable that, then in each forum, you can set specific moderator(s)

    they are set in a box on then right hand side of the forums when you view them in the dashboard

    A moderator can change other peoples posts, delete posts, mark then as spam etc.

    @robin-w

    Moderator

    do you have a wordpress page called forums?

    @robin-w

    Moderator

    I’d suggest you download this plugin – it should let you change the settings for forums

    bbp style pack

    @robin-w

    Moderator

    you theme is affecting this, specifically

    body, .entry-title a, :root .has-primary-color {
    	color: #ffffff;
    }

    which turns text white

    @robin-w

    Moderator

    🙂

    @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 shortcode

    @robin-w

    Moderator

    @clivesmith try this and you can add [mod-return] shortcode to your moderation page that gives a return to topic link

    //add message if reply help in moderation
    add_filter ('bbp_new_reply_redirect_to' , 'rew_pending_check', 30 , 3) ;
    
    function rew_pending_check  ($reply_url, $redirect_to, $reply_id) {
    	$status = get_post_status ($reply_id) ;
    	$topic_id = bbp_get_reply_topic_id( $reply_id );
    	if ($status == 'pending' ) {
    		$reply_url = '/moderation/?moderation_pending='.$topic_id ;
    	}
    return $reply_url ;
    }
    
    add_shortcode ('mod-return' , 'mod_return' ) ;
    
    function mod_return () {
    	if (!empty($_REQUEST['moderation_pending'] )) {
    	$topic_url         = get_permalink( $_REQUEST['moderation_pending'] );
    	echo '<div class="mod-return"><a href= "'.$topic_url,'">Return to topic</a></div>';
    	}	
    }

    @robin-w

    Moderator

    sorry, this is into web design and beyond help in a support forum

    @robin-w

    Moderator

    good, I may improve it later!

    @robin-w

    Moderator

    ok, let’s try upping the priority as that plugin updates the url, so change

    add_filter ('bbp_new_reply_redirect_to' , 'rew_pending_check', 10 , 3) ;

    to

    add_filter ('bbp_new_reply_redirect_to' , 'rew_pending_check', 30 , 3) ;

    @robin-w

    Moderator

    🙂

    @robin-w

    Moderator

    ah, I think you have a moderation plugin as you moderate all repiles – yes?

    @robin-w

    Moderator

    thanks

    @robin-w

    Moderator

    @clivesmith just tried an anonymous post using

    //add message if reply help 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 ;
    }

    and it does redirect to the moderation page – can you recheck yours please ?

    @robin-w

    Moderator

    think it is already covered in this

    https://bbpress.trac.wordpress.org/ticket/3201

    @robin-w

    Moderator

    great – thanks – I’ll look at anonymous posting and see if I can help

    In reply to: Turn off @mentions

    @robin-w

    Moderator

    best I can find is the last post from this thread

    https://buddypress.org/support/topic/updated-solution-to-removing-mentions/

    @robin-w

    Moderator

    as I say I think it is a long standing bug.

Viewing 25 replies - 5,751 through 5,775 (of 14,219 total)