[EAE Add-ons] Viewers

[EAE Add-ons] Viewers 1.0.1

No permission to download
Compatible XF 2.x versions
  1. 2.1
  2. 2.2
Additional requirements
PHP 7.0+
License
You may not redistribute, or repackage in any form.
Visible branding
No
If you have a larger forum with numerous nodes this add-on may not be for you. You could still use it to just display who is viewing a thread.

This add-on keeps track and displays where members are viewing in categories, pages, forums, and threads. On forum home, you may choose to display the members avatar, username, or just the grand total of viewers (clicking the total will open an overlay that displays the members viewing that section of your forum). The data is displayed in a footer within each category, or under each section that does not have a parent category.

For categories, pages, forums, and threads a new row is inserted under the content that displays the viewing members avatar, username, or just the grand total. You may also choose to display members viewing these areas in a widget instead.

What this does: if, for example on forum home you have a setup like this:

Pets
Cats​
no threads, just an empty forum​
Dogs​
Small dogs​
Thread 1 (Joey is viewing this thread)​
Thread 2 (Martin is viewing this thread)​
Large dogs (Anna is in this sub forum)​
Thread Three​

On forum home, you will see in the footer of Pets that Joey, Martin, and Anna are all viewing somewhere within this category. If you enter Cats, no one will be listed as viewing that section. If you go to Dogs, you will see Joey, Martin, and Anna are viewing that sub-forum. If you enter Small dogs you will now just see Joey, and Martin are viewing that sub forum. And so on.

Permissions:
Groups & permissions -> User group permissions -> xxxxxxxxxx -> [EAE] View members viewing forums​

Only those with the permission can view who is viewing a category, page, threads, etc. The permission is not set on install. Be sure to give the user group you want to see who is viewing the permission.

The add-on respects user privacy settings and this can be over-ridden by those that have the bypass privacy permission.

Queries:
Guests will not generate any queries unless they are given the permission to view who is viewing.​
Members will generate one write query whenever they move within a forum. This query is to a memory table.​

Members will generate one read query to retrieve the list of members viewing. If you elect to use a widget, an additional query is needed to retrieve the list of sibling and child nodes.​

Forum home will always generate one query to retrieve the totals, and one additional one if username or avatar is selected to be displayed.​
Misc.
On install one table is inserted: xf_eaevrs_viewers, engine is MEMORY.​
You can style the block that lists members viewing: Appearance -> Style properties -> yourStyle -> [EAE] Viewers.​
A new widget position is added: [EAE] Page view: Sidenav, that you can also use for other widgets if you like.​

Forum home will generate the largest read query as it is the home to all nodes, sub-nodes. If your forum has a large number of nodes it is recommended to set forum home to display totals only. You may even need to set forum home to 0 to disable that feature, select whatever works best for your forum.​

Forum home also comes with the option to use a simpler query for retrieving the list of members viewing each section. This is recommended. See the description in the options for more information about it.​
A cron job runs once an hour to prune the table used to keep track of members viewing: [EAE] Prune viewers.​
Related resources
[EAE Add-ons] Thread participants. If using this add-on, disable the members viewing a thread feature.
  • home_1.png
    home_1.png
    71.7 KB · Views: 192
  • home_2.png
    home_2.png
    73.1 KB · Views: 186
  • home_3.png
    home_3.png
    80.5 KB · Views: 179
  • options.png
    options.png
    570.7 KB · Views: 173
  • page_widget.png
    page_widget.png
    53.1 KB · Views: 169
  • thread_list.png
    thread_list.png
    51.3 KB · Views: 146
  • thread_view.png
    thread_view.png
    36.9 KB · Views: 132
  • widget_1.png
    widget_1.png
    43 KB · Views: 189
Author
Lawrence
Downloads
37
Views
553
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from Lawrence

Latest updates

  1. Bug fix

    - fixed a bug that would throw an error if a member viewing a forum was then deleted. Thanks to...

Latest reviews

Does exactly as advertised. Lawrence was very quick to fix a bug we encountered. Highly recommended.
L
Lawrence
Thank you for the review, it is appreciated.
Top