Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,901 through 2,925 (of 32,517 total)
  • Author
    Search Results
  • #210431
    Robin W
    Moderator

    add this to your theme’s custom css settings

    .bbp_topic_subscription {
    display : none !important ;
    }
    #210425
    Robin W
    Moderator

    '_bbp_user_slug' => 'users', // User profile slug

    is definately the slug

    so is the context right – maybe ‘polylang’ which seesm to be the default?

    and possibly change it’s hook to ‘plugins_loaded’ to make sure bbpress and polylang have both loaded before firing

    but i’m guessing 🙂

    #210419
    Yuval
    Participant

    Hi,

    Is there are function\code that I can add to my theme in order to disable all email notifications from the forums (users AND admin)?

    Thank you!

    #210415
    Kenny Lajara
    Participant

    Hi, I have WP WordPress 5.4 with bbPress 2.8.3.1 and Polylang Pro 2.7 installed.

    All the forums, topics, replies, everything are correctly translated, except the user profile.

    I even attempted to manually register the slug but didn’t work.

    The code I used to try to register the slug was:

    /* Translate Users profile slug with Polylang */
    add_action( 'after_setup_theme','bbp_polylang_integration' );
    function bbp_polylang_integration() {
    	if ( function_exists( 'pll_register_string' ) ) {
    		pll_register_string( 'slug_users', '_bbp_user_slug', 'URL slugs' );
    	}
    }

    I tried with _bbp_user_slug and with users as well.

    #210411
    simonlepamplemousse
    Participant

    Hello,

    The site to troubleshoot: planetanim.fr/forums

    It is a mistake that I have had for a very long time.

    And I apologize first if it has already been reassembled and treated. And then I apologize if my English is bad.

    Once a post is published, when you modify it, the visual editor displays code instead of formatted text.

    I tried to install plugins, to correct the functions.php file but to date I can’t do anything.

    Thank you if that brings up an idea and share it with me.

    #210400
    ticsandthoughts
    Participant

    I figured as much, I put in the above code in the CSS and it worked perfectly! I spent hours trying to edit my child theme this past weekend with no success, and you fixed it in 2 seconds. Thanks so much!

    For anybody else that might use this in the future, in the above code, this worked for me after removing the “‘” between the “.” and “forum-archive”. So:

    .forum-archive .site-content-header {
    display : none !important;
    }

    Thanks again for all the help Robin!

    Robin W
    Moderator

    @randrcomputers sinvce my code only runs on new topics – would be worth running a test with it enabled and disabled, and see if it makes a difference – if it does then come back.

    #210383
    Robin W
    Moderator

    found and fixed.

    I’ve put the fix in my style pack plugin version 4.5.0

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>bug fixes

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

    Code Snippets

    add_filter ('bbp_get_topic_merge_link', 'rew_get_topic_merge_link' , 10 , 3) ;
    add_filter ('bbp_is_topic_merge' , 'rew_is_topic_merge' ) ;
    
    function rew_get_topic_merge_link( $args = array() ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'           => 0,
    			'link_before'  => '',
    			'link_after'   => '',
    			'merge_text'   => esc_html__( 'Merge', 'bbpress' ),
    		), 'get_topic_merge_link' );
    
    		// Get topic
    		$topic = bbp_get_topic( $r['id'] );
    
    		// Bail if no topic or current user cannot moderate
    		if ( empty( $topic ) || ! current_user_can( 'moderate', $topic->ID ) ) {
    			return;
    		}
    
    		$uri    = add_query_arg( array( 'action' => 'bbp-merge-topic' ), bbp_get_topic_edit_url( $topic->ID ) );
    		$retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '" class="bbp-topic-merge-link">' . $r['merge_text'] . '</a>' . $r['link_after'];
    
    		// Filter & return
    		return apply_filters( 'rew_get_topic_merge_link', $retval, $r, $args );
    	}
    
    function rew_is_topic_merge() {
    
    	// Assume false
    	$retval = false;
    
    	// Check topic edit and GET params
    	if ( bbp_is_topic_edit() && ! empty( $_GET['action'] ) && ( 'bbp-merge-topic' === $_GET['action'] ) ) {
    		return true;
    	}
    
    	// Filter & return
    	return (bool) apply_filters( 'rew_is_topic_merge', $retval );
    }
    Robin W
    Moderator

    that code only runs when a new topic is posted, and should not be resource heavy.

    Is it in your functions file or code snippets or elsewhere?

    #210378
    Robin W
    Moderator

    so in

    dashboard>setting>forums I presume you have

    Allow users to mark topics as favourites

    set ?

    #210373

    I am known to make mistakes! Maybe I did something wrong.

    The bad news is that my super-dooper moderator (who I admit I did ask to test things to death before we open the site to the masses) has now discovered he gets that same error messages when trying to merge topics.

    The fix in BBstylepack is still activated so it seems that isn’t a fix for everything.

    I’m not sure if I should be asking for more help from you as the impression I get is that another plugin is causing a conflict. And looking at your snippet code it looks to me as if that is for splitting topics only. But I thought I should make you aware.

    Meanwhile I will start disabling plugins and see what gives.

    John

    Best regards,

    John

    #210339
    Robin W
    Moderator

    you set up a page called say register_page and put this code into the content

    [bbp-register]

    fabwintle
    Participant

    Hi,
    I’d love to display the latest forum topic to my logged in user using a ‘hello bar’ / horizontal bar at the top of my site (I’d build it in Elementor).

    I’ve tried with the [bbp-display-topic-index show=’5′] shortcode but it displays it vertically.
    I’m not well versed in php but I can copy and adapt.
    Would anyone be able to advise how I can do this?
    Thanks!

    #210330
    Robin W
    Moderator
    add_action ('bbp_theme_before_topic_form_notices' ,'rew_show_notice' ) ;
    
    function rew_show_notice () {
    	if (!is_user_logged_in()) {
    		echo '<div class="rew-notice">Only registered users are allowed to upload attachments'</div>' ;
    		}
    	
    }
    #210329
    ticsandthoughts
    Participant

    Hi Robin,

    Thanks for the quick response. Yes I have a wordpress page called forums with the shortcode [bbp-forum-index] in the body.

    From there, in my menus, the Forums link is linked to https://ticsandthoughts.com/forums/

    #210327

    In reply to: Search form styling

    Robin W
    Moderator

    play with the width settings in the above code

    width: calc(100% - 85px);

    and

    width: 84px;

    #210324
    Robin W
    Moderator
    add_action ('bbp_theme_before_topic_form_notices' ,'rew_show_notice' ) ;
    
    function rew_show_notice () {
    	echo '<div class="rew-notice">Only registered users are allowed to upload attachments'</div>' ;
    }
    #210322

    In reply to: Search form styling

    Hum Gurung
    Participant

    Hi @robin-w
    Thank you for quick reply and code. I placed the code to customizer and it looks little better, however the width of the search form is still half of the area. Is it possible to display 100% width? BTW, the search form is displayed automatically without any shortcode. Here is my bbpress installation.
    Thanks again.
    Etchbee

    #210320
    Kikis
    Participant

    I would like to display all topic tags list but I could not find the widget ot shortcode so please help me out here

    #210318

    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;
    }
    #210313
    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 !!

    #210311
    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

    #210306

    Thanks for the quick response, Robin.

    I am afraid I still get the same message – “A variable mismatch has been detected.”, with PHP7.1.

    I added this using Code Snippets.

    John

    #210305
    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

    #210294
    Robin W
    Moderator

    you theme is affecting this, specifically

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

    which turns text white

Viewing 25 results - 2,901 through 2,925 (of 32,517 total)
Skip to toolbar