Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
remove confirmation page during logout
Topic Started: Jun 9 2009, 04:27 AM (499 Views)
mawie22
Member
[ * ]
Is there a code or option where we can remove the 'confirmation page' whenever someone logs out?

Many times I forget to click the 'confirm' button after I clicked on logout, I'm sure it would happen to others too & if they are in an internet cafe then someone else may have access to their account. And also, it uses up an ad credit.


Oh yeah....search option isn't working right now, sorry if this has been brought up before.
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

I've checked the Code and Modification Databases and cannot find anything relating to this - You would have to check the ZB Directory http://s1.zetaboards.com/zb/directory/?p=search for forums which specialise in codings some of which take requests
Quote Post Goto Top
 
Reid-ZNS
Member Avatar
C'est un piège!
[ *  *  *  *  *  * ]
It using up an ad credit is unavoidable, even with coding.
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

Aeroice
Jun 9 2009, 02:01 PM
It using up an ad credit is unavoidable, even with coding.
That's true because it would return you to the Index/Log In page which would be a Page View
Quote Post Goto Top
 
mawie22
Member
[ * ]
^ Yeah, but it would be a Page View of a guest...and guests can still see the Ad in our forum.

Anyway, we just don't really like the confirmation page for logout (with or without the Ads issue).


peteh
Jun 9 2009, 06:39 AM
I've checked the Code and Modification Databases and cannot find anything relating to this - You would have to check the ZB Directory http://s1.zetaboards.com/zb/directory/?p=search for forums which specialise in codings some of which take requests
Thank you so much for trying to help. Waaaahhh....I don't really wanna go through the ZB Directory. :( Maybe somebody here knows a code for this.
Edited by mawie22, Jun 9 2009, 04:19 PM.
Offline Profile Quote Post Goto Top
 
Deleted User
Deleted User

mawie22
Jun 9 2009, 04:11 PM
^ Yeah, but it would be a Page View of a guest...and guests can still see the Ad in our forum.

Anyway, we just don't really like the confirmation page for logout (with or without the Ads issue).


peteh
Jun 9 2009, 06:39 AM
I've checked the Code and Modification Databases and cannot find anything relating to this - You would have to check the ZB Directory http://s1.zetaboards.com/zb/directory/?p=search for forums which specialise in codings some of which take requests
Thank you so much for trying to help. Waaaahhh....I don't really wanna go through the ZB Directory. :( Maybe somebody here knows a code for this.
In that case you would have to keep checking the code and modification databases - It's possible that someone is using a code but they cannot post it if they are not the author of the code or don't have the author's permission
Quote Post Goto Top
 
Reid-ZNS
Member Avatar
C'est un piège!
[ *  *  *  *  *  * ]
The reason that it would still use up an ad credit is because we would only be circumventing the button by submitting it in the background. That is, imagine it like this -

1. You click on the button
2. (in the background) the script loads the log out page
3. (in the background) the script clicks on the log out button
4. you are logged out and sent to the index.

It would be in the background so you wouldn't see it happen, but it's basically going off and clicking the button for you. :P

But, that being said, here is a code for it...
Code:
 
<script type='text/javascript'>
// <![CDATA[
$('#top_info a:contains(Sign Out)').click(function(e) {
e.preventDefault();
$.get(main_url + 'login/logout', function(data) {
var xc = $('input[name=xc]',data).val();
$.post(main_url + 'login/logout?',{xc:xc},function(data) {
location.href = main_url + 'index/';
})})})
// ]]>
</script>
That should work for you. Although, it appears that logging out works flawlessly (i.e. does not require a confirmation) unless you have Javascript disabled, and if you have javascript disabled, the above code will not work anyways.

Maybe there is some type of situation where confirmation is needed, though.
Offline Profile Quote Post Goto Top
 
mawie22
Member
[ * ]
Aeroice - Just got around to testing your code...hehe. It worked! Thanks a lot!!! ^_^ ^_^


BTW, I placed it Above The Copyright in the Board Template (if anybody would be interested with this code also).
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Support · Next Topic »
Add Reply