siprise
Местный
- Сообщения
- 276
- Реакции
- 175
- Баллы
- 183
Ну вот как сделать плагин я разобрался, а как сделать некую модификацию?....
Ну вот к примеру шаблон лолз логина, как из этого можно чет свое сделать, может есть инструкция по созданию модификаций для плагинов?
Код:
<?xml version="1.0" encoding="utf-8"?>
<template_modifications>
<modification type="public" template="PAGE_CONTAINER" modification_key="Lolz_login_and_register_form" description="Lolz login and register form" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[ <xf:else />
<a href="{{ link('login') }}" class="p-navgroup-link p-navgroup-link--textual p-navgroup-link--logIn"
data-xf-click="overlay" data-follow-redirects="on">
<span class="p-navgroup-linkText">{{ phrase('log_in') }}</span>
</a>
<xf:if is="$xf.options.registrationSetup.enabled">
<a href="{{ link('register') }}" class="p-navgroup-link p-navgroup-link--textual p-navgroup-link--register"
data-xf-click="overlay" data-follow-redirects="on">
<span class="p-navgroup-linkText">{{ phrase('register') }}</span>
</a>
</xf:if>
</xf:if>]]></find>
<replace><![CDATA[ <xf:else />
<a href="{{ link('login') }}" class="p-navgroup-link p-navgroup-link--textual p-navgroup-link--logIn"
data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">
<span class="p-navgroup-linkText">{{ phrase('log_in') }}</span>
</a>
<xf:if is="$xf.options.registrationSetup.enabled">
<a href="{{ link('register') }}" class="p-navgroup-link p-navgroup-link--textual p-navgroup-link--register"
data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">
<span class="p-navgroup-linkText">{{ phrase('register') }}</span>
</a>
</xf:if>
</xf:if>]]></replace>
</modification>
<modification type="public" template="PAGE_CONTAINER" modification_key="Lolz_login_and_register_form_ExsclusiveDark" description="Lolz login and register form Exsclusive Dark" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[ <a href="{{ link('login') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--logIn"
data-xf-click="overlay" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('log_in') }}</span>
</a>
<xf:if is="$xf.options.registrationSetup.enabled">
<a href="{{ link('register') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--register"
data-xf-click="overlay" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('register') }}</span>
</a>]]></find>
<replace><![CDATA[ <a href="{{ link('login') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--logIn"
data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('log_in') }}</span>
</a>
<xf:if is="$xf.options.registrationSetup.enabled">
<a href="{{ link('register') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--register"
data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('register') }}</span>
</a>]]></replace>
</modification>
<modification type="public" template="PAGE_CONTAINER" modification_key="Lolz_login_and_register_form_ExsclusiveDark1" description="Lolz login and register form Exsclusive Dark1" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[ <xf:else />
<a href="{{ link('login') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--logIn"
data-xf-click="overlay" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('log_in') }}</span>
</a>
<xf:if is="$xf.options.registrationSetup.enabled">
<a href="{{ link('register') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--register"
data-xf-click="overlay" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('register') }}</span>
</a>
</xf:if>
<xf:if is="{{ property('xtr_message_block_enable') }} == '1' && {{ property('xtr_live_background_picker') }} == '1'">
<a href="#" class="p-navgroup-link bgPicker" data-xf-init="tooltip" title="{{ phrase('xtr_open_background_picker') }}"><i class="far fa-pen"></i></a>
</xf:if>
</xf:if>]]></find>
<replace><![CDATA[ <xf:else />
<a href="{{ link('login') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--logIn"
data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('log_in') }}</span>
</a>
<xf:if is="$xf.options.registrationSetup.enabled">
<a href="{{ link('register') }}" class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--register"
data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">
<i aria-hidden="true"></i>
<span class="p-navgroup-linkText">{{ phrase('register') }}</span>
</a>
</xf:if>
<xf:if is="{{ property('xtr_message_block_enable') }} == '1' && {{ property('xtr_live_background_picker') }} == '1'">
<a href="#" class="p-navgroup-link bgPicker" data-xf-init="tooltip" title="{{ phrase('xtr_open_background_picker') }}"><i class="far fa-pen"></i></a>
</xf:if>
</xf:if>]]></replace>
</modification>
<modification type="public" template="extra.less" modification_key="Lolz_css" description="Lolz css" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/^.*$/s]]></find>
<replace><![CDATA[$0
.dcom {
&.overlay-container {
background: rgba(0, 0, 0, 0.77);
}
.overlay {
top: 58.5px;
width: 350px;
box-shadow: none;
border: none;
background: #050508;
padding: 50px 40px;
border-top: 5px solid #008efe;
border-radius: 5px;
.overlay-title {
position: absolute;
z-index: -1;
.overlay-titleCloser {
position: absolute;
left: 320px;
top: -60px;
color: rgb(148, 148, 148);
&:hover {
color: rgb(214,214,214);
background: rgba(18, 76, 50, 0.4);
}
}
}
.formRow {
background: #050508;
.formSubmitRow-controls > .button:first-child:last-child {
min-width: 75%;
}
.button.button--primary, a.button.button--primary {
border-color: #008efe;
color: #f5f5f5;
background-color: #008efe;
font-size: 14px;
height: 38px;
line-height: 38px;
font-weight: 600;
&:hover {
background: #008efe;
}
}
.button.button--icon--login > .button-text::before, a.button.button--icon--login > .button-text::before {
content: none;
}
}
.formRow > dt {
display: none;
}
.formRow > dd {
padding: 0px 0px 15px 0px;
}
.dcom_log {
color: #d6d6d6;
padding: 5px 0;
}
.dcom_provider {
li {
width: 100%;
margin: 8px auto;
text-align: center;
.button--provider {
min-width: 75%;
font-size: 14px;
height: 38px;
line-height: 38px;
font-weight: 600;
}
}
}
.dcom_forgot,
.dcom_rules {
font-size: 14px;
> dd {
display: inline-flex;
width: 100%;
}
.iconic-label {
color: rgb(214,214,214);
}
.inputChoices {
padding-right: 10px;
.iconic-label {
color: rgb(214,214,214);
}
}
.iconic {
i {
color: #008efe;
&:hover {
color: #008efe;
}
}
}
a {
color: #008efe;
&:hover {
color: #008efe;
}
}
}
[data-xf-init=" password-hide-show"] .inputGroup-text,
[data-xf-init="password-strength password-hide-show"] .inputGroup-text {
display: none;
}
.input {
color: rgb(214, 214, 214);
background-color: #0b0b12;
border: 0 none black;
border-radius: 3px;
height: 40px;
line-height: 40px;
text-align: center;
&:active,
&.is-focused,
&:focus {
.m-placeholder({color: rgb(148,148,148); });
border: 2px solid #008efe;
}
.m-placeholder({color: rgb(148,148,148); });
}
.formSubmitRow-controls {
justify-content: center;
display: flex;
background: #050508;
padding: 0;
margin: 0;
}
.block-outer {
&.block-outer--after {
border-top: none !important;
a {
color: #008efe;
&:hover {
color: #008efe;
}
}
}
}
.block-container {
border: none;
border-radius: 5px !important;
background: #050508;
}
meter.meterBar {
display: none;
}
.meterBarLabel {
display: none;
}
.dcom-block-logo {
text-align: center;
}
}
}
[data-template="login"],
[data-template="register_form"] {
.p-title,
.breadcrumb-content {
display: none;
}
.dcom-no-overlay {
width: 350px;
margin: 0 auto;
background: rgb(39, 39, 39);
padding: 50px 40px;
border-top: 5px solid rgb(58, 169, 119);
border-radius: 5px;
.blockMessage {
border: none;
&.blockMessage--error {
background: #050508;
color: #d6d6d6;
&::before {
content: none;
}
}
}
.blockMessage--iconic {
padding-left: 0;
}
.formRow {
background: #050508;
.formSubmitRow-controls > .button:first-child:last-child {
min-width: 75%;
}
.button.button--primary, a.button.button--primary {
border-color: #008efe;
color: #f5f5f5;
background-color: #008efe;
font-size: 14px;
height: 38px;
line-height: 38px;
font-weight: 600;
&:hover {
background: #008efe;
}
}
.button.button--icon--login > .button-text::before, a.button.button--icon--login > .button-text::before {
content: none;
}
}
.formRow > dt {
display: none;
}
.formRow > dd {
padding: 0px 0px 15px 0px;
}
.dcom_log {
color: #d6d6d6;
padding: 5px 0;
}
.dcom_provider {
li {
width: 100%;
margin: 8px auto;
text-align: center;
.button--provider {
min-width: 75%;
font-size: 14px;
height: 38px;
line-height: 38px;
font-weight: 600;
}
}
}
.dcom_forgot,
.dcom_rules {
font-size: 14px;
> dd {
display: inline-flex;
width: 100%;
}
.iconic-label {
color: rgb(214,214,214);
}
.inputChoices {
padding-right: 10px;
.iconic-label {
color: rgb(214,214,214);
}
}
.iconic {
i {
color: #008efe;
&:hover {
color: #008efe;
}
}
}
a {
color: #008efe;
&:hover {
color: #008efe;
}
}
}
[data-xf-init=" password-hide-show"] .inputGroup-text,
[data-xf-init="password-strength password-hide-show"] .inputGroup-text {
display: none;
}
.input {
color: rgb(214, 214, 214);
background-color: rgb(45, 45, 45);
border: 0 none black;
border-radius: 3px;
height: 40px;
line-height: 40px;
text-align: center;
&:active,
&.is-focused,
&:focus {
.m-placeholder({color: rgb(148,148,148); });
border: 2px solid #2E614A;
}
.m-placeholder({color: rgb(148,148,148); });
}
.formSubmitRow-controls {
justify-content: center;
display: flex;
background: #050508;
padding: 0;
margin: 0;
}
.block-outer {
&.block-outer--after {
border-top: none !important;
a {
color: #008efe;
&:hover {
color: #008efe;
}
}
}
}
.block-container {
border: none;
border-radius: 5px !important;
background: #050508;
}
meter.meterBar {
display: none;
}
.meterBarLabel {
display: none;
}
.dcom-block-logo {
text-align: center;
}
}
}]]></replace>
</modification>
<modification type="public" template="login" modification_key="Lolz_login" description="Lolz login" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:title>{{ phrase('log_in') }}</xf:title>
<xf:head option="robots"><meta name="robots" content="noindex" /></xf:head>
<xf:if contentcheck="true">
<div class="blockMessage blockMessage--error blockMessage--iconic">
<xf:contentcheck>{$error}</xf:contentcheck>
</div>
</xf:if>
<div class="blocks">
<xf:form action="{{ link('login/login') }}" class="block">
<div class="block-container">
<div class="block-body">
<xf:textboxrow name="login" value="{$login}" autofocus="autofocus" autocomplete="username"
label="{{ phrase('your_name_or_email_address') }}" />
<xf:passwordboxrow name="password" autocomplete="current-password"
label="{{ phrase('password') }}">
<xf:html>
<a href="{{ link('lost-password') }}" data-xf-click="overlay">{{ phrase('forgot_your_password') }}</a>
</xf:html>
</xf:passwordboxrow>
<xf:if is="$captcha">
<xf:captcharow label="{{ phrase('verification') }}" force="true" force-visible="true" />
</xf:if>
<xf:checkboxrow>
<xf:option name="remember" selected="true">{{ phrase('stay_logged_in') }}</xf:option>
</xf:checkboxrow>
<xf:hiddenval name="_xfRedirect">{$redirect}</xf:hiddenval>
</div>
<xf:submitrow icon="login" />
</div>
<xf:if is="$xf.options.registrationSetup.enabled">
<div class="block-outer block-outer--after">
<div class="block-outer-middle">
{{ phrase('dont_have_account_question') }} <xf:button href="{{ link('register') }}">{{ phrase('register_now') }}</xf:button>
</div>
</div>
</xf:if>
</xf:form>
<xf:if is="$providers is not empty">
<div class="blocks-textJoiner"><span></span><em>{{ phrase('or_separator') }}</em><span></span></div>
<div class="block">
<div class="block-container">
<div class="block-body">
<xf:formrow rowtype="button"
label="{{ phrase('log_in_using') }}">
<ul class="listHeap">
<xf:foreach loop="$providers" value="$provider">
<li>
<xf:macro template="connected_account_macros" name="button"
arg-provider="{$provider}" />
</li>
</xf:foreach>
</ul>
</xf:formrow>
</div>
</div>
</div>
</xf:if>
</div>]]></find>
<replace><![CDATA[<xf:head option="robots"><meta name="robots" content="noindex" /></xf:head>
<div class="dcom-no-overlay">
<div class="blocks">
<xf:form action="{{ link('login/login') }}" class="block">
<div class="block-container">
<div class="block-body">
<div class="dcom-block-logo">
<img src="{{ base_url(property('publicLogoUrl')) }}" srcset="{$srcset}" alt="{$xf.options.boardTitle}"
width="{{ property('publicLogoWidth') ?: '' }}" height="{{ property('publicLogoHeight') ?: '' }}" />
<div class="dcom_log">
Войдите в свой аккаунт
</div>
</div>
<xf:if is="$providers is not empty">
<div class="block">
<div class="block-container">
<div class="block-body">
<xf:formrow rowtype="button" rowclass="dcom_provider"
label="{{ phrase('log_in_using') }}">
<ul class="listHeap">
<xf:foreach loop="$providers" value="$provider">
<li>
<xf:macro template="connected_account_macros" name="button"
arg-provider="{$provider}" />
</li>
</xf:foreach>
</ul>
</xf:formrow>
</div>
</div>
</div>
</xf:if>
<xf:if contentcheck="true">
<div class="blockMessage blockMessage--error blockMessage--iconic">
<xf:contentcheck>{$error}</xf:contentcheck>
</div>
</xf:if>
<xf:textboxrow name="login" value="{$login}" autofocus="autofocus" autocomplete="username"
placeholder="{{ phrase('your_name_or_email_address') }}" />
<xf:passwordboxrow name="password" autocomplete="current-password"
placeholder="{{ phrase('password') }}">
</xf:passwordboxrow>
<xf:if is="$captcha">
<xf:captcharow label="{{ phrase('verification') }}" force="true" force-visible="true" />
</xf:if>
<xf:checkboxrow rowclass="dcom_forgot">
<xf:option name="remember" selected="true">{{ phrase('stay_logged_in') }}</xf:option>
<xf:html>
<a href="{{ link('lost-password') }}" data-xf-click="overlay">{{ phrase('forgot_your_password') }}</a>
</xf:html>
</xf:checkboxrow>
<xf:hiddenval name="_xfRedirect">{$redirect}</xf:hiddenval>
</div>
<xf:submitrow icon="login" />
</div>
<xf:if is="$xf.options.registrationSetup.enabled">
<div class="block-outer block-outer--after">
<div class="block-outer-middle">
<a href="{{ link('register') }}">{{ phrase('register_now') }}</a>
</div>
</div>
</xf:if>
</xf:form>
</div>
</div>]]></replace>
</modification>
<modification type="public" template="register_form" modification_key="Lolz_register_form" description="Lolz_register_form" execution_order="20" enabled="1" action="preg_replace">
<find><![CDATA[/<xf:title>(.*)<\/xf:form>/s]]></find>
<replace><![CDATA[<div class="dcom-no-overlay">
$0
</div>]]></replace>
</modification>
<modification type="public" template="register_form" modification_key="Lolz_register_form_logo" description="Lolz register form logo" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:if is="$providers is not empty">]]></find>
<replace><![CDATA[ <div class="dcom-block-logo">
<img src="{{ base_url(property('publicLogoUrl')) }}" srcset="{$srcset}" alt="{$xf.options.boardTitle}"
width="{{ property('publicLogoWidth') ?: '' }}" height="{{ property('publicLogoHeight') ?: '' }}" />
<div class="dcom_log">
Присоединиться к форуму
</div>
</div>
$0]]></replace>
</modification>
<modification type="public" template="register_form" modification_key="Lolz_register_form_placeholder" description="Lolz register form placeholder" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[ <xf:passwordboxrow name="{{ $regForm.getFieldName('password') }}" autocomplete="new-password"
label="{{ phrase('password') }}"]]></find>
<replace><![CDATA[ <xf:passwordboxrow name="{{ $regForm.getFieldName('password') }}" autocomplete="new-password"
placeholder="{{ phrase('password') }}"]]></replace>
</modification>
<modification type="public" template="register_form" modification_key="Lolz_register_form_provider" description="Lolz register form provider" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:if is="$providers is not empty">
<div class="block">
<div class="block-container">
<div class="block-body">
<xf:formrow rowtype="button"]]></find>
<replace><![CDATA[<xf:if is="$providers is not empty">
<div class="block">
<div class="block-container">
<div class="block-body">
<xf:formrow rowtype="button" rowclass="dcom_provider"]]></replace>
</modification>
<modification type="public" template="register_macros" modification_key="Lolz_register_macros_email" description="Lolz register macros email" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[ label="{{ phrase('email') }}"]]></find>
<replace><![CDATA[ placeholder="{{ phrase('email') }}"]]></replace>
</modification>
<modification type="public" template="register_macros" modification_key="Lolz_register_macros_rules" description="Lolz register macros rules" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:macro name="tos_row">
<xf:if is="$xf.tosUrl OR $xf.privacyPolicyUrl">
<xf:checkboxrow standalone="true">]]></find>
<replace><![CDATA[<xf:macro name="tos_row">
<xf:if is="$xf.tosUrl OR $xf.privacyPolicyUrl">
<xf:checkboxrow standalone="true" rowclass="dcom_rules">]]></replace>
</modification>
<modification type="public" template="register_macros" modification_key="Lolz_register_macros_username" description="Lolz register macros username" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[ label="{{ phrase('user_name') }}"
hint="{{ phrase('required') }}"
explain="{{ phrase('this_is_name_that_will_be_shown_with_your_messages') }}"]]></find>
<replace><![CDATA[ placeholder="{{ phrase('user_name') }}"
hint="{{ phrase('required') }}" ]]></replace>
</modification>
<modification type="public" template="xtr_message_block" modification_key="Lolz_login_and_register_form_ExsclusiveDark2" description="Lolz login and register form Exsclusive Dark 2" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[ <div class="message-guest-button button-group-option" data-grouptype="OR">
<xf:button href="{{ link('login') }}" icon="user" data-xf-click="overlay" data-follow-redirects="on">{{ phrase('log_in') }}</xf:button>
<xf:if is="$xf.options.registrationSetup.enabled">
<xf:button href="{{ link('register') }}" class="button--cta" icon="add" data-xf-click="overlay" data-follow-redirects="on">{{ phrase('register') }}</xf:button>
</xf:if>
</div>]]></find>
<replace><![CDATA[ <div class="message-guest-button button-group-option" data-grouptype="OR">
<xf:button href="{{ link('login') }}" icon="user" data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">{{ phrase('log_in') }}</xf:button>
<xf:if is="$xf.options.registrationSetup.enabled">
<xf:button href="{{ link('register') }}" class="button--cta" icon="add" data-xf-click="overlay" data-overlay-config="{{ {'className': 'dcom'}|json }}" data-follow-redirects="on">{{ phrase('register') }}</xf:button>
</xf:if>
</div>]]></replace>
</modification>
</template_modifications>