Site Cookie MOD

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/61282?pagenum=1
05 November 2025, 02:43

Topic


Etymon
Site Cookie MOD
10 March 2006, 05:15



Site Cookie MOD Author: Etymon Date: March 10, 2006

I'm not really sure if the title is appropriate for the code, but in working with the Universal Login MOD, I was trying to get forum variables to display appropriately and in real time on my external (non-forum) pages within my website.
I created a work-around to the strCookieURL variable found in config.asp.
For a clean install of Snitz 3.4.05 look at line 125 for the following:

strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/"))
To have your forum variables work outside of your forum pages replace the code above with the code below:

Code:
if Instr(Request.ServerVariables("Path_Info"), "forum/") = 0 then
strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/")) & "forum/"
else
strCookieURL = Left(Request.ServerVariables("Path_Info"), InstrRev(Request.ServerVariables("Path_Info"), "/")) end if

What this is basically saying is, make the cookie URL for the web pages within the forum the same cookie URL for the web pages outside of the forum.
This MOD was created as a result of working with the Universal Login MOD installed. Whether Universal Login MOD is necessary for the Site Cookie MOD to work, I have no idea. Suggestions? Comments? Concerns? Please post below. smile<

 

Replies ...


tribaliztic
10 March 2006, 05:30


Hmm... Did I understand this correct?
If you have a page outside the /forum/-folder this help you use the forum cookie? If all pages are inside the /forum/-folder this would make no change? (trying to find all ways to deal with my little pop-up-thingy-error found in another thread =))
<
Jezmeister
10 March 2006, 11:34


I'm probably not understanding at all... but when I've worked with forum variables I've just set cookies to website in the admin pages and had no problems doing it that way... so what is this doing that setting cookies to website in the admin pages doesn't allow you to do?<
Etymon
10 March 2006, 12:31


I have the cookie set to website also.
I created some variables that triggered whether or not an image was to be displayed on an external page to the appropriate person according to their Member ID. The problem wasn't that the forum variables and my variables didn't work at all. The problem was that I could not change them in real time.
If I rebooted my computer (at home) the variables did update, but in a live environment I can't tell my host to reboot his IIS everytime I want my variables updated. But, perhaps, in a live environment the variables do update. I really don't know. I am using Personal Web Server on Windows98SE, which is a bit outdated, so I'm working with older technology here.
I was simply testing the pages before I went live when I found that this wasn't working. It would be useful for someone who wants to control content that is both external from the forums and within the forums from within the forum admin section ... in real time.
I don't know how cookies work in a live environment. This is just something that worked for what I was needing it to do. <
squad23
13 March 2006, 15:43


This was exactly what iw was looking for :) thank you very much!<
Etymon
14 March 2006, 22:30


Originally posted by squad23
This was exactly what iw was looking for :) thank you very much!

You're Welcome! bigsmile<
© 2000-2021 Snitz™ Communications