Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

Who's Online 6

CurtisOdenchuck911peregrine422 +2 guests

Allow staff to see hidden users?

This discussion is related to the WhosOnline addon.
Are there any plans to add a permission level to "override" hidden users to let them be seen by certain roles? My moderators would like to be able to see who is skulking about and I'd like to be able to add that for them.

Vanilla developer [GitHub, Twitter]

Comments

  • Just for you @Lincoln I have added it to the latest 0.9 release, worth checking it works. I did some testing and didn't encounter a problem. The database has also changed slightly to not use datetime field and now there is an Invisible field.
  • Posts: 2,058
    Thanks! Much appreciated.

    Vanilla developer [GitHub, Twitter]

  • TimTim
    Posts: 1,573
    Mayhem will love this. I'll install it there and let you know if there are any bugs.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • TimTim
    Posts: 1,573
    Yeah there's a bug. In your structure, you've added the UserID column using 'PrimaryKey()', but that creates an autoincrement field by default. I think you want to change it to something like:

    ->Column('UserID', 'int(11)', FALSE, 'primary')

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • @Tim Thanks, completely forgot that it will auto increment. I have made the fix.
    @Lincoln you should re-download the latest version, or just make the change above.
  • TimTim
    Posts: 1,573
    This most recent update seems to have another flaw. People aren't falling off the list after being gone for some time. The list just grows and grows haha.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • TimTim
    Posts: 1,573
    Found the issue. In the module code, where you select from the Whosonline table:
    $SQL
    ->Select('u.UserID, u.Name, w.Timestamp, w.Invisible')
    ->From('Whosonline w')
    ->Join('User u', 'w.UserID = u.UserID')
    ->Where('w.Timestamp >=', $History)
    ->OrderBy('u.Name');
    Now that you've changed the Timestamp column to a datetime, you need to change the format of the data you compare it with:

    ->Where('w.Timestamp >=', date('Y-m-d H:i:s',$History))

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • @Tim And fixed again, sorry about that. Note to self: Don't change something if you don't have too. There is no easy way to test it, without launching a few different browsers unless you have an active community.
  • Posts: 2,058

    Don't change something if you don't have to

    Annoyingly realist to come to that conclusion, isn't it? :D

    Thanks for the debug, @Tim. I hadn't uploaded the new one yet.

    Vanilla developer [GitHub, Twitter]

  • It's 11pm and feels like it's been a long day. :) woke up for 9am lecture on deterministic finite automaton, never fun.
  • Is there a simple way for a beginner like me to block my users from hiding their on line status?
  • lucluc
    Posts: 1,015
    @avantime4mike:

    I think you should comment out ProfileController_AfterAddSideMenu_Handler and ProfileController_Whosonline_Create functions in default.php.

    Or if you want minimal change, just comment out:
    $SideMenu->AddLink('Options', T('Who\'s Online Settings'), '/profile/whosonline', FALSE, array('class' => 'Popup'));
    It will not add the menu option, but be aware that the link will still be available to use as the second function will still be in the code.

    I greatly prefer the first option, and as an added bonus, it's faster as 2 functions are not parsed anymore :)


Sign In or Register to comment.