Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 I have a Great Idea Part 3
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Freeman II
Junior Member

232 Posts

Posted - 27 May 2001 :  22:59:36  Show Profile
i wanna make a custom user color theme mod, however i don;t understand the following lines from config.asp, can someone explain it to me?



Application(strCookieURL & "strDefaultFontFace") = rsConfig("C_STRDEFAULTFONTFACE")
Application(strCookieURL & "strDefaultFontSize") = rsConfig("C_STRDEFAULTFONTSIZE")
Application(strCookieURL & "strHeaderFontSize") = rsConfig("C_STRHEADERFONTSIZE")
Application(strCookieURL & "strFooterFontSize") = rsConfig("C_STRFOOTERFONTSIZE")
Application(strCookieURL & "strPageBGColor") = rsConfig("C_STRPAGEBGCOLOR")
Application(strCookieURL & "strDefaultFontColor") = rsConfig("C_STRDEFAULTFONTCOLOR")
Application(strCookieURL & "strLinkColor") = rsConfig("C_STRLINKCOLOR")
Application(strCookieURL & "strLinkTextDecoration") = rsConfig("C_STRLINKTEXTDECORATION")
Application(strCookieURL & "strVisitedLinkColor") = rsConfig("C_STRVISITEDLINKCOLOR")
Application(strCookieURL & "strVisitedTextDecoration") = rsConfig("C_STRVISITEDTEXTDECORATION")
Application(strCookieURL & "strActiveLinkColor") = rsConfig("C_STRACTIVELINKCOLOR")
...........


just need to know what Application(strCookieURL & "strActiveLinkColor") does...


Deleted
deleted

4116 Posts

Posted - 28 May 2001 :  00:37:21  Show Profile
Application object is a predefined object in ASP. It's kept in server memory (you can read more on PWS help if you like). It's similar to session object, but kept only once per application. Session object is kept per user.

You know, the admin configured data is kept in the database (forum_config table). These configuration data is used almost on every page, and this for each user vieving a page. Accessing the data from database would be very slow, so the config.asp file takes them into server memory (in its first run - this is after the first call to a forum page after the web server is started). On the preceedings calls, the config.asp just gets the values from application object into variables (you will the reverse assignments).

If you want each user to have he/she's own colors, then you have to keep that user preference data in cookie or database (say with user profile in forum_members table). But for the site to send user defined colors, they have to be read or kept in server memory. If they are read from the database or cookie (for each page) it will be very slow. If you use the sesion variables for this, you have to change the whole code, and loose substantial amount of server memory (for 1000 concurrent users, the data will be 1000 times as large).

So I don't think it's a good idea.

Bulent Ozden
Go to Top of Page

Freeman II
Junior Member

232 Posts

Posted - 28 May 2001 :  00:51:45  Show Profile
Is there any other way to do this? i know some php forums can do this, and still very fast.

i was think of adding a table called Forum_Colors

THEME_ID, STRDEFAULTFONTCOLOR....

then in FORUM_MEMBERS table add M_COLOR


and in config.asp
change Application(strCookieURL & "strLinkColor") = rsConfig"C_STRLINKCOLOR")

to
if strDBNTUserName = "" then
Application(strCookieURL & "strLinkColor") = rsConfig("C_STRLINKCOLOR")
else
Application(strCookieURL & "strLinkColor") = rsthemeConfig("C_STRLINKCOLOR")
end if

where C_STRLINKCOLOR is from the Forum_Colors table

do you think it will work?

Go to Top of Page

Deleted
deleted

4116 Posts

Posted - 28 May 2001 :  01:09:49  Show Profile
Perhaps I misunderstood you. If you mean themes for the admin, yes your idea will work. But every web user will see the same colorset. If this is the case:

You can just let you code in admin section copy a row of settings to forum_config, and call config.asp again. Be sure to make it "dirty"

Application(strCookieURL & "ConfigLoaded")= ""

so that the data is read into application object, once again.

(didn't I see the same mod before?)



Bulent Ozden
Go to Top of Page

Freeman II
Junior Member

232 Posts

Posted - 28 May 2001 :  01:36:06  Show Profile
No i want each user to have their own color theme
thats why i wanna add M_COLOR to FORUM_MEMBERS table

modify code from the Admin color theme mod would be a lot easier.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07