Previous Thread
Next Thread
Print Thread
Rating: 5
Page 1 of 3 1 2 3
#232474 01/10/2003 1:03 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Updated for UBB.threads 6.2

This will display your cookies and allow you to expire them. When a user is having problems that seem cookie related have them use this to clear their cookies.

Place it in your ubbthreads directory and provide a link to the mycookies.php script.

DEMO: Here at threadsdev


Update (January 13, 2003): With Carl's more informative instructions/information I decided to add in language file support. The zip includes the english language file "mycookies.lang.php" which needs to be placed in all language directories. Translate as needed.

Updated on January 19, 2003 to include German language file. Thanks Carl/Astaran

Updated on January 26, 2003 to hopefully work on all installs.

Updated on January 26 (hours later), 2003 to hopefully work on all installs again.


If you do translate the language file please post your translation so I can add it to the zip file for others. Thanks.
Attachments
64372-mycookies.6.2.1.zip (0 Bytes, 179 downloads)

Last edited by JoshPet; 02/16/2003 6:13 AM.
Sponsored Links
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Guess I should rename this. It's not a "pal" for IIP. It's stand alone. Place it in your ubbthreads directory.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ok renamed it. Should be less confusion now.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I had thought about adding this into the IIP package once or twice before. I'll probably do so sometime tonight.

Sponsored Links
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
cheers Dave working now

Should have looked at the script


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
That's good.

I broke it though when I renamed the file. I forgot to set the location it returns to when expiring cookies to the new name. All fixed now.

Joined: Oct 2002
Posts: 165
Member
Member
Offline
Joined: Oct 2002
Posts: 165
How does this differ from the earlier version that seems to still work?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Incoming variable values are pulled using the get_input function in .threads 6.2 so register globals can be turned off for better security. Other possible cookie paths are used in addition to the configured path to cover cookies that may have been inadvertantly set with the wrong paths during setup or maintenance of the forums. Depending on your setup your old script will NOT delete your w3t_visit cookie in .threads 6.2. Cookie values are decoded to show their exact value for curiosity's sake as well.

I had to look to see myself and while I was at it I found another error. I had the form posting to the old cookiepal.php script and not the new name. I also put the new table wrappers of .threads 6.2 to use and made the display validate XHTML 1.0 transitional as well. I'll upload it again after this post.

This is how it differs.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This script is one of the best threads add ons. It should be standard. Thanks Dave.

Sponsored Links
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Once again you rule!

Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
Thank you for this cool tool.

I thought that giving some more explanation to the users would help, so I extended your feedback-messages a little:

echo "<tr><td class="darktable" colspan="2"><form method="post" action="{$config['phpurl']}/mycookies.php"><input type="submit" name="submit" value="Expire Cookies" class="buttons" /><input type="hidden" name="doExpire" value="1" /><input type="hidden" name="Cat" value="$Cat" /></form>
[:"brown"]<p>Expiring (deleting) your board's cookies might be useful if you suspect that they are damaged and the board is malfunctioning.</p><p>Expiring those cookies will do NO harm at all, but this will log you out of the board. - Once you login and start using the board again, new fresh cookies will be set automatically.</p>[/]
</td></tr>$tbclose";

echo "<tr><td align="left" class="lighttable" colspan="2">You have no current cookies.[:"brown"] - This will log you out. Once you login and start using the board again, new cookies will be set automatically. [/]</td></tr>";

Last edited by caymuc; 01/13/2003 6:23 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Thanks

I'll get your extra information into this yet tonight.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I just added in your extra information in the form of a language file. I'm hoping that you will supply a German version of the language file so I can package it up with the zip.

If anyone else can provide other languages please post the translated language files here and I'll update the zip with them. Thanks!

Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
Wow more good stuff dave . Thanks man .

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Your welcome

Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
[]I'm hoping that you will supply a German version [/]

OK, I'll try:

[:"#666666"]<p>Expiring (deleting) your board's cookies might be useful if you suspect that they are damaged and the board is malfunctioning.</p>
<p>Expiring those cookies will do NO harm at all, but this will log you out of the board. - Once you login and start using the board again, new fresh cookies will be set automatically.</p> [/]

</p><p>Das Löschen der Forum-Cookies kann z.B. sinnvoll sein, wenn das Forum nicht wie erwartet funktioniert und Sie vermuten, dass es vielleicht an beschädigten Cookies liegen könnte.</p>
<p>Das Löschen dieser Cookies richtet KEINEN Schaden an aber Sie werden aus dem Forum abgemeldet. Sobald Sie sich erneut anmelden, werden automatisch neue, "frische" Cookies im Browser angelegt.</p>

[:"#666666"]You have no current cookies. - This will log you out. Once you login and start using the board again, new cookies will be set automatically. [/]

Sie haben keine Forum-Cookies (mehr) in Ihrem Browser. - Sie werden nun aus dem Forum abgemeldet. Sobald Sie sich erneut anmelden, werden automatisch neue Cookies im Browser angelegt.

