Previous Thread
Next Thread
Print Thread
Rate Thread
#211736 09/13/2001 2:30 AM
Joined: Oct 2000
Posts: 8
Newbie
Newbie
Offline
Joined: Oct 2000
Posts: 8
Has anyone succesfully modified the wwwthreads cookie to be accepted site wide? (eg, subdomains, folders before the wwwthreads install)

If so, suggestions, examples..

this is pretty much the final stepping stone in my quest for total site integration with wwwthreads.


<img src="/threads/php/images/graemlins/smile.gif" alt="" />
Sponsored Links
Sukeband #211737 09/13/2001 3:48 AM
Joined: Sep 2001
Posts: 5
Lurker
Lurker
Offline
Joined: Sep 2001
Posts: 5
The problem with the w3t cookies is that they're set only for the current directory/folder. Solution:

Find all occurences of setcookie(); and apply the following changes before the closing bracket.

Before:
setcookie("w3t_myname", "$CheckUser", time()+31536000);

After:
setcookie("w3t_myname", "$CheckUser", time()+31536000, "/", ".yourdomain.com");

In this very example the cookie will be available to all files (the "/" part) on yourdomain.com and all it's subdomains. If you plan on using it on only one particular domain, don't write ".yourdomain.com" but "nameofsubdomain.yourdomain.com". Of course yourdomain.com has to be replaced with the name of you actual domain.

BTW, the original part in brackets ("w3t_myname", "$CheckUser", time()+31536000) might be different from setcookie() to setcookie() since there are different variables set as cookies.

Hope this helps.

tgnb #211738 09/13/2001 10:07 PM
Joined: Oct 2000
Posts: 8
Newbie
Newbie
Offline
Joined: Oct 2000
Posts: 8
I'm not sure of the repercusions of this, BUT, because i'm still doing the test on my local machine, and having to input the IP addy in order to view the contents, i couldn't add the Domain name linke.

But, if i simply add the "/" it works perfectly fine! My next question is what, if any, downfalls are there to using this method?

Thanks a million!


<img src="/threads/php/images/graemlins/smile.gif" alt="" />
Sukeband #211739 09/14/2001 1:23 AM
Joined: Sep 2001
Posts: 5
Lurker
Lurker
Offline
Joined: Sep 2001
Posts: 5
Naw, no real drawbacks. In my special case it was necessary to add the ".yourdomain.com" as setcookie() argument since I wanted to use the cookies all over my site, including the subdomains.

tgnb #211740 09/17/2001 11:36 AM
Joined: Dec 1999
Posts: 158
Enthusiast
Enthusiast
Offline
Joined: Dec 1999
Posts: 158
would it be possible to include this modification in the standard version?
it would be very helpful for writing w3t addons.

Sponsored Links
Saxeus #211741 09/17/2001 7:49 PM
Joined: May 1999
Posts: 3,039
Guru
Guru
Offline
Joined: May 1999
Posts: 3,039
I should be able to do that. I'll probably put it in as a config option because I know some users don't like a sitewide cookie.


UBB.threads Developer
Sally #211742 09/18/2001 2:00 AM
Joined: Dec 1999
Posts: 158
Enthusiast
Enthusiast
Offline
Joined: Dec 1999
Posts: 158
thanks.
maybe it should be an option to specify folders.
because I'm also hosting people and I don't wan't them to read out my cookies.

e.g. my site is located in poisonfree.com/poisonfree
one level higher there's lots of other peoples sites...


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)