UBB.Dev
Posted By: JustDave [UBBT 6.0] View/Expire Cookies - 06/29/2002 10:10 PM
This script will allow the user to view the cookie names and values as seen by the script, returned from the browser. The user may then choose to expire all cookies. (and be logged out if logged in)

1. Download attached file.
2. Unzip and upload to your .threads directory.
3. Bring script up in your browser.
4. View and/or Expire your cookies.

The file is attached.

Attached File
51395-cookiepal.zip  (21 downloads)
Posted By: AllenAyres Re: [UBBT 6.0] View/Expire Cookies - 06/29/2002 10:28 PM
cool
Posted By: JoshPet Re: [UBBT 6.0] View/Expire Cookies - 06/30/2002 1:02 AM
VERY COOL!

Thanks Dave!
Super Simple to install!
Posted By: JustDave Re: [UBBT 6.0] View/Expire Cookies - 06/30/2002 1:10 AM
Could place a link to the script in the registerednav.tmpl file so logged in users can clear their cookies. Or perhaps even in unregisterednav.tmpl so those users with problems could access the script also just in case they have some cookies that need fixin.
Posted By: JustDave Re: [UBBT 6.0] View/Expire Cookies - 06/30/2002 4:50 AM
I have made a slight change to the code.

Now the script will expire directory specific and site wide cookies along with any custom cookie paths set by the admin in the config.inc.php file.

Also, if there are no current cookies the script will not display the "Expire Cookies" button.

Oh, almost forgot, I have carried the Cat variable through too.

The file is attached.

Done now.



Attached File
51410-cookiepal-2.zip  (29 downloads)
Posted By: JoshPet Re: [UBBT 6.0] View/Expire Cookies - 06/30/2002 4:59 AM
Thanks!

Dave Rocks! []http://www.measurection.com/forums/images/graemlins/peace.gif[/]
Posted By: Dave_L_dup1 Re: [UBBT 6.0] View/Expire Cookies - 06/30/2002 6:15 AM
I'll definitely use this hack.
Posted By: Ian_W Re: [UBBT 6.0] View/Expire Cookies - 07/28/2002 2:03 PM
Thanks Dave,

Only one problem - if there are no cookies, the Cat$ info is not carried over.

Regards,

Ian
Posted By: Dave_L_dup1 Re: [UBBT 6.0] View/Expire Cookies - 07/28/2002 2:22 PM
One suggestion. You might want to change:
code:
if (!$doExpire) {


to
code:
if (!isset($_POST['doExpire'])) {



That will keep the script working when Rick takes out the code in ubb.inc.php which auto-registers globals.

If the script needs to be compatible with PHP versions earlier than 4.1.0, then $HTTP_POST_VARS should be used in place of $_POST.

© UBB.Developers