Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 6,451 through 6,475 (of 14,146 total)
  • @robin-w

    Moderator

    this will let you change text if you need it – not as good as having an ‘accepted translation’ but better than English

    add_filter(  'gettext',  'rew_bbpress_translate', 20 , 3  );
    add_filter(  'ngettext',  'rew_bbpress_translate' , 20 , 3 );
    
    function brexit_translate( $translated, $text, $domain ) {
    	if ($domain == 'bbpress') {
         $words = array(
                            
                            'Topic' => 'New-word',
                             'topic' => 'new-word',
             );
         $translated = str_replace(  array_keys($words),  $words,  $translated );
    	}
         return $translated;
    }

    just change what you need and add to in the middle section

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

    Code Snippets

    @robin-w

    Moderator

    sorry, you might need to start again and express a single issue that I can try and help with.

    1. At present I understand that you are using style pack, but have set to not have edit profile in the menu. I therefore do not understand what you are pressing/clicking/selecting that you need help with
    2. which plugin are you referring to in ‘the workaround is this plugin, but I would rather not add another plugin, especially one that is not updated for the past two years.’
    3. I simply don’t understand what you are saying about what works and doesn’t work – can you write it again into one single thread. The default edit for profile is /users/*username*/edit. what have you got set for dashboard>settings>forums>forum user slugs>user base ?

    @robin-w

    Moderator

    so if you have removed it from the settings, what are you pressing to get to that part?

    In reply to: User Avatar

    @robin-w

    Moderator

    since bbpress just uses the WordPress avatar system, then anything that allows users to upload should work

    https://wordpress.org/plugins/search/avatar/

    simple local avatar looks like it is worth looking at

    @robin-w

    Moderator

    no problem

    @robin-w

    Moderator

    sorry I don’t understand – link to your site and an example please

    @robin-w

    Moderator

    any chance of a link to your site ?

    @robin-w

    Moderator

    ok, not sure how to help further –

    @robin-w

    Moderator

    private forums overrides bbpress, and you would simply need to make any ‘hidden’ forums only accessible to a group that say contains admins.

    I think this still works

    Remove Private: label prefix

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

    Code Snippets

    @robin-w

    Moderator

    ok, is there any logic in what they are displaying – ie is it al the same name, the same name on any topic, etc. etc.

    @robin-w

    Moderator

    ‘topics’ and ‘replies’ are bbpress, ‘posts’ are WordPress.

    What exactly do you mean by ‘posts’?

    @robin-w

    Moderator

    ok, the code works in my test site, so a reply edit admin link show ‘hello’ instead of ‘Edit’.

    If this is not the case, then it could be a theme or plugin issue

    Themes

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

    Then come back

    @robin-w

    Moderator

    great !

    @robin-w

    Moderator

    ah… and are you looking at a reply, not a topic?

    @robin-w

    Moderator

    ok, where did you put the code?

    @robin-w

    Moderator

    so you still see ‘edit’ as the link word?

    @robin-w

    Moderator

    ok, so this (untested) one should put the class in for the edit, and change the word edit to ‘hello’

    can you test and let me know that it works, and I’ll look at the others.

    add_filter ('bbp_before_get_reply_edit_link_parse_args' , 'rew_get_reply_edit_link' ) ;
    
    function rew_get_reply_edit_link ($args) {
    	$args['link_before'] = '<i class="fa fa-edit">' ;
    	$args['link_after'] = '</i>' ;
    	$args['edit_text'] = 'hello' ;
    	
    return $args ;
    }

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

    Code Snippets

    @robin-w

    Moderator

    most companies would send much more than 50 emails at a time, this limit seems very low, but yes most will block, many do it on bcc’s as these are the most used for spam.

    In reply to: Translations

    @robin-w

    Moderator

    that all looks good – I cannot say why it is not working in which directory did you put these?

    @robin-w

    Moderator

    hmm…that’s awkward as would involve some custom code to fix, probably added to the above plugin.

    I don’t have time to do this at the moment

    @robin-w

    Moderator

    great – just wanted to check.

    so is this a class per link, or a single class for all the links?

    @robin-w

    Moderator

    ok, the existing function is

    function bbp_get_topic_post_date( $topic_id = 0, $humanize = false, $gmt = false ) {
    		$topic_id = bbp_get_topic_id( $topic_id );
    
    		// 4 days, 4 hours ago
    		if ( !empty( $humanize ) ) {
    			$gmt_s  = !empty( $gmt ) ? 'U' : 'G';
    			$date   = get_post_time( $gmt_s, $gmt, $topic_id );
    			$time   = false; // For filter below
    			$result = bbp_get_time_since( $date );
    
    		// August 4, 2012 at 2:37 pm
    		} else {
    			$date   = get_post_time( get_option( 'date_format' ), $gmt, $topic_id, true );
    			$time   = get_post_time( get_option( 'time_format' ), $gmt, $topic_id, true );
    			$result = sprintf( _x( '%1$s at %2$s', 'date at time', 'bbpress' ), $date, $time );
    		}
    
    		return apply_filters( 'bbp_get_topic_post_date', $result, $topic_id, $humanize, $gmt, $date, $time );
    	}

    so we can filter this as follows :

    add_filter ('bbp_get_topic_post_date' , 'rew_date' , 10 , 6) ;
    
    function rew_date ($result, $topic_id, $humanize, $gmt, $date, $time) {
    	$result = 'hello' ;
    
    return $result ;
    }

    This should then say ‘hello’ so all we want to do is change $result to read whatever you want – so what do you want it to say ?

    @robin-w

    Moderator

    by admin links, do you mean the edit|merge|close things that appear for admins/mods on topics/replies?

    @robin-w

    Moderator

    ok, how familiar with adding filters are you ?

    @robin-w

    Moderator

    ok looks like you are going to need to get familiar with the templates and some coding then

    In essence you need to copy some templates across to your child theme, and then amend them

    You can copy all the templates across, but you only need to copy those that you want to change, and it is better just to do this, as then you know which you have altered.

    so if you wanted to amend loop-single-forum you would do the following

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-forum.php
    bbPress will now use this template instead of the original
    and you can amend this

Viewing 25 replies - 6,451 through 6,475 (of 14,146 total)