Actions

Difference between revisions of "Custom Admin Themes"

From LimeSurvey Manual

 
(2 intermediate revisions by the same user not shown)
Line 18: Line 18:
 
*Add a custom.js file to '''''/yourLimeSurveyDirectory/upload/admintheme/yourTheme/scripts/'''''
 
*Add a custom.js file to '''''/yourLimeSurveyDirectory/upload/admintheme/yourTheme/scripts/'''''
 
*Modify the <span style="color: red; font-weight:bold;"><js></span> tag in '''''/upload/admintheme/yourTheme/config.xml''''' to include the new file so it would end up looking something like this:
 
*Modify the <span style="color: red; font-weight:bold;"><js></span> tag in '''''/upload/admintheme/yourTheme/config.xml''''' to include the new file so it would end up looking something like this:
<syntaxhighlight lang="xml" enclose="div">
+
<syntaxhighlight lang="xml">
  
 
         <js>
 
         <js>
Line 32: Line 32:
 
         </js></syntaxhighlight>
 
         </js></syntaxhighlight>
  
=LimeSurvey Version 3.0+=
+
=LimeSurvey Version 3 or newer=
 +
 
 +
If you are a LimeSurvey Cloud customer you need to first download the archive for the Community version from [https://community.limesurvey.org/downloads/ the Community edition download page]. Unzip the archive to a local temporary directory to find all the files needed.
  
 
==Creating a new theme==  
 
==Creating a new theme==  

Latest revision as of 16:09, 30 May 2022

LimeSurvey Version 2.06

Creating a new theme

  • In /yourLimeSurveyDirectory/styles/, copy and rename one of the core admin theme directories
  • In Global settings --> General, activate the new theme

Insert a JavaScript file into a custom theme

See the workaround here.

LimeSurvey Version 2.5

Creating a new theme

  • Copy one of the themes from /yourLimeSurveyDirectory/styles to /yourLimeSurveyDirectory/upload/admintheme/ and rename it (let's say "'yourTheme'")
  • Modify /yourLimeSurveyDirectory/upload/admintheme/yourTheme/config.xml to change the name, description and any other items in the <metadatas> tag you see fit
  • In Global settings --> General, activate the new theme

Insert a JavaScript file into a custom theme

  • Add a custom.js file to /yourLimeSurveyDirectory/upload/admintheme/yourTheme/scripts/
  • Modify the <js> tag in /upload/admintheme/yourTheme/config.xml to include the new file so it would end up looking something like this:
        <js>
            <filename>notify.js</filename>
            <filename>save.js</filename>
            <filename>panelclickable.js</filename>
            <filename>panelsanimation.js</filename>
            <filename>sidemenu.js</filename>
            <filename>bootstrap-switch.min.js</filename>
            <filename>jquery.jcarousel.min.js</filename>
            <filename>jcarousel.responsive.js</filename>
            <filename>custom.js</filename>
        </js>

LimeSurvey Version 3 or newer

If you are a LimeSurvey Cloud customer you need to first download the archive for the Community version from the Community edition download page. Unzip the archive to a local temporary directory to find all the files needed.

Creating a new theme

  • Copy one of the themes from /yourLimeSurveyDirectory/themes/admin to /yourLimeSurveyDirectory/upload/admintheme/ and rename it (let's say "yourTheme")
  • Modify /yourLimeSurveyDirectory/upload/admintheme/yourTheme/config.xml to change the name, description and any other items in the <metadatas> tag you see fit
  • In Global settings --> General, activate the new theme
  • After any modifications to CSS/JS Clear the cache in the Global Settings > General tab /surveys/index.php/admin/globalsettings#general