- Posts: 168
- Thank you received: 2
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Admin theme favicon
- ymca
- Topic Author
- Offline
- Elite Member
Which folder I need to put my "favicon.ico" so it will appear/change to my new favicon when entering admin area?
p.s.
I've made a theme with my name in "admintheme".
Thanks
LS Version 4.2+
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3595
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3595
Place your favicon file in /upload/admintheme/YourThemeName/.
Create a custom JavaScript file as described here - manual.limesurvey.org/Custom_Admin_Theme...nto_a_custom_theme_2
Add something like this to that custom.js file:
$(document).on('ready pjax:scriptcomplete',function(){ $('link[rel="shortcut icon"]').attr('href', '/upload/admintheme/YourThemeName/favicon.ico'); $('link[rel="icon"]').attr('href', '/upload/admintheme/YourThemeName/favicon.ico'); });
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- ymca
- Topic Author
- Offline
- Elite Member
- Posts: 168
- Thank you received: 2
So from what I understand, each time a user goes to the admin area, he will see a brief flash of the core favicon?
LS Version 4.2+
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3595
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- ymca
- Topic Author
- Offline
- Elite Member
- Posts: 168
- Thank you received: 2
In the "config.xml" above the "<config>" I wote:
<?xml version="1.0" encoding="UTF-8"?> <!-- Bay of Many configuration for the admin styles. In future versions of LimeSurvey, it will be used to fill a admin_style table, and to give user control on template configuration (like variables to use to render the questions, banners, background, etc.) --> <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> <config>
Now I get "404" error.
LS Version 4.2+
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3595
Did you copy that from the core theme?
It should look something like this:
<?xml version="1.0" encoding="UTF-8"?> <!-- Black Pearl configuration for the admin styles. In future versions of LimeSurvey, it will be used to fill a admin_style table, and to give user control on template configuration (like variables to use to render the questions, banners, background, etc.) --> <config> <metadata> <name>Black Pearl Custom</name> <creationDate>20/02/2020</creationDate> <author>Author Name</author> <authorEmail>example@example.com</authorEmail> <authorUrl>http://example.com</authorUrl> <license>GNU General Public License version 2 or later</license> <version>3.0</version> <description>A customization of Black Pearl</description> <basecolor>#071630</basecolor> <last_update>2020-02-20 17:00:00</last_update> </metadata> <!-- Here the list of the css/js files to load. Any file here will be loaded via the asset manager --> <files> <css> <filename>lime-admin-colors.css</filename> <filename>statistics.css</filename> <filename>custom.css</filename> </css> <js> <filename>custom.js</filename> </js> <!-- Those files will be loaded for right to left languages only NOTE 1: If for any reason, you need to edit the RTL behaviors, feel free to contact the LimeSurvey team about it. We'll be always pleased to make better the right to left display NOTE 2: those files are generated with the script R2. See: https://github.com/ded/R2 --> <rtl> <css> <!-- Still need these files --> <filename>lime-admin-colors.css</filename> <filename>statistics-rtl.css</filename> </css> <js></js> </rtl> </files> <engine> <!-- If you want to use asset manager, even in debug mode, set this field to true. --> <use_asset_manager_in_debug_mode>false</use_asset_manager_in_debug_mode> </engine> </config>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- ymca
- Topic Author
- Offline
- Elite Member
- Posts: 168
- Thank you received: 2
I meant to say that I've added the JS on the top of the code so it will run first and not have a glitch for the user to see...
<?xml version="1.0" encoding="UTF-8"?>
<!--
Bay of Many configuration for the admin styles.
In future versions of LimeSurvey, it will be used to fill a admin_style table,
and to give user control on template configuration (like variables to use to render the questions, banners, background, etc.)
-->
<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>
<config>
<metadata>
<name>Hotforthis</name>
<creationDate>08/12/2015</creationDate>
<author>Louis-Sébastien Gac Artigas</author>
<authorEmail>louis.gac@limesurvey.org
<authorUrl> www.limesurvey.org
<copyright>Copyright (C) 2005 - 2016 LimeSurvey Gmbh, Inc. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later</license>
<version>3.0</version>
<description>LimeSurvey admin interface template, blue variation.</description>
<basecolor>#214F7E</basecolor>
<lastUpdate>2017-27-11 17:00:00</lastUpdate>
</metadata>
<!--
Here the list of the css/js files to load.
Any file here will be loaded via the asset manager
-->
<files>
<css>
<filename>lime-admin-colors.css</filename>
<filename>statistics.css</filename>
</css>
<js></js>
<!--
Those files will be loaded for right to left languages only
NOTE 1: If for any reason, you need to edit the RTL behaviors, feel free to contact the LimeSurvey team about it.
We'll be always pleased to make better the right to left display
NOTE 2: those files are generated with the script R2. See: github.com/ded/R2
-->
<rtl>
<css>
<!-- Still need these files -->
<filename>lime-admin-colors.css</filename>
<filename>statistics-rtl.css</filename>
</css>
<js>
</js>
</rtl>
</files>
<engine>
<!-- If you want to use asset manager, even in debug mode, set this field to true. -->
<use_asset_manager_in_debug_mode>false</use_asset_manager_in_debug_mode>
</engine>
</config>
LS Version 4.2+
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3595
All of those files will get loaded before the JavaScript fires anyway.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- ymca
- Topic Author
- Offline
- Elite Member
- Posts: 168
- Thank you received: 2
Do I need to put this line also?
Because I don't see a file with that name in my folder.<filename>custom.css</filename>
LS Version 4.2+
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10109
- Thank you received: 3595
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- ymca
- Topic Author
- Offline
- Elite Member
- Posts: 168
- Thank you received: 2
Better to leave it as is till they fix it in an update?
LS Version 4.2+