Add a theme picker
2 posters
Page 1 of 1
Add a theme picker
Add a theme picker |
This tutorial will show you how to add a theme picker at the footer of your Forumotion forum as in the example below. This will work on all forum versions. Installing Go to Administration Panel > Modules > JavaScript codes management, make sure JavaScript management is enabled, and create a new script. Title : Theme Picker Placement : In all the pages
Modifications Now that you have the script installed you can start adding, or modifying existing themes. To add a new theme simply write : addTheme('theme_name', 'theme_url'); theme_name : This is the name of the theme displayed in the dropdown theme_url : The URL of the theme you want to "import" You can find theme URLs on hitskin : https://en.hitskin.com/ Click on the skin you want, then click preview : https://en.hitskin.com/search-a-skin/prosilver-red/100003 Once on the preview forum, copy the url from your address bar and paste it where theme_url is. https://demo.nicetheme.com/forum?theme_id=100003 Then all you need to do is replace theme_name with the name of the theme. When finished you should have the following result :
disable_default_stylesheet : This is used to disable the default stylesheet. Doing so allows better compatibility for imported themes such as : - The theme will look the same as on Hitskin, except for images - Less conflict between rules that use the same selectors to style elements The values you should use are : true : Yes, disable the default stylesheet - true gives the best compatibility, ensuring that the theme displays as it did on Hitskin. Of course this should only be set to true if you have not heavily modified your forum style. false : No, don't disable the default stylesheet - false is best used for forums which have modified templates, and use the stylesheet to style their new elements. Altogether with a choice made :
Information * The themes provided by default are for phpbb3. You may delete, or modify them as you wish. * For best compatibility only use themes that correspond to your current forum version. * Only the stylesheets of these themes are imported which means no images will change. * Each time you change the theme a cookie is updated to store your changes for 1 Year. If you clear your cookies, or a year has passed the default theme will show. |
This tutorial was written by Ange Tuteur. |
SarkZKalie likes this post
Re: Add a theme picker
* A slight adjustment has been made to the script to reduce the time it takes to set the selected theme on page transition.
* This update does not apply to outdated browsers such as IE7
* This update does not apply to outdated browsers such as IE7
Re: Add a theme picker
This code was updated to fit in with the new HTTPS address
updated 11.02.2020 by skouliki
updated 11.02.2020 by skouliki
Similar topics
» Theme Picker
» Add a theme picker
» problem with theme picker
» Theme Picker problem
» Problem with "theme picker"
» Add a theme picker
» problem with theme picker
» Theme Picker problem
» Problem with "theme picker"
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum