Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 6,626 through 6,650 (of 14,305 total)
  • @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

    @robin-w

    Moderator

    agreed, but many ISP’s stop emails with lots of bcc’s in them, clearly that is not your issue then.

    @robin-w

    Moderator

    visbility hidden should make a forum only visible to moderators and keymasters

    If you are not seeing that 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

    no problem

    @robin-w

    Moderator

    @robin-w

    Moderator

    great glad you are fixed

    @robin-w

    Moderator

    @robin-w

    Moderator

    try this

    function rew_login_redirect_url ($redirect) {
    	//quit if it's not a redirect
    	if (strpos($_SERVER['REQUEST_URI'], '?redirect_to=') == false ) return $redirect;
    	$redirect = 'url' ;
    	
    	return $redirect ;
    }
    
    add_filter ('bbp_user_login_redirect_to' , 'rew_login_redirect_url', 5 , 1) ;

    change ‘url’ to where you want it to go

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

    Code Snippets

    In reply to: Search Not Working

    @robin-w

    Moderator

    great – really pleased that you are fixed, and thanks for reporting back

    @robin-w

    Moderator

    if that code does what you want then just use the same logic you did in

    How to reorder topics in one forum?

    eg

    function rkk_topic_av() {
    
    $thisforumid = bbp_get_forum_id();
    
      if($thisforumid == 43135) {
    
    	    	echo bbp_get_topic_author_link( array( 'size' => '48' , 'type' => 'avatar'));
    }
    }
    add_action('bbp_theme_before_topic_title','rkk_topic_av');

    @robin-w

    Moderator

    the green bit can be achieved by

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Freshness Display

    @robin-w

    Moderator

    dashboard>settings>general>date format

    bbpress just follows the WordPress format you set, as it presumes you want dates to look the same all over your site

    otherwise

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Freshness Display lets you play with how it is displayed

    @robin-w

    Moderator

    great – and thanks for posting the final solutions – I’m sure it will help someone else

    @robin-w

    Moderator

    great – you may want to check the favorites for if a user has more than one favorite topic – I am suspecting your code was only tested with 1 favorite – if so same principal, if not I don’t know why one works and then other doesn’t !!

    @robin-w

    Moderator

    syntax error

    line

    add_filter('bbp_before_has_topics_parse_args', 'my_custom_display_topic_index_query ' );

    should read

    
    add_filter('bbp_before_has_topics_parse_args', 'my_custom_display_topic_index_query' );

    is essence you have a space after the word query before the ‘ in 'my_custom_display_topic_index_query '

    @robin-w

    Moderator

    looks like it hasn’t converted to an array basically it should read

    array (size = 2)
    0 => 149
    1 => 65

    etc.

    ok so let’s try replacing

    $topicsub_list = array(get_usermeta ($user->id, 'wp__bbp_subscriptions', false)) ;

    with

    $topicsub_lista = get_usermeta ($user->id, 'wp__bbp_subscriptions', true) ;
    $topicsub_list = explode (',' , $topicsub_lista) ; 
Viewing 25 replies - 6,626 through 6,650 (of 14,305 total)