|
Joined: Oct 2000
Posts: 8
Newbie
|
Newbie
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="" />
|
|
|
|
Joined: Sep 2001
Posts: 5
Lurker
|
Lurker
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.
|
|
|
|
Joined: Oct 2000
Posts: 8
Newbie
|
Newbie
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="" />
|
|
|
|
Joined: Sep 2001
Posts: 5
Lurker
|
Lurker
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.
|
|
|
|
Joined: Dec 1999
Posts: 158
Enthusiast
|
Enthusiast
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.
|
|
|
|
Joined: May 1999
Posts: 3,039
Guru
|
Guru
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
|
|
|
|
Joined: Dec 1999
Posts: 158
Enthusiast
|
Enthusiast
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...
|
|
|
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.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|