Posts: 83
Threads: 21
Joined: Sep 2011
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
Posts: 679
Threads: 80
Joined: Nov 2009
This functionality could be created pretty easily in a plugin.
Posts: 1,204
Threads: 30
Joined: Jun 2010
2012-04-23, 08:19:01
(This post was last modified: 2012-04-25, 09:16:47 by BlackRose.)
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
Addons: blue business theme, Online Visitors, Notepad
Posts: 83
Threads: 21
Joined: Sep 2011
thanks for that, I am trying it out. appreciate the help
www.carrowroad.net/cnews
Posts: 1,204
Threads: 30
Joined: Jun 2010
2012-04-25, 05:32:26
(This post was last modified: 2012-04-25, 09:17:40 by BlackRose.)
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
I'll clean up the code, and publish it in extend.
edit: online visitors plugin can be downloaded from extend
Addons: blue business theme, Online Visitors, Notepad
Posts: 83
Threads: 21
Joined: Sep 2011
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.
Posts: 1,204
Threads: 30
Joined: Jun 2010
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.
Addons: blue business theme, Online Visitors, Notepad
Posts: 83
Threads: 21
Joined: Sep 2011
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
Posts: 1,204
Threads: 30
Joined: Jun 2010
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.
Addons: blue business theme, Online Visitors, Notepad
Posts: 21
Threads: 2
Joined: Sep 2012
(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?
Zdravim vsechny!
|