LiveWidgets - Who Is Online? #1380

Open
robocoder opened this Issue May 25, 2010 · 11 comments

Comments

Projects
None yet
5 participants
@robocoder
Contributor

robocoder commented May 25, 2010

We have received permission from Martin Angelov to include his "Who is online?" widget in Piwik.

See demo at: http://tutorialzine.com/2010/03/who-is-online-widget-php-mysql-jquery/

To Do:

  • port to use Piwik backend, database, and images (e.g., country flags)
  • add to new LiveWidgets plugin
  • respect anonymous view access setting; more fine grained access will depend on #283
@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder May 25, 2010

Contributor

Files:

  • connect.php - use Piwik's db connection instead
  • functions.php - get_tag() parses hostip.info response; is_bot() is used to prevent direct access to the .php files by bots
  • geodata.php - returns top 15 countries with most visitors and flags
  • online.php - tracker and current count
  • table.sql - redundant; use Piwik's log_visit table

Re-mapping columns to Piwik:

  • id - idvisit
  • ip - location_ip
  • country - (n/a - use a translation lookup on the country code)
  • countrycode - location_country
  • city - (n/a - not used by "Who is online?"; could be mapped
  • dt - visit_last_action_time
Contributor

robocoder commented May 25, 2010

Files:

  • connect.php - use Piwik's db connection instead
  • functions.php - get_tag() parses hostip.info response; is_bot() is used to prevent direct access to the .php files by bots
  • geodata.php - returns top 15 countries with most visitors and flags
  • online.php - tracker and current count
  • table.sql - redundant; use Piwik's log_visit table

Re-mapping columns to Piwik:

  • id - idvisit
  • ip - location_ip
  • country - (n/a - use a translation lookup on the country code)
  • countrycode - location_country
  • city - (n/a - not used by "Who is online?"; could be mapped
  • dt - visit_last_action_time
@julienmoumne

This comment has been minimized.

Show comment
Hide comment
@julienmoumne

julienmoumne May 26, 2010

Member

I would like to work on this ticket to have a feel on how plugins are developed within Piwik.

Could you please confirm that this widget would be added on the dashboard using "Add a widget" -> "Live!" -> "Who is online?"

Also, would the widget be integrated as is or should its design be remodeled
to look like the other widgets. E.g: should it be enclosed in the "widget container", I'm refering to :

<div id="" class="widget">
    <div class="widgetTop"/>
    <div class="widgetContent"/>
</div>
Member

julienmoumne commented May 26, 2010

I would like to work on this ticket to have a feel on how plugins are developed within Piwik.

Could you please confirm that this widget would be added on the dashboard using "Add a widget" -> "Live!" -> "Who is online?"

Also, would the widget be integrated as is or should its design be remodeled
to look like the other widgets. E.g: should it be enclosed in the "widget container", I'm refering to :

<div id="" class="widget">
    <div class="widgetTop"/>
    <div class="widgetContent"/>
</div>
@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder May 27, 2010

Contributor

Attachment:
arrow_up.gif

Contributor

robocoder commented May 27, 2010

Attachment:
arrow_up.gif

@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder May 27, 2010

Contributor

Notes:

  • use attached image, arrow_up.gif, to replace arrow.png
  • the demo's slide out effect to display the visitor-by-country panel isn't suited to iframes, so should not be implemented as a single Piwik widget
  • implement two separate Piwik widgets:
    • Live Counter
    • Live Visitors By Country
  • use JavaScript and jQuery to .load these two widgets, duplicating the effect in Martin's demo
  • may want to use setContentType from #1384
Contributor

robocoder commented May 27, 2010

Notes:

  • use attached image, arrow_up.gif, to replace arrow.png
  • the demo's slide out effect to display the visitor-by-country panel isn't suited to iframes, so should not be implemented as a single Piwik widget
  • implement two separate Piwik widgets:
    • Live Counter
    • Live Visitors By Country
  • use JavaScript and jQuery to .load these two widgets, duplicating the effect in Martin's demo
  • may want to use setContentType from #1384
@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab May 28, 2010

Member

Julien, you are welcome to work on it indeed :)

Member

mattab commented May 28, 2010

Julien, you are welcome to work on it indeed :)

@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder May 29, 2010

Contributor

There's some ambiguity with the license and I haven't received a response from Martin yet, so I'll wrap this into a third-party plugin, in the interim.

Contributor

robocoder commented May 29, 2010

There's some ambiguity with the license and I haven't received a response from Martin yet, so I'll wrap this into a third-party plugin, in the interim.

@robocoder

This comment has been minimized.

Show comment
Hide comment
@robocoder

robocoder Nov 26, 2010

Contributor

Attachment: Released under GPL by Martin Angelov
who-is-online-gpl.zip

Contributor

robocoder commented Nov 26, 2010

Attachment: Released under GPL by Martin Angelov
who-is-online-gpl.zip

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Apr 28, 2011

Member

It would be nice to do this I think, would improve our 'marketingness' as we could maybe put a little piwik logo or a link in the output?

Also, this widget is a nice idea: http://s04.flagcounter.com/count/lng/bg=FFFFFF/txt=000000/border=CCCCCC/columns=2/maxflags=18/viewers=0/labels=1/pageviews=1/

Member

mattab commented Apr 28, 2011

It would be nice to do this I think, would improve our 'marketingness' as we could maybe put a little piwik logo or a link in the output?

Also, this widget is a nice idea: http://s04.flagcounter.com/count/lng/bg=FFFFFF/txt=000000/border=CCCCCC/columns=2/maxflags=18/viewers=0/labels=1/pageviews=1/

@mattab

This comment has been minimized.

Show comment
Hide comment
@mattab

mattab Apr 28, 2011

Member

@robocoder robocoder added this to the Future releases milestone Jul 8, 2014

@mattab mattab removed the P: normal label Aug 3, 2014

@ThaDafinser

This comment has been minimized.

Show comment
Hide comment
@ThaDafinser

ThaDafinser Feb 25, 2015

Contributor

Integrated partly here, by @tsteur http://plugins.piwik.org/LiveTab

Contributor

ThaDafinser commented Feb 25, 2015

Integrated partly here, by @tsteur http://plugins.piwik.org/LiveTab

@tsteur

This comment has been minimized.

Show comment
Hide comment
@tsteur

tsteur Feb 25, 2015

Member

This could be developed in a plugin that could provide several different badges like this. Would be interesting! Especially since it could maybe also give Piwik more visibility if people embed it on their website.

In LiveTab I only display the number of visits etc in the browser tab of the Piwik user and I currently do not intend to extend it due to not having enough time :(

Maybe someone wants to develop this in a plugin? Added a label...

Member

tsteur commented Feb 25, 2015

This could be developed in a plugin that could provide several different badges like this. Would be interesting! Especially since it could maybe also give Piwik more visibility if people embed it on their website.

In LiveTab I only display the number of visits etc in the browser tab of the Piwik user and I currently do not intend to extend it due to not having enough time :(

Maybe someone wants to develop this in a plugin? Added a label...

@mattab mattab modified the milestones: Long term, Mid term Dec 23, 2015

@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment