سيضيف هذا التعديل على القالب زرًا إلى مجموعة التنقل (قبل زر البحث) للسماح للمستخدمين بالتبديل بين النمطين الفاتح والغامق.
1. أنشئ هذا التعديل على القالب:
قالب: PAGE_CONTAINER
ابحث عن:
1. أنشئ هذا التعديل على القالب:
قالب: PAGE_CONTAINER
ابحث عن:
PHP:
<a href="{{ link('whats-new') }}"
PHP:
<xf:if is="$xf.visitor.canChangeStyle()">
<xf:set var="$light_style" value="YOUR_LIGHT_STYLE_ID" />
<xf:set var="$dark_style" value="YOUR_DARK_STYLE_ID" />
<xf:if is="$xf.style.style_id == $light_style">
<xf:set var="$new_mode" value="{$dark_style}" />
<xf:else/>
<xf:set var="$new_mode" value="{$light_style}" />
</xf:if>
<a href="{{ link('misc/style', null, {
'style_id': $new_mode,
'_xfRedirect': $redirect,
't': csrf_token()
}) }}"
class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--styleswitcher }}"
title="{{ phrase('style_chooser')|for_attr }}"
aria-label="{{ phrase('style_chooser')|for_attr }}"
aria-expanded="false"
aria-haspopup="true">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText"></span>
</a>
</xf:if>
$0