Stagger Lee (@stagger-lee)

Forum Replies Created

Viewing 25 replies - 51 through 75 (of 117 total)
  • @stagger-lee

    Participant

    Profile counts topics and posts right, but display is wrong. Almost as you moved posts/topics between different Users (owners).
    Did you maybe deleted one User and made new one with same username ?

    Do you use caching plugin ? Fast, they usually work OK with bbPress.

    @stagger-lee

    Participant

    Did you play with roles recently ?

    @stagger-lee

    Participant

    Because you use “comma”, “,”. There you have 3 different and separate rules, “.article” is defined globally for whole website.

    @stagger-lee

    Participant

    Works well for me.

    @stagger-lee

    Participant

    Make CSS override. It will be lost with bbPress update.

    @stagger-lee

    Participant

    Separate bbp-forum-content on bbpress.css line 537 or use !important:

    .bbp-forum-content {
    margin: 0 0 0 73px !important;
    }

    display:table; gives you same effect.

    @stagger-lee

    Participant

    Take rest with CSS. Dont know how it looks.

    Small warning. If your forum is not visited well it could look amateurish. You will have post after post, after post, avatar of one and same User/Topic author.

    Same situation is if you use automatic bbPress topic from WordPress Posts.

    Making bigger avatars can make things worse if you dont have many Users. For instance another tweak “last commenter avatar”. I tried all this, and if you have just one User who like to comments more than other Users, it looks boring to see enlarged avatar of this User on whole screen everywhere.

    I mean easier to take it if avatar is few pixels big.

    @stagger-lee

    Participant

    Sorry, my mistake.
    Just tested and noticed it is only for topic form, not reply form.

    @stagger-lee

    Participant

    This is for custom info block above comment form:

    function ntwb_custom_topic_form_notice() {
    	?>
    	<div class="bbp-template-notice">
    		<p>Something here...</p>
    		<p>Something else...</p>
    	</div>
    	<?php
    
    }
    add_action( 'bbp_theme_before_topic_form_notices', 'ntwb_custom_topic_form_notice' );
    In reply to: Request: Voting

    @stagger-lee

    Participant

    Be very careful if you plan to use Like/Vote for comments/replies. Each reply is treated as separate Post and you could very easy slow down your forum tremendously.
    And maybe your whole WP site, I see you need to use widget too.

    @stagger-lee

    Participant

    Try with this:
    (I am not sure if it is this 100%, but try)

    //* Notice the line 7, 8, 10 and 11
    function my_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
        $author_avatar = '';
        if ($size == 14) {
            return $author_avatar;
        }
        if ($size == 80) {
            $size = 110;
        }
        $topic_id = bbp_get_topic_id( $topic_id );
        if ( !empty( $topic_id ) ) {
            if ( !bbp_is_topic_anonymous( $topic_id ) ) {
                $author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );
            } else {
                $author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );
            }
        }
        return $author_avatar;
    }
    
    /* Add priority (default=10) and number of arguments */
    add_filter('bbp_get_topic_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
    add_filter('bbp_get_reply_author_avatar', 'my_bbp_change_avatar_size', 20, 3);
    add_filter('bbp_get_current_user_avatar', 'my_bbp_change_avatar_size', 20, 3);

    @stagger-lee

    Participant

    @lanhuong11022, what is that ? Is that bbPress forum ?

    @stagger-lee

    Participant

    You can use same function for bbPress part, I believe. It is up to you where do you want to adapt it.

    Or maybe “is_user_logged_in()”:

    http://wordpress.stackexchange.com/questions/34429/how-to-check-if-a-user-not-current-user-is-logged-in

    @stagger-lee

    Participant

    Move all this to another topic, to not ruin this.

    members-loop-php (BuddyPress)

    member-header.php (BuddyPress)

    Cannot make links clickable. Great advertising for bbPress forum script.

    @stagger-lee

    Participant

    functions.php:

    /**
    * webdeveloperswall.com/buddypress/check-if-a-user-is-online
    **/
    function is_user_online($user_id, $time=5){
    	global $wp, $wpdb;
    	
    	$user_login = $wpdb->get_var( $wpdb->prepare( "
    SELECT u.user_login FROM $wpdb->users u JOIN $wpdb->usermeta um ON um.user_id = u.ID
    WHERE u.ID = $user_id
    AND um.meta_key = 'last_activity'
    AND DATE_ADD( um.meta_value, INTERVAL $time MINUTE ) >= UTC_TIMESTAMP()
    " ,APP_POST_TYPE
    ));
    	if(isset($user_login) && $user_login !=""){
    		return true;
    	}
    	else {return false;}
    }

    pastebin.com/hEfRfKGe
    members-loop-php (BuddyPress)

    pastebin.com/9AyQJHBe
    member-header.php (BuddyPress)

    Probably the same process for bbPress alone. Cannot ruin now all to test it.
    Font Awesome needs to be activated for frontend. Or more easy, activate Dashicons for frontend and use some other SVG icon.

    s14.postimg.org/i6oixhaj5/2015_03_27_220006.jpg

    s21.postimg.org/xde02ec6v/2015_03_27_221745.jpg

    Some CSS:

    .bp-user #buddypress .online .fa-wifi {
    	color:green; 
    	font-size:22px;
    }
    .bp-user #buddypress .offline .fa-wifi {
    	color:#cf4d35; 
    	font-size:22px;
    }
    .bp-user #buddypress .online, 
    .bp-user #buddypress .offline {display:inline-block; text-align:right;float:right;}
    .members #buddypress .online-list .fa-wifi {color:green; font-size:15px;}
    .members #buddypress .offline-list .fa-wifi {color:#cf4d35; font-size:15px;}
    
    #buddypress .online-list,
    #buddypress .offline-list,
    #buddypress .offline,
    #buddypress .online {font-size:12px;}

    @stagger-lee

    Participant

    Cannot post same comment on some other topic either. Duplicate content warning.

    @stagger-lee

    Participant

    Cannot post it. Fix this stupid filter. What is this ?

    @stagger-lee

    Participant

    Nice plugin. I did it manually in bbPress profile screen and BuddyPress screen, with SVG Wifi colored icons. Not easy to explain how, different files involved.
    But for topic user info could not manage it. Different queries.

    @stagger-lee

    Participant

    Just checked. Ignore User plugin works well even 3 years old:

    https://wordpress.org/plugins/bbpress-ignore-user/

    @stagger-lee

    Participant

    @Peter-Hamilton man, admin you are lying and trolling us ? 🙂
    How it is possible you made something like this without experience in PHP and WordPress.
    Mathematically impossible.

    @stagger-lee

    Participant

    I have working example of it. Will check later how it is done, now I am sitting at Netbook without my localhost sites.

    @stagger-lee

    Participant

    My CSS is picked from CSS folder of theme, not plugin.

    @stagger-lee

    Participant

    Copy bbpress.css to your theme-folder/css folder and change to whatever you like.

    @stagger-lee

    Participant

    Change 22902 to 504.

    @stagger-lee

    Participant

    It wont do, you need CSS styling.

Viewing 25 replies - 51 through 75 (of 117 total)