Topic-icon No way to set logout as text (not button)

Active Subscriptions:

None
Topic describes it all.
The topic has been locked.
Support Specialist
10 years 9 months ago #34157 by alzander
Thanks for the feedback. I've added it to our issue tracker as something to make into an option in a future release. For now, you'd have to edit the /modules/mod_sclogin/helper.php file's getLogoutButton() function and edit the code we echo there. If you need help doing so, let us know and we can help.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
10 years 9 months ago #34162 by серяко
Thanks, any guidance would help. I tried to look in login.php as a reference for the code to be echoed, but I dont have enough skills.
The topic has been locked.
Support Specialist
10 years 9 months ago #34173 by alzander
No problem. Just looked into and tested what it would need in the code. The following change looks like what you need. Please edit the /modules/mod_sclogin/helper.php file. Search for the getLogoutButton function and update it like so:
function getLogoutButton($useSecure, $jLogoutUrl)
    {
        return '<a href="'.JRoute::_('index.php?option=com_users&'.JSession::getFormToken() .'=1&task=user.logout&return='.$jLogoutUrl, true, $useSecure) . '">'.JText::_('JLOGOUT').'</a>';
    }
The rest of the code in that function isn't necessary if you aren't using JFBConnect or don't want the 'button' version of the Logout button.

Please let us know how that goes, and thanks again for the feedback and suggestions.

Alex
The topic has been locked.
Active Subscriptions:

None
10 years 9 months ago #34175 by серяко
Thanks! That workes fine. Just one minor flaw that was seen with the button as well: there`s no space between user name and the "Logout" in horizontal mode.
The topic has been locked.
Support Specialist
10 years 9 months ago #34186 by alzander
Is that when you're using the new text button code? To fix that, we'd need to see the site as we'd need to understand the styles that are being applied by your template so that we can figure out the best way to add the space. If you can post, or Private Message, the URL, we'll gladly help further.

Glad we're making progress!

Thanks,
Alex
The topic has been locked.