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 10

CurtisOdenSpencerMcjsebeanx00 +6 guests

Whos Online

This discussion is related to the WhosOnline addon.
Whos Online
«1

Comments

  • SS
    Posts: 458
    1. Structure. Add primary key on UserID field.
    2. DiscussionsController_Render_Before, DiscussionController_Render_Before, CategoriesController_Render_Before are sameness in body.
    Try this way:
    public function Base_Render_Before(&$Sender) {
    if( !In_Array($Sender->ControllerName, array('categoriescontroller', 'discussioncontroller', 'discussionscontroller')))
    return;
    $ConfigItem = Gdn::Config('WhosOnline.Location.Show', 'every');
    // ....

    3. For any not logged-in users $Session->UserID = 0, but WhosOnlineModule::GetData() ($SQL->Replace) is called every time in *_Render_Before.
    4. Dislike this construction:
    $Parts = explode("/", Gdn_Url::Request());
    Maybe better to check this vars $Sender->ControllerName, $Sender->ApplicationFolder ?
  • A new version has been uploaded which addresses the items mentioned above by S. I would like to that S for finding these fixes.
  • Posts: 0
    I know this is a stupid question but I'm new to this. How do I install the plugin?
  • Providing you have vanilla 2, you just have to copy the whosonline folder to the plugins directory. Then on your forum go Dashboard > Plugins > and click enable on the whos online one.
  • lucluc
    Posts: 1,015
    Some issues with the vanilla2 version I've got (tarball from 17/09):

    In default.php it adds in css:
    /plugins/whosonline/whosonline.css

    But the zip decompress to WhosOnline/ so it doesn't work on unix based host.

    Furthermore, when trying to access the configuration page (http://vanilla2/plugin/whosonline), I've got:
    Fatal error: Class 'Form' not found in /var/www/vanilla2/plugins/WhosOnline/default.php on line 22
  • Vanilla has been updated since i released it i will try and update the plugin soon.
  • lucluc
    Posts: 1,015
    With Todd's modification today (that helped with the path issues, I think I opened an issue for that, or at least I mentionned it in the forum (cssthemes/CssThemes wasn't working), and I didn't, I should have :) ), you just need to change:

    $Sender->Form = new Form();

    to

    $Sender->Form = new Gdn_Form();

    in default.php
  • Posts: 223
    Getting this error:
    Fatal error: Cannot pass parameter 1 by reference in /home/web/public/plugins/WhosOnline/default.php on line 24
  • same here
  • Sorry, i suggest you don't use this unless someone wants to fix it up for me.
  • lucluc
    Posts: 1,015
    @Immersion

    I've "fixed" it. I don't know how well though :), at least it works.

    But, apparantly the "Foot" AssetTarget doesn't work anymore so I've replaced it with Panel.

    It's there: http://bitbucket.org/bean/whosonline/
  • lucluc
    Posts: 1,015
    Or you can get the zip file directly there: http://bitbucket.org/bean/whosonline/downloads/?highlight=4277
  • Posts: 840
    Many thanks for creating this add-on, I'm not entirely sure of what's involved to bring this back in line with the latest version, but it is currently the most popular Vanilla 2 add on with 806 downloads, not sure if anyone else is planning on picking up development? Thanks :)
  • lucluc
    Posts: 1,015
    It's been done already, see the bitbucket depot.
  • Thanks @bean the plugin has finally got updated with your version, so cheers.
  • lucluc
    Posts: 1,015
    I've added back the Foot Asset on Garden (mark included it on github) so it can be back using Foot as AssetTarget instead of Panel.

  • @bean I tried it, but its not the same as previous it appears and rendered it differently. I think some of the css has changed, so i moved it back to Panel.
  • lucluc
    Posts: 1,015
    I've set the Foot Asset, after the "powered by vanilla", maybe it was above before?
    You can try to put it before (that's in there: applications/garden/views/default.master.php)
  • @bean yeah i believe that it was indeed before. Ill try changing stuff around tomorrow.
  • lucluc
    Posts: 1,015
    If you confirm it was like that and that it's looking fine, I'll make a pull request for mark changing the asset position.
  • Posts: 840
    Ah amazing, thank you so much, will install tonight :)
  • Posts: 4,883
    @garymardell - awesome addon. I finally had a chance to set it up locally and play with it. One thing I noticed missing is the admin side menu on your admin page. You can add it (And highlight your whos online link) by adding this line to the top of your PluginController_WhosOnline_Create() method:

    $Sender->AddSideMenu('plugin/whosonline');
  • lucluc
    Posts: 1,015
    Strange it's not there, it was added in my version: http://bitbucket.org/bean/whosonline/changeset/ab2d3e7ea607/
  • Posts: 4,883
    @garymardell - I ended up doing a bunch of changes, optimizations, and cleanup to my version of this. I've emailed you my version if you want to use the changes.

    My changes included:
    - Removal of GetFrequency ajax call. Passed the Frequency value into the necessary pages using Controller->AddDefinition().
    - Changed who's online list to be list items with the last active time next to each username (this means I got rid of the unnecessary css file, too).
    - Fixed javascript to use absolute urls (fixed a bug that caused the plugin to stop working when the forum was installed in a subdirectory).
  • Posts: 4,883
    Just found and fixed another bug - the user anchors were linking to the viewing user, not the name being clicked. Emailed revisions to @garymardell :)
  • Thanks @Mark, i replied to your email. The improvements are great and thanks for taking some time to actually look at my addon :)
  • Posts: 4,883
    Man - we really need some source control integrations on the addons site, huh?
  • Yeah just a tad, this is getting crazy. Ill update and call it version 0.5 just so people will upgrade.
  • Posts: 819
    Only just realised that the plugin has had over 1000 downloads, thanks guys.
  • Posts: 12
    Hi, the plugin works fine for my site. I would want to know what would happen if there were like 1000+ users who are online? Will it list down all the 1000+ users to an infinite list of usernames? :)

    Great and useful plugin! :)
Sign In or Register to comment.