Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

user log-in page

  • lamprinaGL
  • lamprinaGL's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 9 months 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.
The topic has been locked.
More
11 years 9 months ago - 11 years 9 months 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...
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>

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: 11 years 9 months ago by Ben_V.
The following user(s) said Thank You: lamprinaGL
The topic has been locked.
  • lamprinaGL
  • lamprinaGL's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 9 months 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).
:)
The topic has been locked.
More
11 years 9 months 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)
The following user(s) said Thank You: lamprinaGL
The topic has been locked.
  • lamprinaGL
  • lamprinaGL's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
11 years 9 months 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.
:)
The topic has been locked.
More
11 years 9 months ago - 11 years 9 months 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)
Code:
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: 11 years 9 months ago by Ben_V.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
11 years 9 months 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: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
More
3 years 10 months 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...

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>

Does this work in Limesurvey 4.2?

LS Version 4.2+
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months 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
The topic has been locked.
More
3 years 8 months 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?
The topic has been locked.
More
3 years 8 months ago - 3 years 8 months ago #202983 by uomopalese
Replied by uomopalese on topic user log-in page
Put your custom css file in
Code:
/themes/admin/YourAdminTheme/css/yourfile.css
.
Open
Code:
/themes/admin/YourAdminTheme/config.xml
add
Code:
<filename>yourfile.css</filename>
inside the tag
Code:
<css></css>
in the first half of the file, right under
Code:
<filename>statistics.css</filename>
.
Put your images (logo, etc...) and overwrite original files in
Code:
/themes/admin/YourAdminTheme/images
I guess these files will be lost on updates.
Make a backup of that folder
Code:
/themes/admin/YourAdminTheme
.
HTML of the front page is located in
Code:
/themes/survey/YourDefaultTheme/views/layout_survey_list.twig
for other parts, like header, footer and so on check also the folder
Code:
/subviews/
Customize front page using
Code:
/themes/survey/YourDefaultTheme/css/custom.css
Images on the front page are located in
Code:
/themes/survey/YourDefaultTheme/files/
The path of HTML code for the login page is
Code:
/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
Code:
<style></style>
Again, all this wil be lost on update. Backup.

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.

Last edit: 3 years 8 months ago by uomopalese.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 8 months ago #202995 by tpartner
Replied by tpartner on topic user log-in page
Modifying core admin themes or core files is NOT recommended.

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.
The following user(s) said Thank You: DenisChenu, uomopalese
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose