GetSimple Support Forum

Full Version: Users Online
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
This functionality could be created pretty easily in a plugin.
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
thanks for that, I am trying it out. appreciate the help

www.carrowroad.net/cnews
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
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.
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.
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
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.
(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?