user log-in page

More
8 years 1 month ago #81473 by lamprinaGL
user log-in page was created by lamprinaGL
Hello!
Is there a way i could edit some stuff of the log-in page (admin/admin.php) ?
For example, i want to add some info/images in the header/footer.
I tried through templates-editor but i found nothing there.

Please Log in to join the conversation.

LimeSurvey Partners
More
8 years 1 month ago - 8 years 1 month ago #81476 by Ben_V
Replied by Ben_V on topic user log-in page
Hi,
you have to change or add some outputs directly into the related php files
admin/admin.php (admin pages)
admin/login_check.php (login page)
(remember that those changes could be removed by updates)

If you only want to change the login page, its maybe easier trying to create your own custom login page (yourinstal/newloginpage/)

You can embed the original login form even in any basic html page...
<form name='loginform' id='loginform' method='post' action='http://yourinstal/admin/admin.php' >
<table >
<tr>
<td >User</td>
<td><input class="text" name='user' id='user' type='text' size='15'  /></td>
</tr>
<tr>
<td >Password</td>
<td><input class="text" name='password' id='password' type='password' size='15' /></td>
</tr>
<!-- languages choice -->
</form>

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 8 years 1 month ago by Ben_V.
The following user(s) said Thank You: lamprinaGL

Please Log in to join the conversation.

More
8 years 1 month ago #81504 by lamprinaGL
Replied by lamprinaGL on topic user log-in page
Thanks benitov.
I don't know much of the web stuff, but i tried your solution with no success. :(
According to your code, it is supposed to pass the values of ids 'user' and 'password' to the respective ids in admin.php, right?

Maybe the development team should consider add a mechanism similar to template-editor for the admin/user pages (back-end environment).
:)

Please Log in to join the conversation.

More
8 years 1 month ago #81505 by Ben_V
Replied by Ben_V on topic user log-in page

it is supposed to pass the values of ids 'user' and 'password' to the respective ids in admin.php, right

...yes :)
If it can help you I attach a sample html file
(change the form action path to link with yoyr installation )
Ben/

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Attachments:
The following user(s) said Thank You: lamprinaGL

Please Log in to join the conversation.

More
8 years 1 month ago #81507 by lamprinaGL
Replied by lamprinaGL on topic user log-in page
Thanks again Ben! :)
Your code works.
In case a user gives wrong username and/or password, i get the default (limesurvey's) fail-to-log-in page. I know it is supposed to but i would like it to redirect to my fail-to-log-in page (i think the only way is to edit the admin.php).

Ben's idea is a good solution for my question but the dev team should consider making a mechanism.
:)

Please Log in to join the conversation.

More
8 years 1 month ago - 8 years 1 month ago #81513 by Ben_V
Replied by Ben_V on topic user log-in page

In case a user gives wrong username and/or password, i get the default (limesurvey's) fail-to-log-in page. I know it is supposed to but i would like it to redirect to my fail-to-log-in page (i think the only way is to edit the admin.php).

Yes you're right
I personnaly prefer not to change LS default behaviour just for design changes...so I don't have solution for this redirect....
The only thing i know that you can edit is in admin/login_check.php file
to redirect the user to the homepage if he try to connect to the original admin page
(backup your original file and search where to replace the related lines)
if (!isset($logoutsummary))
        {
										// redirect to home page
            $loginsummary = "<meta http-equiv='refresh' content='0;url=$rooturl/'> 
            <form style='display:none' name='loginform' id='loginform' method='post' action='$homeurl/admin.php'><p><strong>".$clang->gT("You have to login first.")."</strong><br />	<br />";
        }

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 8 years 1 month ago by Ben_V.

Please Log in to join the conversation.

More
8 years 1 month ago #81524 by Mazi
Replied by Mazi on topic user log-in page
Such modifications are hard to make if you don't know PHP, HTML, CSS...

Another approach, depending on the extend of your changes, is to just edit the CSS of the admin backend at /limesurvey/admin/styles/default/adminstyle.css

Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com
Want to use your survey offline -> www.offlinesurveys.com

Please Log in to join the conversation.

More
2 months 2 weeks ago #198143 by ymca
Replied by ymca on topic user log-in page

Ben_V wrote:
If you only want to change the login page, its maybe easier trying to create your own custom login page (yourinstal/newloginpage/)

You can embed the original login form even in any basic html page...

<form name='loginform' id='loginform' method='post' action='http://yourinstal/admin/admin.php' >
<table >
<tr>
<td >User</td>
<td><input class="text" name='user' id='user' type='text' size='15'  /></td>
</tr>
<tr>
<td >Password</td>
<td><input class="text" name='password' id='password' type='password' size='15' /></td>
</tr>
<!-- languages choice -->
</form>

Does this work in Limesurvey 4.2?

LS Version 4.2+

Please Log in to join the conversation.

More
2 months 1 week ago #198166 by holch
Replied by holch on topic user log-in page
Most probably not. This thread is 7 (in words SEVEN) years old and 2.06 and 2.6x seem to have been the versions back then. There have been a lot of chances to LS since.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
The following user(s) said Thank You: DenisChenu, ymca

Please Log in to join the conversation.

More
1 week 5 days ago #202056 by Villemk
Replied by Villemk on topic user log-in page
Now that LS has been updated since this was first answered, where can one change the HTML/CSS for admin login page?

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now