Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorHamed
    • CommentTimeDec 19th 2007
     # 1
    "Who's Online available to guests as well"
    how can i do that
    • CommentAuthortimfire
    • CommentTimeDec 19th 2007
     # 2
    Whenever you see this in the code:

    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?
    •  
      CommentAuthorHamed
    • CommentTimeDec 19th 2007
     # 3
    no i don't u think u understood what i asked
    what i wanted was so that the guests could see who is online

    is that what u answered or did u answer how to remove the guests from the online list?

    thanxz
    • CommentAuthortimfire
    • CommentTimeDec 20th 2007
     # 4
    I was trying to point you in right direction without actually looking at the extension... Umm, in WhosOnline, at lines 149 & 150, you see:

    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.
    •  
      CommentAuthorHamed
    • CommentTimeDec 20th 2007
     # 5
    thanx
    i will try it out and tell u what happens
    •  
      CommentAuthorHamed
    • CommentTimeJan 3rd 2008
     # 6
    sweet it worked
    thanxz
Add your comments
    Username Password
  • Format comments as