HomeHome  
  • WelcomeWelcome  
  • Events  
  • PublicationsPublications  
  • FAQFAQ  
  • SearchSearch  
  • MemberlistMemberlist  
  • UsergroupsUsergroups  
  • RegisterRegister  
  • Log inLog in  
  • You are not connected. Please login or register


    Redirect guests on another page

    avatar
    • Administrator

        Reputation : 315
        Registered on : 2012-02-22
        Posts : 2317
        School of codes courses: coming soon
      Redirect guests on another page

      Description


      Redirect guests to a page

      Thanks to LGforum :zen:

      Set up


      You have just to add this code to the page you want the guests won't be able to see...
      Code:

      <script>
      var guest = '{USERNAME*}';
      if(guest == 'Guest') window.location = 'redirection url';
      </script>

      Customize the tutorial


      Simply, change redirection url with the link of the page that guests will see Smiley

      Technical problems


      The tutorial was tested on this forum and with the browser Google Chrome; If you notice that the tutorial doesn't work for a browser or for a version of forum (PhpBB2, PhpBB3, PunBB, Invision) contact an administrator and we will fill this field with your reporting.

      Thanks, the staff
      For every problem or question please, contact us in the section Support for the tutorials, The staff will answer you as soon as it is possible...

      Friendly,
      The team of the Forum of Codes.



      Niko wants you in the team Guest

      Community manager and Administrator at Forumattivo.com

      avatar
      • ***


          Reputation : 4
          Registered on : 2012-03-25
          Posts : 38
        Would this work on Moderators so Know body can see but you

        avatar
        • Veteran staff member

            Reputation : 19
            Registered on : 2012-04-05
            Posts : 77
          You can lock your forum down so only you can access it. When I put AvacWeb down for maintenance here is pretty much the code I use:
          Code:

          <script>
          var username = '{USERNAME*}';
          if(username != 'LGforum') window.location = 'redirection url';
          </script>
          Basically the script is saying, if the username is not 'LGforum' then redirect them (to a maintenance page).

          avatar
          • ***


              Reputation : 4
              Registered on : 2012-03-25
              Posts : 38
            Ok got it thanks


            YOUR BANNER HERE
            728x90
            DMCA.com Protection Status
            Free forum | Computers and Internet | Forum management | © PunBB | Free forum support | Contact | Report an abuse | Free forum