- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
user log-in page
- lamprinaGL
- Topic Author
- Offline
- New Member
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.
- Ben_V
- Offline
- Platinum Member
- Posts: 1128
- Thank you received: 329
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)
- lamprinaGL
- Topic Author
- Offline
- New Member
- Posts: 3
- Thank you received: 0
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).
- Ben_V
- Offline
- Platinum Member
- Posts: 1128
- Thank you received: 329
...yesit is supposed to pass the values of ids 'user' and 'password' to the respective ids in admin.php, right
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)
- lamprinaGL
- Topic Author
- Offline
- New Member
- Posts: 3
- Thank you received: 0
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.
- Ben_V
- Offline
- Platinum Member
- Posts: 1128
- Thank you received: 329
Yes you're rightIn 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).
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)
- Mazi
- Offline
- Official LimeSurvey Partner
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: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
- ymca
- Offline
- Elite Member
- Posts: 168
- Thank you received: 2
Does this work in Limesurvey 4.2?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...Code:<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>
LS Version 4.2+
- holch
- Away
- LimeSurvey Community Team
- Posts: 11658
- Thank you received: 2742
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
- Villemk
- Offline
- New Member
- Posts: 5
- Thank you received: 0
- uomopalese
- Offline
- New Member
- Posts: 1
- Thank you received: 0
/themes/admin/YourAdminTheme/css/yourfile.css
Open
/themes/admin/YourAdminTheme/config.xml
<filename>yourfile.css</filename>
<css></css>
<filename>statistics.css</filename>
Put your images (logo, etc...) and overwrite original files in
/themes/admin/YourAdminTheme/images
Make a backup of that folder
/themes/admin/YourAdminTheme
HTML of the front page is located in
/themes/survey/YourDefaultTheme/views/layout_survey_list.twig
/subviews/
/themes/survey/YourDefaultTheme/css/custom.css
/themes/survey/YourDefaultTheme/files/
/application/views/admin/authentication/login.php
You can put some additional css at the top of the file, eg. for the background of the login only using a tag
<style></style>
NOTE* take a look at the Theme editor in the backend, under the Configuration menu. There you can use the Extend button to create your own theme starting from existing one, without modify original files. Up to you.
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10108
- Thank you received: 3593
Refer to the manual - manual.limesurvey.org/Custom_Admin_Themes
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.