Closed alain01 closed 3 years ago
It is when the block is displayed that the users are saved in the database. So if the block is not available for a group, the members of that group will not be counted.
It is true that the behavior is not very logical, but it is important not to make the requests in the database if we do not want the block.
This behavior should be explained when editing the block or in the help.
All the data is collected by the block being part of page. The best result is when it is part of all the pages, so it can track who is using which module. The only data collected outside of the block is on logout, where the user is removed from the online table.
But, there is a big difference between having a block be part of the page, and the block being seen. If you eliminate the block title, and in your theme template surround everything in a <{if $xoops_isadmin}> ... <{/if}> then only the admin could see the data collected.
Ok I understant your answer and i will close this issue BUT IMO, It's illogical. Why ? Just read this example to understand.
I want to display the online users information only for the members "premium" and "webmasters". So if I used as usually the permission block system, I give right for "premium" and "webmasters" to show this bloc. But they will see only webmasters group and premium group. They could not see that "toto" "tata" and "tutu" as "members" are online. So strange.
Alain
I understand what you are saying, but it isn't a bug. It is a community building feature that works exactly as designed. What you say you want is a very different system, other than the name "online."
A simple solution for your need is to clone the block. This cloned block is available to everyone but you remove the html inside the template. This block collects data but displays nothing. You activate the basic block for the category you want and at the desired location and everything works as you want.
Hey, good brain storming @GregMage Thank you !
Hi, I noticed a strange thing !
I use the online block , but only displayed for the webmasters. ok. So, the block is visible for admin and not for members and anonymous test-user cant see this block, ok
But the block show olny the webmasters who are logged, not members.
admin is logged, test-user is logged too
As admin, I just can see that admin is logged, not test-user
File /themes/xswatch4/modules/system/blocks/system_block_online.tpl