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 DEV-Group
 DEV Discussions (General)
 v3.4 - Group Cats - Cookies Process and...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

GauravBhabu
Advanced Member

4288 Posts

Posted - 19 August 2002 :  22:43:07  Show Profile
File : inc_top.asp

Lines : 118, 120, 121, 123, 127, 128

Uses: strUniqueID

Lines : 149, 159

Uses: strCookieURL

IMO, either strUniqueId or strCookieURL should be used.

I modified the code between Lines 115-175(71 Lines)as below, assuming that strCookieURL will be used for saving the information in Cookies.

After Modification 42 Lines

Rem -GROUP CATEGORIES
if strGroupCategories = "1" then
if Request.QueryString("Group") = "" then
if Request.Cookies(strCookieURL & "GROUP") = "" Then
Group = 2
else
Group = Request.Cookies(strCookieURL & "GROUP")
end if
else
Group = Request.QueryString("Group")
end if
Rem -set default
Session(strCookieURL & "GROUP_ICON") = "icon_group_categories.gif"
Session(strCookieURL & "GROUP_IMAGE") = strTitleImage
Rem -Forum_SQL - Group exists ?
strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE "
strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rs2 = my_Conn.Execute (strSql)
if rs2.EOF or rs2.BOF then
Group = 2
strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE "
strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rs2 = my_Conn.Execute (strSql)
end if
Session(strCookieURL & "GROUP_NAME") = rs2("GROUP_NAME")
if instr(rs2("GROUP_ICON"), ".") then
Session(strCookieURL & "GROUP_ICON") = rs2("GROUP_ICON")
end if
if instr(rs2("GROUP_IMAGE"), ".") then
Session(strCookieURL & "GROUP_IMAGE") = rs2("GROUP_IMAGE")
end if
rs2.Close
set rs2 = nothing
Response.Cookies(strCookieURL & "GROUP") = Group
Response.Cookies(strCookieURL & "GROUP").Expires = dateAdd("d", intCookieDuration, strForumTimeAdjust)
if Session(strCookieURL & "GROUP_IMAGE") <> "" then
strTitleImage = Session(strCookieURL & "GROUP_IMAGE")
end if
end if
Rem -GROUP CATEGORIES



Getting GroupName

Group Name is stored in session variable at Line 150. But it is being retreived again from the database between Lines 529-564


The code between Lines 529-564 can be modified as below:


Rem -GROUP CATEGORIES
if strGroupCategories = "1" then
if Session(strCookieURL & "GROUP_NAME") = "" then
GROUPNAME = " Default Groups "
else
GROUPNAME = Session(strCookieURL & "GROUP_NAME")
end if
Rem -Forum_SQL - Get Groups
strSql = "SELECT GROUP_ID, GROUP_CATID "
strSql = strSql & " FROM " & strTablePrefix & "GROUPS "
strSql = strSql & " WHERE GROUP_ID = " & Group
set rsgroups = Server.CreateObject("ADODB.Recordset")
rsgroups.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
if rsgroups.EOF then
recGroupCatCount = ""
else
allGroupCatData = rsgroups.GetRows(adGetRowsRest)
recGroupCatCount = UBound(allGroupCatData, 2)
end if
rsgroups.Close
set rsgroups = nothing
end if
Rem -GROUP CATEGORIES


IMO, the modified code will achieve the objective as intended with the Current Code.

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 20 August 2002 :  02:00:21  Show Profile
this was originally posted to the bug reports forum, but I don't really consider it a bug because the current code does work as described without problems.

Kal Corp, since you wrote the Group Cats mod, I'm going to leave this up to you.

There is also another suggestion concerning the Group Cats Mod here:

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=33085#162675
Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 20 August 2002 :  14:01:26  Show Profile  Visit Kal Corp's Homepage

3.4 Does have updates to the Group Cat that I didn't create.

However GauravBhabu, posted some good updates for this option. I will test and get back with you. But I believe its a good update for the next release


{VAS}-Kal Corp
VAS Development NetWork - Forums for old Snitz Mods!
Creator of all things {VAS}
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 20 August 2002 :  14:35:43  Show Profile
Kal, have you looked here

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=33085

CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain

It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Prayer Of Forgiveness
"I forgive all living beings. May all living beings forgive me!
I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated)
Go to Top of Page

Kal Corp
Average Member

USA
878 Posts

Posted - 20 August 2002 :  14:54:08  Show Profile  Visit Kal Corp's Homepage
quote:
Originally posted by GauravBhabu

Kal, have you looked here

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=33085



yep. But im currently working another issue with 3.4, and NT mode


{VAS}-Kal Corp
VAS Development NetWork - Forums for old Snitz Mods!
Creator of all things {VAS}
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 20 August 2002 :  20:18:57  Show Profile
ok, just let me know. I want to get as many fixes/revisions into v3.4.01 as possible, so that we don't have to rush out another version quite so quickly.
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.17 seconds. Powered By: Snitz Forums 2000 Version 3.4.07