• WelcomeWelcome  
  • Events  
  • PublicationsPublications  
  • SearchSearch  
  • RegisterRegister  
  • Log inLog in  

  • You are not connected. Please login or register

    Redirect guests on another page

    • Administrator

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


      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...

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

      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...

      The team of the Forum of Codes.

      Niko wants you in the team Guest

      Community manager and Administrator at Forumattivo.com

      • ***

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

        • 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:

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

          • ***

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

            YOUR BANNER HERE
            DMCA.com Protection Status
            © PunBB | Contact | Report an abuse