Welcome, Guest
Username: Password: Remember me

TOPIC: skip log in page

skip log in page 10 months 1 week ago #102498

  • Fabian
  • Fabian's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
Hi!

is it possible to skip the log in page / the admin module? I use LS on a tablet offline and I´m the only user, so the log in process is not necessary. Is there a simple way to achieve this (I´m not a developer)?

cheers,
Fabian
The administrator has disabled public write access.

skip log in page 10 months 1 week ago #102499

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1109
  • Thank you received: 250
  • Karma: 78
Hello,

1) Create an "myaccess.php" file
2) Copy the following code and edit the 3 first variables (username, password & path)
3) Place the file somewhere on your server and access the file via your browser
<?php 
$username = 'admin';
$password = 'password';
$where = 'example.org/limesurvey';  /* yourdomain.tld/your_folder   */
?>
 
<head><title>Skip LS Login</title>
<meta charset="utf-8"><meta name="robots" content="none" />
<!--  Change for your correct path to jquery file -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
</head>
 
<form id="loginform" name="loginform" action="http://<?php echo $where ?>/index.php/admin/authentication/sa/login" method="post">
<div class='messagebox ui-corner-all'>
        <div class='header ui-widget-header'>Please log in first.</div>
        <br />
        <ul style='width: 500px; margin-left: auto; margin-right: auto'>
            <li><label for='user'>Username</label>
                <input name='user' id='user' type='text' size='40' maxlength='40' value=<?php echo $username ?>  /></li>
            <li><label for='password'>Password</label>
                <input name='password' id='password' type='password' size='40' maxlength='40' value=<?php echo $password ?> /></li>
            <li><label for='loginlang'>Language</label>
<select id='loginlang' name='loginlang' >
<option value='en' selected>English</option>
</select>
            </li>
        </ul>
    <p><input type='hidden' name='action' value='login' />
        <input class='action' type='submit' value='Login' /><br />&nbsp;
        <br/>
                    <a href='http://<?php echo $where ?>/index.php/admin/authentication/sa/forgotpassword'>Forgot your password?</a><br />&nbsp;
                </p><br />
    </div>
</form>
 
<script  type="text/javascript" >
jQuery(document).ready(function($) {
document.loginform.submit();});
</script>
 
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 10 months 1 week ago by Ben_V.
The administrator has disabled public write access.

skip log in page 10 months 1 week ago #102501

  • Fabian
  • Fabian's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
Hi,

thanks for your quick response!
I created the "myaccess.php" as described. When I open the file via my browser the Skip LS Login page appears. So is it still necessary to log in? The only convenience would be not entering username and password... However, when I try to log in the error message "server not found" shows up (the tablet works offline with a local webserver).

thats what I changed in the php file:
<?php
$username = 'admin';
$password = '12345';
$where = 'http://localhost:8080/bef1/limesurvey'; /* yourdomain.tld/your_folder */
?>
...
The administrator has disabled public write access.

skip log in page 10 months 1 week ago #102502

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1109
  • Thank you received: 250
  • Karma: 78
replace
$where = 'http://localhost:8080/bef1/limesurvey';

with
$where = 'localhost:8080/bef1/limesurvey';

Note:
1) for jquery (only necesary for autosubmission) you can try to link to your local file:
<script type="text/javascript" src=http://<?php echo $where ?>/scripts/jquery/jquery.js></script>

2) this code normally works for ≥2.00 LS versions and must be adapted for previous releases (eg. 1.92)
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.
The following user(s) said Thank You: Fabian

skip log in page 10 months 1 week ago #102503

  • Fabian
  • Fabian's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 24
  • Thank you received: 1
  • Karma: 1
works! thanks!
The administrator has disabled public write access.

skip log in page 10 months 1 week ago #102504

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1109
  • Thank you received: 250
  • Karma: 78
you're welcome :)
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.158 seconds
Donation Image