Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted December 30, 20213 yr How can I get the who's online widget to display the counts for guests and members/anonymous etc. I am struggling to find out how though I'm sure there's an option somewhere. I use the page builder and add the widget but it only shows the member online which right now is only me. Does not show the counts for the members or guests. How do I display the count? Do I need to know some template knowledge or is it an option I'm not seeing? If so, can you provide the template code real fast. Thank you for helping if you can.
December 30, 20213 yr Community Expert How can I get the who's online widget to display the counts for guests and members/anonymous etc. I am struggling to find out how though I'm sure there's an option somewhere. I use the page builder and add the widget but it only shows the member online which right now is only me. Does not show the counts for the members or guests. How do I display the count? Do I need to know some template knowledge or is it an option I'm not seeing? If so, can you provide the template code real fast. Thank you for helping if you can. There is no built in option for that a.f.a.i.k. That will require custom coding. A template edit only is not enough. The whosOnline.php file located at applications/core/widgets will have to be modified too.
December 30, 20213 yr Solution The variables are accessible from the widget as $memberCount, $guests, $anonymous, but the idea of the widget is to list the names of the members itself. It’s not about full stats. For an alternative view and a turn-key solution, you can also check out this plugin:
December 30, 20213 yr Community Expert There is no built in option for that a.f.a.i.k. That will require custom coding. A template edit only is not enough. The whosOnline.php file located at applications/core/widgets will have to be modified too. If you go some route like this, it would be advised to do a plugin rather than modifying the core files (of course, self-hosted as the access is not there on Cloud). Modifying the core files will make things hard to upgrade and if any issue come from modifying core files, we will need the core files restored before providing support.
December 30, 20213 yr Community Expert If you go some route like this, it would be advised to do a plugin rather than modifying the core files (of course, self-hosted as the access is not there on Cloud). Modifying the core files will make things hard to upgrade and if any issue come from modifying core files, we will need the core files restored before providing support. Of course. Modifying of files is not advisable. What I meant to say above is that a template edit only was not enough, as the OP asked, but other stuff was required too.
December 30, 20213 yr Author It shouldn't be too hard to make an add-on. I'll take a look at your documentation thank you for all the replies. I made 2 or 3 add-ons before on another software. Will be something to learn from and will be exiting to go ahead with it since it should be easier then it sounds. I appreciate the help.
December 30, 20213 yr You can also easily create a custom version of almost any widget using Pages custom blocks. Custom templates are part of that and it wouldn’t require plugins or theme changes. You just need to be aware that those blocks are being cached, which can be problematic when live data such as online users are meant to be shown.