Skip to:
Content
Pages
Categories
Search
Top
Bottom

Whos Online Avatar


  • xp02ed
    Participant

    @xp02ed

    WP 2.9 Single User
    BD 1.2.1 or 1.2 ( tested on both)

    The online avatar widget has never worked, i can see people online via the members box and have tested this myself using 2 users and 2 browsers.

    I have looked at the function it uses

    bp_has_members( 'user_id=0&type=online&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] . '&populate_extras=0' )

    I have changed type=active which shows me recently active members

    using “online” doesnt seem to work. cant find any documentation on arguements for this function

Viewing 2 replies - 1 through 2 (of 2 total)
  • Same here. Who’s online never seems to work. Am working on the solution now, if anyone has feedback on this, e.g. have you got it to work etc. please comment!

    @xp02ed

    I’ve tracked down the root of the problem (at least in my case), it’s most likely that you server clocks are out of sync (timezones) between your system, php and mysql.

    (This explanation might be wrong with exactly where times are pulled from, but is correct as to the fact that they’re pulled from different places!)

    The bit that checks recently online users looks at the last activity entry in user_meta and checks for users logged in within the past 5 minutes. However, last_activity user meta is logged by wordpress using PHP gmdate, and when you search for the last activity in this widget, it uses MYSQL’s NOW() function. If your times are out of sync a user with last activity of <5 minutes will never happen.

    Example:

    In my local server, the times of last activity are being logged as GMT by WP (PHP). However, I’m in CET and mysql takes it’s timezone from the system (windows), so everyone no matter what was last “seen” by WP and BP at least an hour ago.

    See below for more info on setting MySQL timezones

    http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Whos Online Avatar’ is closed to new replies.
Skip to toolbar