Previous Thread
Next Thread
Print Thread
Hop To
#29418 12/15/2003 2:58 PM
Anonymous
Unregistered
Anonymous
Unregistered
Our UBB forum runs on subdomain.domain.com, but I'd like to set the cookie to apply to all of domain.com. Can I just put a domain setting inside of the set cookie on line 572 of ubbt.inc.php to make this happen, or am I missing some other calls? Will this work OK?

#29419 12/15/2003 3:12 PM
Anonymous
Unregistered
Anonymous
Unregistered
That *should* work - although I haven't tested.

Former versions of ubbthreads had setcookie calls all over, so it was a PITA to change.

one of the things Rick did in 6.4 was move it all into the ubbt_setcookie function - which to my knowledge is the only way cookies get set in threads.

Like I said, I havent' tested and am not 100% certain, but that was the reasoning behind centralizing the function. <img border="0" title="" alt="[Smile]" src="images/icons/smile.gif" />

#29420 10/14/2004 2:29 PM
Joined: Jun 2006
Posts: 73
C
journeyman
journeyman
C Offline
Joined: Jun 2006
Posts: 73
I'm running into the same thing here. I need to set my cookies for .domain.com rather than www.domain.com.

What can I edit to make this happen?

#29421 10/14/2004 4:51 PM
Joined: Feb 2004
Posts: 86
K
journeyman
journeyman
K Offline
Joined: Feb 2004
Posts: 86
hey, just so you know, it's generally best for you to start a new topic than dredge up an old one. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" /> keeps things tidy, and will oftentimes get you a quicker response (because we'll see an unanswered thread).

in your configuration settings, you should be able to change the URL to just domain.com and the board would run on that domain...

i haven't tested this - but give it a shot and tell me if it does the trick for you. <img src="https://www.ubbcentral.com/boards/images/graemlins/smile.gif" alt="" />


Kate Thaete
Groupee Guide: Scriptkeeper
Groupee, Inc.
#29422 10/14/2004 8:24 PM
Joined: Jun 2006
Posts: 742
enthusiast
enthusiast
Joined: Jun 2006
Posts: 742
Actually threads doesn't have the ability to define the cookie domain. The setting in the config file is for the referrer check.

This would require some modification.

Untested - make backups first.

But in ubbt.inc.php you'll find the ubbt_setcookie function.

This line:

setcookie("$name","$value",$time,$cookiepath);

Would need to look something like this:


setcookie("$name","$value",$time,$cookiepath,".yourdomain.com");


Again, untested - and use caution when you modify. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" /> Modify at your own peril. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />


Joshua Pettit
Web Developer
www.ThreadsDev.net | www.JoshuaPettit.com
#29423 10/15/2004 6:23 AM
Joined: Jun 2006
Posts: 3,837
I
Ian Offline
Carpal Tunnel
Carpal Tunnel
I Offline
Joined: Jun 2006
Posts: 3,837
This should be standard - at the moment you can be looged into www.ubbcentral.com but logged out of ubbcentral.com which is daft. Okay any decent webhost would repoint ubbcentral.com to www.ubbcentral.com - but there are many that don't. <img src="https://www.ubbcentral.com/boards/images/graemlins/tongue.gif" alt="" /> <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />

If this was as default it would enable sites to have seperate sub-domains for various sections - and all still work around the threads database.

#29424 10/15/2004 10:48 AM
Joined: Feb 2004
Posts: 86
K
journeyman
journeyman
K Offline
Joined: Feb 2004
Posts: 86
interesting - I didn't know that - thanks Josh.

I agree with you Ian: I've run across several hosts that don't add the A record for 'www' to a domain...


Kate Thaete
Groupee Guide: Scriptkeeper
Groupee, Inc.
#29425 10/17/2004 7:00 PM
Joined: Jun 2006
Posts: 73
C
journeyman
journeyman
C Offline
Joined: Jun 2006
Posts: 73
THis appears to be working. Thanks again, Josh <img src="https://www.ubbcentral.com/boards/images/graemlins/grin.gif" alt="" />


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
2 members (2 invisible), 721 guests, and 156 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240501)