PageWatchers

Categories

Component ID

2211541

Component name

PageWatchers

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

676

Component created

Component changed

Component body

INTRODUCTION

This module allows you to display the number of the users currently on any particular page. That's it!

CONFIGURATION

On the configuration page of the module (admin/config/pagewatchers), the following can be set:

- 'Count for anonymous users': As the name suggests, set whether to count anonymous users.

- 'Cache Lifetime': Define how old do cached numbers have to be to be considered too old and be discarded. Set to 0 to disable. (Disabling caching might prove useful while still in development stages)

- 'AJAX Update Intervals': Define the intervals between the AJAX updates by the JS.

HOW TO USE

-OPTION 1 (EASY):
The module defines a block "Online Users On Page". Just use it as you would use any regular block!

-OPTION 2 (ALSO EASY!):
The JS in the module will automatically detect for any HTML element with class "pagewatchers--live-count". Simply having such element(s) on the page will have the script automatically update it with the number of online users.

TO DO:

- Use cookies to do client-side caching (for the case of multiple tabs open at the same time)
- Allow fetching the number of online users on pages other than the current page

SPONSORSHIP

Development of this module was sponsored by Steve Swetman at Just-Cast.Just-Cast.org