Skip to:
Content
Pages
Categories
Search
Top
Bottom

changing Freshness to other wording and Style Pack and Toolkit conflict

  • @khunmax

    Participant

    There were features in both the BBp Style Pack and BBpress Toolkit that I desired.

    Unfortunately when ever I installed both plugins, my site became buggy. There is a conflict between the two it would seem.

    So I bit the bullet and created my own functionality plugin and used it and WP Custom CSS to create each of the features and styling I desired from the Style Pack and the Toolkit.

    There are just three features that I couldn’t find any documentation for:

    1. Changing the header label Freshness to other wording, and
    2. Creating a “create new topic” link.

    I am aware that the first of these features is also included in Robins other plugin called Latest Post (or something like that) however that plugin also includes another feature that I do not require (as I have coded my own)

    And so my request. Can someone please provide me with:

    1. a function snippet to change freshness to other wording
    2. a function snippet to add a “create new topic” link at the top of a forum

    Thanks in advance for any assistance.

    Kind Regards

    Max

Viewing 10 replies - 1 through 10 (of 10 total)
  • @robin-w

    Moderator

    1.

    //This function changes the heading "Freshness" 
    function rew_change_translate_text( $translated_text ) {
    	if ( $translated_text == 'Freshness' ) {
    	$translated_text = 'hello' ;	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'rew_change_translate_text', 20 );
    

    2.

    function rew_create_new_topica () {
    	$text= 'Create New Topic' ;
    	if ( bbp_current_user_can_access_create_topic_form() && !bbp_is_forum_category() ) echo '<div style="text-align: center;">  <a href ="#topic">'.$text.'</a></div>' ;
    	}
    
    function rew_create_new_topicb () {
    	echo '<a name="topic"></a>' ;
    	}
    
    add_action ( 'bbp_template_before_single_forum', 'rew_create_new_topica' ) ;
    add_action( 'bbp_theme_before_topic_form', 'rew_create_new_topicb' ) ;
    

    @khunmax

    Participant

    Robin

    Thanks very much for your prompt and valuable reply.

    For others reading this thread, please note that you can style the alignment of the Create New Topic link by changing the text-align element in the second snippet above.

    Please mark this thread as resolved.

    Kind Regards

    Max

    @robin-w

    Moderator

    Max,

    Would be good to know what the conflict between the plugins is

    @khunmax

    Participant

    Hey Robin

    In the wake of the other issue regarding any user having access to the edit link in all other user profiles,and my inability to resolve it, I had to start over with a vanilla install GP theme and bbpress. Your plugin ran fine but then when I also added the Tool kit the site became buggy. I ran your plugin alone and the problems disappeared, and the same with the toolkit. But when I ran both, bugs returned. I then bit the bullet and made my own functionality plugin and using the BBpress functionality page (and your very kind, prompt, and valuable assistance) I adopted each of the functions and styling that I coveted from your plugin and the toolkit. The site is now bug free.

    I am still building and have opened a couple of other threads. Any additional help you may offer is appreciated immensely.

    Kind Regards

    Max

    @robin-w

    Moderator

    was kinda hoping you could say what ‘buggy’ means.

    I suspect that both plugins modify some common pieces of code, so may ‘overwrite’ each other in places.

    Knowing where these places were would help immensely in fixing them for others.

    @khunmax

    Participant

    Or another possible pinch point is the Tool’s kits option to remove css from non bbpress pages not playing nicely with your css functions?

    @robin-w

    Moderator

    Could well be that or whose style file is overwriting whose may also be the issue.

    Without a site to look at I can’t debug.

    @robkk

    Moderator

    Or another possible pinch point is the Tool’s kits option to remove css from non bbpress pages

    the bbp toolkit plugin just dequeues the bbPress default stylesheet if the page is not a bbPress one. Here is the function for that feature.

    function bbptoolkit_unqueue_bbp_scripts() {
    	if( ! is_bbpress() ) {
    		$bbptoolkit_rem_defstyle = get_option('bbptoolkit-rem-defstyle', false);
    		if ($bbptoolkit_rem_defstyle) {
    			wp_dequeue_style('bbp-default');
    			wp_dequeue_style('bbp-default-rtl');
    		}
    	}
    }
    add_action( 'bbp_enqueue_scripts', 'bbptoolkit_unqueue_bbp_scripts', 15 );

    This may not be the conflict as I think robins plugin doesn’t mess with the default stylesheet in bbPress. So it might be something else.

    @casiepa

    Moderator

    Hi @khunmax ,
    It’s the first time I’m hearing about a conflict in our 2 plugins, so I would indeed like to know what checkboxes you activated and what you mean with ‘buggy’. Were it CSS/layout issues or did some things stop working?
    Thanks, Pascal.

    @khunmax

    Participant

    Hi Pascal

    One of the bugs was all of the settings I saved in Robins plugin were deleted.

    I am not the first to discover the conflict. When reading upon this forum in the wake of the problem I found at least two other user that commented upon a similar issue. Sorry I don’t have the links for you.

    Anyway, notwithstanding a good deal of lost time, I created my own functionality plugin and now have created a hybrid of the features I coveted from both your and Robins plugin.

    On another issue, and noting that you are a mod, I try to submit a lengthy post upon adding a quote function yesterday evening. I tried both time and although it submited the thread never showed up in support, or in my topics created in my profile.

    My post did not contain any profanity, however I blocked quoted another user who, in his own post used the word that rhymes with shucks (he posted some 6 years back). Could my post have been filtered and deleted because of that word?

    Kind Regards

    Max

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar