HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Guest Search

Hello,

Is there a way to limit guest from using the search function and redirecting them to signup page?

Comments

  • do you know how to modify default.master.tpl?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited November 2015

    if so. and if you have a tpl based theme.

    there a way to limit guest from using the search function

    you could hide it from your display if you want although I wouldn't do it. nor would I force a signin for someone searching. people will join if they find your site useful.

    as far as redirect someone else can provide answer.

      {if ($User)}
          <div class="SiteSearch">{searchbox}</div>
          {/if}
    

    A couple of tips for you.

    provide the version of vanilla you are using. post in the proper category.
    if you are asking a question - that really is not feedback? is it?

    specify which theme you are using.

    it will aid in helping people to help you.

    http://vanillaforums.org/discussion/26943/tutorial-how-to-determine-the-version-number-of-vanilla-that-you-are-using-for-your-own-forum

    http://vanillaforums.org/discussion/28420/faq-what-frequently-asked-questions/p1

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited November 2015

    @whatsupbro said:
    Hello,

    Is there a way to limit guest from using the search function and redirecting them to signup page?

    yes. today is your awesome lucky day.

    guest tries to search clicks on magnifying glass, redirected to sign in page, signs in, and sent to discussions page. change target in plugin if you want to go somewhere else.

    • 1 download the attached plugin, unzip it, enable in dashboard.

    edited: SearchSignIn plugin version 1.1

      1. add to you theme default.master.tpl

        {if $User}

        {searchbox}

        {/if}
        {if !$User}

        {search_signin}

        {/if}

    • 3 see if it works for you and respond accordingly.

    if you have a problem - the steps have to be done in order.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @whatsupbro

    not sure if you tried it or not ....

    I wrote the plugin for a lark not because I thought it was valuable or useful.

    It still doesn't stop someone from using a direct url.

    not does it prevent them from using google search with site:

    seems like an absolute annoyance to me to have to sign in if I want to search.
    maybe one has nothing to post.

    make it private if you want to keep people out, instead of crippling it by making people jump through hoops. Seems like that feature would dissuade people instead of encouraging people to use your forum.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • thanks man, really helpful! I am going to try to implenet this later today.

Sign In or Register to comment.