Quick Theme Switcher

Quick Theme Switcher 1.0.1

No permission to download

ForumCube

Well-known member
ForumCube submitted a new resource:

Quick Theme Switcher - Quick Theme Switcher Addon

View attachment 103

Quick Theme Switcher
Have your Forums consist of multiple themes? Do you want to provide the functionality to your users to select their preferred theme? 🤔

For Xenforo Lovers, Forumcube has launched the "Quick Theme Switcher" Addon this Eve. Theme switcher is pretty easy to use, facile configuration, and hasty.

What's extra special in ForumCube Theme Switcher?
Quick Theme...

Read more about this resource...
 
does not workaddon.png

Server error log
  • ErrorException: Template error: [E_USER_WARNING] Template admin:fc_tt_theme_option_styles_dropdown is unknown
  • src/XF/Template/Templater.php:664
  • Generated by:
  • Feb 8, 2021 at 2:02 AM

Stack trace​

#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/home/..', 664, Array)
#1 src/XF/Template/Templater.php(664): trigger_error('Template admin:...', 512)
#2 src/XF/Template/Templater.php(1593): XF\Template\Templater->getTemplateData('admin', 'fc_tt_theme_opt...')
#3 src/XF/Option/AbstractOption.php(94): XF\Template\Templater->renderTemplate('fc_tt_theme_opt...', Array)
#4 src/addons/ForumCube/QuickThemeSwitcher/Option/Style.php(22): XF\Option\AbstractOption::getTemplate('admin:fc_tt_the...', Object(XF\Entity\Option), Array, Array)
#5 [internal function]: ForumCube\QuickThemeSwitcher\Option\Style::renderOption(Object(XF\Entity\Option), Array)
#6 src/XF/Entity/Option.php(77): call_user_func(Array, Object(XF\Entity\Option), Array)
#7 [internal function]: XF\Entity\Option->renderDisplayCallback(Array)
#8 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)
#9 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(206): XF\Template\Templater->method(Object(XF\Entity\Option), 'renderDisplayCa...', Array)
#10 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#11 internal_data/code_cache/templates/l1/s0/admin/option_macros.php(501): XF\Template\Templater->callMacro('option_macros', 'option_row', Array, Array)
#12 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#13 internal_data/code_cache/templates/l1/s0/admin/option_list.php(77): XF\Template\Templater->callMacro('option_macros', 'option_form_blo...', Array, Array)
#14 src/XF/Template/Templater.php(1626): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#15 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('option_list', Array)
#16 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#17 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Option\\Listi...', 'admin:option_li...', Array)
#18 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#21 src/XF/App.php(2326): XF\Mvc\Dispatcher->run()
#22 src/XF.php(488): XF\App->run()
#23 admin.php(13): XF::runApp('XF\\Admin\\App')
#24 {main}
 
Thanks guys for pointing out the issues. Our technical team is working on the fixes. We are going to release updated version shortly.

Appreciate your patience.
 
Last edited:
Do not works with Themehouse styles/templates, but works fine on default style.
 
@ForumCube @zozon i made a few improvements to prevent breaking with other styles like ThemeHouse. Also i made some little changes for catching the fa-icon in the template, changed it to XF syntax to fit with solid, regular and light icons. Feel free to use it for updating this addon.

Template: fc_tt_option_template_dark_mode
HTML:
<xf:if is="{{$xf.options.fc_tt_dark_theme}}">
    <xf:set var="$style_id" value="{{($xf.options.fc_tt_dark_theme == $xf.style.style_id) ? $xf.options.defaultStyleId : $xf.options.fc_tt_dark_theme}}" />
    <xf:set var="$icon" value="{{($xf.options.fc_tt_dark_theme == $xf.style.style_id) ? $xf.options.fc_dark_icon : $xf.options.fc_light_icon}}" />

    <a href="{{link('quick-theme-switch/style','', {'style_id':$style_id})}}"
       class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--fcStyleSwitcher"
       data-xf-click="overlay"
       data-follow-redirects="on" >
        <xf:fa icon="fa-{{$icon}}" aria-hidden="true" />
    </a>
</xf:if>

Template Modification
Type: RegEx
Find:
HTML:
#(<a href="{{ link\('account/alerts'\) }}"\s+class="[\w\-\s]+p-navgroup-link--alerts.*</div>.+)(</xf:if>)#siU
Replace:
HTML:
$1
<xf:include template="fc_tt_option_template_dark_mode" />
$2
 
@ForumCube this cause (me too) the PAGE_CONTAINER template in every style by ThemeHouse. Only the default XF style fit with the TMS. Cause this i made these improvements above.
 
Hey Guys,

Thanks for your kind patience.

Actually, Our team was in discussion with the ThemeHouse support to fix out the compatibility issues. Though, ThemeHouse didn't find any compatibility issues in the Theme Switcher add-on.

Please find attached below:
2021-03-03.webp

If you guys are still getting some issues, please reach to us for custom support services.

Have a good time!
 
Top Bottom