GetSimple Support Forum
Users Online - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Users Online (/showthread.php?tid=3100)



Users Online - gordo - 2012-04-22

Is there anyway of displaying the number of people viewing a page.

I have no membership to my site, it is a simple read news site. Feeding through NewsNow, I have a page counter giving number of hits etc but would like to monitor the numbers of viewers, when an article is fed through


Users Online - JWH_Matthew - 2012-04-23

This functionality could be created pretty easily in a plugin.


Users Online - yojoe - 2012-04-23

I've created an online visitors counter, but it counts all website's visitors, not per page.
Counter looks for browser ID data, so if you visit your website in 2 or more different browsers at once, counter will show 2 visitors.
If it works out of box, I'll add it to extend.

To show the counter, just call the function in your template file:
Code:
<?php visitors_online(); ?>
You can also set up the label, and amount of time the visits will be counted in plugins > online visitors tab.

edit: it also counts bots&crawlers currently visiting/indexing the website


Users Online - gordo - 2012-04-25

thanks for that, I am trying it out. appreciate the help

www.carrowroad.net/cnews


Users Online - yojoe - 2012-04-25

I forgot to mention that you can stylize the text responsible for showing visitors online.
Its default syntax is:
Code:
<h5 id="usersonline">Visitors online: X </h5>
I think I'll switch to <h6> tag, to allow an easy formatting.
For example
h6#usersonline {
text-align:center;
}

Unfortunately without using database, visitors can't be counted per page.
This is a simple plugin, and judging by your website I see it is working Smile
I'll clean up the code, and publish it in extend.

edit: online visitors plugin can be downloaded from extend


Users Online - gordo - 2012-04-25

works a treat for me, the only thing I could adjust the color of the font, but I am not too fussed as the object has been reached.

I am more than happy, it is very much appreciated.


Users Online - yojoe - 2012-04-25

You can stylize whole text they way you want.
Just add to your css:
Code:
h6#usersonline {
text-align:center;
color: black; /* font color */
font-size:9pt;
}
and other css styles you'd like.

Now I realize that label ("visitors online") and digits could have different styles.
If it's needed, I can change the outputted html, and add more formatting possibilities.


Users Online - gordo - 2012-05-04

yojoe Wrote:You can stylize whole text they way you want.
Just add to your css:
Code:
h6#usersonline {
text-align:center;
color: black; /* font color */
font-size:9pt;
}
and other css styles you'd like.

Now I realize that label ("visitors online") and digits could have different styles.
If it's needed, I can change the outputted html, and add more formatting possibilities.


I am very satisfied with the outcome, but others may like the extra formatting, turned into a handy little plug in


Users Online - yojoe - 2012-05-07

gordo Wrote:I am very satisfied with the outcome, but others may like the extra formatting, turned into a handy little plug in

You mean that users could change the font-size and colour from the backend ?
To be honest I'm not a fan of inline styles.


RE: Users Online - kasztelan - 2013-11-06

(2012-04-23, 08:19:01)yojoe Wrote: I've created an online visitors counter, but it counts all website's visitors, not per page. (...)
I have a question.
I download this plugin v. 1.1 from extend, but on Plugin Management on website I see Online Visitors Counter Version 1.0. Update to 1.1.
What's happened?