Fork me on GitHub

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Current release is 2.1.6 (21 Nov 2014).

Users who have not yet upgraded to 2.1 should get security release 2.0.18.14 (1 Nov 2014). We will stop providing these security releases to 2.0 at the end of this year.

Hide "Popular Tags" for guest visitors until they are logged in*

edited February 2011 in Vanilla 2.0 Help
Hi All, new to Vanilla, but I have it working really well. Only one issue so far - I want to hide everything unless the visitor is signed up. I have managed to do this and hide everything except Popular Tags are still visible on the homepage. Any idea how I can hide these until after login?
Tagged:

Comments

  • edited July 2011
    You can do it by editing file /plugins/Tagging/class.tagmodule.php

    Find function ToString (its at line 43)

    add a new line after line 47 and paste there following code:

    if (Gdn::Session()->UserID == 0) return '';

    We do here check if user has logged in - the condition in parentheses, and return an empty line instead of html block, if he has not.

    I know it is a dirty hack, but it works :P
Sign In or Register to comment.