Check out the LimeSurvey source code on GitHub!

Template: Adapt Login page & which features need to be kept

  • holch
  • holch's Avatar Topic Author
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #64577 by holch
I have seen here in the forum that in many cases custom templates can cause problems with conditions or workarounds. Solution was often to switch back to the default template. However, I do not really like any of the templates that are shipped with Limesurvey, so a custom template is the way to go.

But which elements cause the problems mentioned above, what really needs to be kept in a template for not causing any problems in conditions, workarounds, etc.?

And then there is a second question. For the page that appears when someone opens the root of a Limesurvey installation, there is a template file: surveylist.pstpl.

Is there something similar to adapt the login page for the admin area? I would like to change the login page to something nicer.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 6 months ago - 5 years 6 months ago #64579 by tpartner
I've found that the most common problems with custom templates are:

1) Missing links or scripts in the <head> section - for example not including template.js.

2) Missing template components like the question wrapper in that was inserted in question.pstpl in version 1.87.
<div {QUESTION_ESSENTIALS} class="{QUESTION_CLASS}{QUESTION_MAN_CLASS}{QUESTION_INPUT_ERROR_CLASS}">
3) Errors in custom JavaScript causing fatal JS crashes that prevent the progress bar from loading and dynamic conditions to work.

4) HTML errors causing failures in sensetive browsers (IE).

As long as you include all of the links/scripts in <head>, all of the core .pstpl files and stick to well-formed HTML, CSS and JavaScript, you will have no problems.

There are no template files for the admin section. You will need to change the core files in /admin. The login screen is generated by login_check.php.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 years 6 months ago by tpartner.

Please Log in to join the conversation.

  • holch
  • holch's Avatar Topic Author
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #64583 by holch
Hi Toni!

Great, thank you very much. Of course this should all be included. I thought that there would be css classes, ids etc. that might have to be the same as in the default template.

I'll give it a try.

I already feared that there is no template file for the login page, as I hadn't found anything and when looking at the source code of the generated page. This is a pitty. Not sure if it is worth changing login_check.php, because I would have to change it everytime there is an update, I guess.

I'll have a look into it too. Maybe I leave a _login_check.php as a copy of the new layout and when an update destroys the new layout I would just have to copy and rename this.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form