WebDev

SMF Modifications => General Code/Script Inquiries => Topic started by: marcosbr on August 19, 2020, 05:26:49 PM

Title: Login/Logout
Post by: marcosbr on August 19, 2020, 05:26:49 PM
I would like to put login and logout buttons like this. I've tried a lot and usually the logout doesn't work!
According to SMF they will not even put ...
Capturar.PNG

Title: Re: Login/Logout
Post by: marcosbr on August 20, 2020, 10:44:47 AM
The login works, the logout shows this error: An error has occurred


"Session verification failed. Please try to disconnect and reconnect again and then try again"
Title: Re: Login/Logout
Post by: Chen Zhen on August 21, 2020, 06:00:42 PM
Logout icon path example: ../Themes/default/images/icons/logout.png



Add to the end of the navigation button array in file: ../Sources/Subs.php

'logout' => array(
'title' => $txt['logout'],
'icon' => '/icons/logout.png',
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),

Title: Re: Login/Logout
Post by: marcosbr on August 21, 2020, 06:49:17 PM
Perfect! you are very good! ;D  ;D  ;D
Title: Re: Login/Logout
Post by: vince on November 10, 2020, 01:43:56 PM
i was looking for this as well ty chen ill add this later tonight after work
Title: Re: Login/Logout
Post by: vince on November 24, 2020, 03:57:34 PM
Can this be made in to a mod so when updating smf we won't have to edit core files again ???
Title: Re: Login/Logout
Post by: Chen Zhen on November 25, 2020, 08:41:41 PM

You can try this:
https://web-develop.ca/index.php?action=downloads;area=stable_smf_modifications;file=85
Title: Re: Login/Logout
Post by: marcosbr on November 26, 2020, 07:07:28 PM
already installed, tested and works. Much more practical!
Thank you again!
Title: Re: Login/Logout
Post by: vince on November 26, 2020, 11:13:54 PM
ahhhh yes nice ty ;D
Title: Re: Login/Logout
Post by: marcosbr on November 28, 2020, 06:52:10 PM
Some things I don't understand ...
You would be "INDISPENSABLE" on the SMF team!
Many people are there for nothing!
Thank you very much for the forum
Title: Re: Login/Logout
Post by: Chen Zhen on November 28, 2020, 07:52:49 PM
Thank you.

In my opinion many of the SMF team members have their strengths and likely get put into positions to use them.
There are some good coders involved with the project.
I'm happy doing my part from this forum, occasionally on the SMF website and within the community in general.
Title: Re: Login/Logout
Post by: marcosbr on November 30, 2020, 04:57:06 PM
For sure ... There are a lot of good people!
But I want to say that you "like" to help!
I've been your fan for some time!
EhPortal 1.39.6 © 2024, WebDev