Last edited by caymuc; 01/15/2003 4:05 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Thanks Carl but would you mind downloading the zip and creating a german language file based on the english one that's included and attaching it here? Thanks.

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
I created the german language file based on Carls suggestions.
See attached file.
Attachments
65164-mycookies.lang.txt (0 Bytes, 57 downloads)

Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Just noticed that $user has no value in this script. Since this page doesn't care about user authentification i'd suggest to replace send_header param $user with '0'.

Joined: Aug 2002
Posts: 45
User
User
Offline
Joined: Aug 2002
Posts: 45
Amazing hack
This has to be standard

Thanks Dave

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Thanks Astaran. I somehow missed your post here. I'll get this in the main zip right now.

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I added a call to auth in so that the $user array is filled if being viewed by a registered user. Otherwise a call to auth is made in the send_header function when there is no $user information.

Thanks for pointing that out Astaran.

Last edited by JustDave; 01/19/2003 9:30 AM.
Joined: Sep 2001
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 15
Hi,
I went an added this much needed utility, however it is not functioning for me. I attempted this on 3 separate forums I run, all on different boxes. I had a couple of other users visit the url and it did not delete our cookies or log us out. Not sure if it has some restrictions?
I would love to get this thing functioning
Best Wishes,
Charlie

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
This script needs to be placed in your ubbthreads directory to work. I'm not sure why it wouldn't work otherwise. What is the URL to your forum with this script in it?

Joined: Mar 2002
Posts: 305
Enthusiast
Enthusiast
Offline
Joined: Mar 2002
Posts: 305
It's working great for us Dave.

As Dave said, make sure the "mycookies.php" file is in your regular .threads directory, and the "mycookies.lang.php" file is in your "languages/english/" folder.

I actually added a little blurb about it on the logout page, and put the link there. It wouldn't matter where the link is though, as long as you had the URL to the page correct.


[:"red"]Lisa[/]
Joined: Sep 2001
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 15
It is in the correct directory and stuff, just puzzled why it will not function.
http://www.aaca.org/ubbthreads/mycookies.php
It is on a Windows server, not sure if this is related.
Thanks for your reply!
Charlie

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Off hand I can't see why it wouldn't work. It's a really simple script. Are the server times messed up? Perhaps the expiration time needs to be set further back?

Joined: Sep 2001
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 15
has me really puzzled as well as I have it working on a few of our other forums, but on completely different boxes. The big difference is that they are all running Linux and this box is a Windows server. Times are all ok as well and I will try adjusting the expiration time and let you know how that goes.
Best Wishes,
Charlie

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I just updated the script and the language files. Install them and let me know how it goes.

Joined: Sep 2001
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 15
Thanks for the update, unfortunately it still will not work with this site
I played around with the expiration time, manually deleted all my cookies a number of times and still not a go.
Do you know if anyone else using this on a Windows Server?
Not sure if that is the root of this problem or not.
Best Wishes,
Charlie

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Can you manually log out from the forum on your windows machine? I have one idea left... lol

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ok scratch that. I'm fresh out of ideas at the moment with this...

Do you have a test login I can use to view this on your windows machine with?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Ok I adjusted the script again. This time not only are we expiring the cookie but also setting it's value to an empty string. Maybe this is needed on a windows box? That's how .threads logs a user out so if that works this should work? LoL I hope.

Joined: Sep 2001
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 15
Thanks again!
I just updated the script, manually dumped all my cookies to start off fresh, logged in and then tried the script and still a no go .
Do you still need that test account? Looks like you registered already, but need to confirm it.
Best Wishes,
Charlie

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Yeah I registered but I used my garbage can email address so I have no way of confirming. I quit using my regular email address for checking sites as I get email from the admins that I don't care for but now this can be opted out of. I really have no idea why it's not working though. Maybe something is causing the cookie names to be wrong during their expiration.

Joined: Sep 2001
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 15
Not a problem, I just approved it so as long as you chose your initial password, you should be able to login and give the mycookies.php a whirl to see what is happening if you still want to take a look at it further.

I really do appreciate your time with this among all your other projects! Looking forward to your Pro release of IIP

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I played around with a few ideas and have yet another modified version I'll be uploading tomorrow morning. What ever is going on it's got to be something simple... (and overlooked) LoL

Joined: Sep 2001
Posts: 15
Newbie
Newbie
Offline
Joined: Sep 2001
Posts: 15
Thanks again, but unfortunately it still does not work on this forum. Works great on our other forums, but this one is really stubborn.
Best Wishes,
Charlie

Joined: Aug 2002
Posts: 111
Journeyman
Journeyman
Offline
Joined: Aug 2002
Posts: 111
I wanted to post and mention how much I love this hack. I've always had lots of cookie problems whenever I have to "login as user", but now I can easily dump the cookies and it fixes the problem immediately. Much easier than manually deleting my cookies, closing the browser, etc. Very handy!

Page 1 of 3 1 2 3

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
JAISP
JAISP
PA
Posts: 449
Joined: February 2008
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)