Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Who's Online available to guests as well
"Who's Online available to guests as well"
how can i do that
0
This discussion has been closed.
Comments
if ($Context->Session->UserID > 0) { ... }
That's a condition to eliminate guests. Get rid of that "if" statement. If the clause is a "if ... else ...", get rid of the "if" condition, and then get rid of everything under the "else".
Are you following me?
if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "post.php", "search.php", "settings.php")) && $Context->Session->UserID > 0 && !$Context->Session->User->Preference("HideWhosOnline")) {
That "$Context->Session->UserID > 0" condition is what's keeping guests from seeing the WhosOnline Panel (I believe)... Now that I look at it, it's not quite as simple as erasing the condition (because there's a preference involved). You would probably need to change it to:
if (in_array($Context->SelfUrl, array("account.php", "categories.php", "comments.php", "index.php", "post.php", "search.php", "settings.php")) && !($Context->Session->UserID > 0 && $Context->Session->User->Preference("HideWhosOnline"))) {
Note the NOT operator ("!") and the parenthesis. Try that out. It might work, or it might not. If it doesn't, I would have to look deeper at the code to see what else is going on.