Вынос кнопки разлогинивания на произвольное место

More
2 years 2 months ago #7249 by Quis Cogitat
Какой код нужно использовать, что бы вынести в произвольное место кнопку разлогинивания пользователя?
Пробовал вырезать кусок, но там указывается некий токен и JS код, который отследить не удалось. Хочется использовать кнопку вне модуля авторизации.
Заранее спасибо.

Please Log in or Create an account to join the conversation.

More
2 years 2 months ago - 2 years 2 months ago #7250 by JoomLine
Вывести модуль Slogin в нужное вам место, поставить отображать только для зарегистрированных.
И отредактировать шаблон.
Все что идет от <?php if ($type == 'logout') : ?> - 16 строка
<?php else : ?> - 82 строка

По сути вам в форме надо ставить вот этот блок:
<div class="logout-button">
        <input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" />
        <input type="hidden" name="option" value="com_users" />
        <input type="hidden" name="task" value="user.logout" />
        <input type="hidden" name="return" value="<?php echo $return; ?>" />
        <?php echo JHtml::_('form.token'); ?>
    </div>
Last edit: 2 years 2 months ago by JoomLine.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Last from the forum

    • Multi-language
    • I did not judge, quite the contrary I admire your extension that is why I used it in most sites of mine. The reason I am employing Joomla 4 alpha is the fact that in JED I observed many extensions have been fixed for this version of Joomla. Yet you are completely right, Joomla 4 both alpha and beta are in process of being developed, Next to my site in J4 I have already developed in J3 the same site, just wanted to have more experience. By the way, would you like to exchange link with my site? Kian W Nowrouzian S. Manager https://kwproductions121.com
    • In Component / JL Sitemap
© 2010-2020 JoomLine
The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries. joomline.net is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

email: This email address is being protected from spambots. You need JavaScript enabled to view it.