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.

Feedreader add-on: make it visible if not logged in

byttebytte
edited April 2007 in Vanilla 1.0 Help
I really like the feedreader extension. However, I'd like it to show up to the people who aren't logged in as well. So to anyone browsing the forums. Can I do this easily?

Comments

  • Check out the default.php file (sorry I dont have it to hand and I'm in the middle of something) there's probably an if statement in there which checks $Context->Session->UserID > 0 (or similar). Just take that checking out.
    If you cant work it out from that let us know and someone will find time to check it out in more detail for you.
  • Thanks, that did the trick.
  • Hmmm. In my default.php file is $Context->Session->UserID > 0 but anonymous users don't see feedreader
  • Users with id of 0 are unauthenticated (anonymous).
    So it looks like it is set to greater than 0 which means members only.

    Posted: Friday, 13 April 2007 at 4:36PM

  • @Wanderer
    No, it's set to 0 in my /extensions/FeedReader/default.php file
    /****************************************************************************** ATTACH LIST ******************************************************************************************/ if (in_array($Context->SelfUrl, array("categories.php", "comments.php", "index.php", "post.php")) && $Context->Session->UserID > 0) { $frr = new FeedReaderRender($Context->GetDefinition("FeedReader.URI"), $Context->GetDefinition("FeedReader.CacheTTL")); $frr->attachToList(); }
  • I've solved this problem. I had to change this:
    && $Context->Session->UserID > 0)
    to:
    && ($Context->Session->UserID == 0 || $Context->Session->UserID > 0))
    and now every user with any ID can see the feedreader
  • Yes I know, it it set to only display if the user is authenticated.

    I think you need to remove this bit...
    ) && $Context->Session->UserID > 0)

    I may have included/excluded a stray bracket or two though.

    Posted: Friday, 13 April 2007 at 8:17PM

  • edited April 2007
    I can't remove this part:
    ) && $Context->Session->UserID > 0)
    becouse if I remove it the feedreader will only avaible for anonymous users, not for member and not for administrators.
    Before this part is "UserID == 0" probably you know it's mean ONLY for user width ID=0, so only for anonymous.

    Regards
This discussion has been closed.