Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

FOP2 Community Forum

  1. Home
  2. Support
  3. Auto Logon on Web Page

Auto Logon on Web Page

Scheduled Pinned Locked Moved Support
5 Posts 2 Posters 72 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E
    E
    erwand
    wrote on last edited by
    #1

    How can i pass variable to autologon on the web page ?

    1 Reply Last reply
    0
    • N
      N
      nicolas
      wrote on last edited by
      #2

      Not the most elegant way, but you can try by adding the following code at the very end of secbox.html

      <script>
      
      function getQueryParameter(param) {
          var myreturn = "";
          var strHref = window.location.href;
          if ( strHref.indexOf("?") > -1 ){
              pos = strHref.indexOf("?") + 1;
              var strQueryString = strHref.substr(pos).toLowerCase();
              var queryObj = toObject(strQueryString);
              myreturn = queryObj[param];
          };
          if(myreturn === undefined) {
              myreturn="";
          };
          return myreturn;
      };
      
      var exten=getQueryParameter("exten");
      var pass=getQueryParameter("pass");
      
      $('exten').value=exten;
      $('myextension').value=exten;
      $('secucode').value=pass;
      $('securitycode').value=pass;
      Modalbox.hide();
      </script>
      

      It will get the exten and pass parameters from the url.

      If you pass the wrong credentials it will enter a nasty loop, so you better check before passing wront parameters.

      Best regards,

      1 Reply Last reply
      0
      • E
        E
        erwand
        wrote on last edited by
        #3

        Not bad but how can i hide completly the login box ?

        1 Reply Last reply
        0
        • N
          N
          nicolas
          wrote on last edited by
          #4

          You can't

          1 Reply Last reply
          0
          • N
            N
            nicolas
            wrote on last edited by
            #5

            Ok, I have just added the option. It will be available on the next release, you will be able to pass the "exten" and "pass" parameters to override the initial login box. If the passed values are wrong, you will be presented with the login screen, if they are ok you go right in.

            If you are anxious to try it out together with other new features I can email you a copy for you to test..

            Best regards,

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            Powered by NodeBB Contributors
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups