Bu eklentiyi ( listener.php ve migrations ) de nasıl çalıştırırım bir soru bar ama olmuyor nedir sorun?
migrations
Kod: Tümünü seç
['config.add', ['dark_style', 0]],
listener.php
Kod: Tümünü seç
public function ucp_prefs_get_data($event)
{
// Request the user option vars and add them to the data array
$event['data'] = array_merge(
$event['data'], array(
'dark_style' => $this->request->variable('dark_style', (int) $this->user->data['dark_style']),
)
);
}
$this->template->assign_vars(array(
'S_USER_DARK_STYLE' => $this->config['dark_style'],
ucp_prefs_view_select_menu_append.html
Kod: Tümünü seç
<hr>
<dl>
<dt><label for="dark_style1">{{ lang('USERS_DARK_STYLE') }}{{ lang('COLON') }}</label><a id="darkstyle"></a></dt>
<dd>
<label for="dark_style1"><input type="radio" name="dark_style" id="dark_style1" value="1"{% if S_USER_DARK_STYLE %} checked="checked"{% endif %} /> {{ lang('Dark') }}</label>
<label for="dark_style0"><input type="radio" name="dark_style" id="dark_style0" value="0"{% if not S_USER_DARK_STYLE %} checked="checked"{% endif %} /> {{ lang('Light') }}</label>
</dd>
</dl>
cssmagesstyle_navlink.html
Kod: Tümünü seç
<li class="rightside" data-skip-responsive="true">
{% if not S_DISPLAY_USER_DARK_STYLE %}
<a href="{{ U_PROFILE }}?i=ucp_prefs&mode=view" role="menuitem" title="{{ lang('LIGHT_STYLE') }}">
<i class="icon fa-moon-o fa-fw blink" aria-hidden="true"></i>{{ lang('CSSMAGES_DARK') }}</a>
{% else %}
<a href="{{ U_PROFILE }}?i=ucp_prefs&mode=view" role="menuitem" title="{{ lang('DARK_STYLE') }}">
<i class="icon fa-sun-o fa-fw blink" aria-hidden="true"></i>{{ lang('CSSMAGES_LIGHT') }}</a>
{% endif %}
</li>