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)
 Active Topics Link
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  15:34:06  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
ok here..try this, replace the function with the 1 below

function getActiveCount()  'Returns the number of Active Topics
ActiveSince = Request.Cookies(strCookieURL & "ActiveSince")
'## Do Cookie stuffs with show last date
if Request.form("cookie") = "2" then
ActiveSince = Request.Form("ShowSinceDateTime")
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "ActiveSince").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "ActiveSince") = ActiveSince
end if
Select Case ActiveSince
Case "LastVisit"
lastDate = ""
Case "LastFifteen"
lastDate = DateToStr(DateAdd("n",-15,strForumTimeAdjust))
Case "LastThirty"
lastDate = DateToStr(DateAdd("n",-30,strForumTimeAdjust))
Case "LastFourtyFive"
lastDate = DateToStr(DateAdd("n",-45,strForumTimeAdjust))
Case "LastHour"
lastDate = DateToStr(DateAdd("h",-1,strForumTimeAdjust))
Case "TwoHour"
lastDate = DateToStr(DateAdd("h",-2,strForumTimeAdjust))
Case "LastDay"
lastDate = DateToStr(DateAdd("d",-1,strForumTimeAdjust))
Case "LastWeek"
lastDate = DateToStr(DateAdd("ww",-1,strForumTimeAdjust))
Case "LastMonth"
lastDate = DateToStr(DateAdd("m",-1,strForumTimeAdjust))
Case Else
lastDate = ""
End Select

if IsEmpty(Session(strCookieURL & "last_here_date")) then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
end if
if lastDate = "" then
lastDate = Session(strCookieURL & "last_here_date")
end If

if Request.Form("AllRead") = "Y" then
lastDate = ChkString(Request.Form("BuildTime"),"SQLString")

'## The redundant line below is necessary, don't delete it.
session(strCookieURL & "last_here_date") = lastDate
Session(strCookieURL & "last_here_date") = lastDate
UpdateLastHereDate lastDate,strDBNTUserName
ActiveSince = ""
end if

if mlev = 3 then
strSql = "SELECT FORUM_ID FROM " & strTablePrefix & "MODERATOR " & _
" WHERE MEMBER_ID = " & MemberID

Set rsMod = Server.CreateObject("ADODB.Recordset")
rsMod.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

if rsMod.EOF then
recModCount = ""
else
allModData = rsMod.GetRows(adGetRowsRest)
recModCount = UBound(allModData,2)
end if

RsMod.close
set RsMod = nothing

if recModCount <> "" then
for x = 0 to recModCount
if x = 0 then
ModOfForums = allModData(0,x)
else
ModOfForums = ModOfForums & "," & allModData(0,x)
end if
next
else
ModOfForums = ""
end if
else
ModOfForums = ""
end if

'## Forum_SQL - Get all active topics from last visit
strSql = "SELECT COUNT(*) as activeCount " &_
"FROM " & strMemberTablePrefix & "MEMBERS M, " & _
strTablePrefix & "FORUM F, " & _
strTablePrefix & "TOPICS T, " & _
strTablePrefix & "CATEGORY C, " & _
strMemberTablePrefix & "MEMBERS MEMBERS_1 " & _
"WHERE T.T_LAST_POST_AUTHOR = MEMBERS_1.MEMBER_ID " & _
"AND F.F_TYPE = 0 " & _
"AND F.FORUM_ID = T.FORUM_ID " & _
"AND C.CAT_ID = T.CAT_ID " & _
"AND M.MEMBER_ID = T.T_AUTHOR " & _
"AND (T.T_LAST_POST > '" & lastDate & "'"

' DEM --> if not an admin, all unapproved posts should not be viewed.
if mlev <> 4 then
strSql = strSql & " AND ((T.T_AUTHOR <> " & MemberID &_
" AND T.T_STATUS < 2)" ' Ignore unapproved/held posts
if mlev = 3 and ModOfForums <> "" then
strSql = strSql & " OR T.FORUM_ID IN (" & ModOfForums & ") "
end if
strSql = strSql & " OR T.T_AUTHOR = " & MemberID & ")"
end if
strSql = strSql & ") "

Set rs = Server.CreateObject("ADODB.Recordset")
if strDBType <> "mysql" then rs.cachesize = 50
rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

if NOT rs.EOF then
getActiveCount = rs("activeCount")
end if

rs.close
set rs = nothing
end function

<

© 1999-2010 MaD2ko0l
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  16:19:41  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Well, the new code got rid of the error, but it still shows topics in private forums where it shouldn't. Oh well. Thanks for trying! I really appreciate it!<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  16:54:38  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote

© 1999-2010 MaD2ko0l
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  18:39:19  Show Profile  Visit leatherlips's Homepage  Reply with Quote
That seems to have done it! I'll do some more testing to verify. Thanks for sticking with me! Great job! I really appreciate it!<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  19:32:09  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I just found a problem.

I also have the private messages mod installed.

One of my users tried to pm me with a quote and got the following error:

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'chkForumAccessNew'
/forum/inc_func_common.asp, line 165

Line 165 is below in red. I've included some of the surrounding code:

if mLev = 4 then
ModerateAllowed = "Y"
elseif mLev = 3 and ModOfForums <> "" then
if (strAuthType = "nt") then
if (chkForumModerator(Forum_ID, Session(strCookieURL & "username")) = "1") then ModerateAllowed = "Y" else ModerateAllowed = "N"
else
if (instr("," & ModOfForums & "," ,"," & Forum_ID & ",") > 0) then ModerateAllowed = "Y" else ModerateAllowed = "N"
end if
else
ModerateAllowed = "N"
end if
if chkForumAccessNew(Forum_PrivateForums,Forum_FPasswordNew,Forum_Subject,Forum_ID,MemberID) = true then
if allAllowedForums = "" then
allAllowedForums = Forum_ID
else
allAllowedForums = allAllowedForums & "," & Forum_ID
end if
end if
next
end if
if allAllowedForums = "" then allAllowedForums = 0
end if



Any ideas what is going on?<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 02 June 2008 :  19:39:14  Show Profile  Reply with Quote
Following on from leatherlips latest error message, I also tried to send a New PM to him and as soon as I clicked on the PM New button/link I received the same error message:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'chkForumAccessNew'
/forum/inc_func_common.asp, line 165

It appears the 'chkForumAccessNew' needs addressing!
<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 02 June 2008 :  19:57:34  Show Profile  Visit leatherlips's Homepage  Reply with Quote
I've tried changing line 165 from this:

if chkForumAccessNew(Forum_PrivateForums,Forum_FPasswordNew,Forum_Subject,Forum_ID,MemberID) = true then

To this:

chkForumAccessNew(fPrivateForums,fFPasswordNew,fForum_Subject,fForum_ID,UserNum) = true then

But it didn't fix it. I changed it to that because that is how it looks now in inc_func_secure.asp. I'm thinking there are other parts of the code that just need to be updated to the current forum code. The topics count code is for an older version of Snitz. Can anyone let me know what other things in the code need to be revised to reflect the newer Snitz code?<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  21:57:31  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
god dam it..why can i never re create these errors tht you guys get?

i will have another look tomorrow. and see what/if i can get the error<

© 1999-2010 MaD2ko0l
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 02 June 2008 :  22:22:58  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
doh, you even said the answer yourself ;-)

inc_func_secure.asp

the reason its messing up on that function is because the page you are trying to view doesnt have inc_func_secure.asp included.

try this

add the folloeing to the very 1st line as in before the <% and then try it.

<!--#INCLUDE FILE="inc_func_secure.asp" -->

the reason i wasnt seeing these errors is i was logged in as the admin :-(<

© 1999-2010 MaD2ko0l
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 03 June 2008 :  09:18:39  Show Profile  Visit leatherlips's Homepage  Reply with Quote
quote:
Originally posted by MaD2ko0l

<!--#INCLUDE FILE="inc_func_secure.asp" -->

That did it! I added it to inc_func_common.asp. That won't cause a problem with the site will it? Or would it be better to add it to the private messages pages?

I didn't see the problem either while logged in as the admin. It seemed to only effect normal users.

Thanks again! <

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 03 June 2008 :  09:33:43  Show Profile  Visit leatherlips's Homepage  Reply with Quote
Dang it...

I had a user let me know that he could no longer view the forum. All links took him to the same topic. It only seems to effect normal users because I as the admin never noticed these issues.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 03 June 2008 :  10:58:41  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
quote:
Originally posted by leatherlips

That did it! I added it to inc_func_common.asp. That won't cause a problem with the site will it? Or would it be better to add it to the private messages pages?

I didn't see the problem either while logged in as the admin. It seemed to only effect normal users.



eermm you could add it to the pm pages, but you would need to add it to all pages that didnt have it included.

so you could go through all the pages and add the include to the pages that dont have it,

or

you coudl go through all the asp pages and delete the include and just use it in inc_func_common as inc_func_common is included in everypage the forum uses.



as for the other problem, what do you mean by all the links took him to the same topic?

can you recreate this problem youself?<

© 1999-2010 MaD2ko0l
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 03 June 2008 :  17:22:00  Show Profile  Visit leatherlips's Homepage  Reply with Quote
quote:
Originally posted by MaD2ko0l

as for the other problem, what do you mean by all the links took him to the same topic?

can you recreate this problem youself?

Yes. You can see it on my test forum:

http://mangionemagic.com/forumtest/

Login: demo/demo

If you try to read or post a topic it always goes to my "About This Section" post.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 03 June 2008 :  18:07:01  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
intreasting...my copy dont do that, howevere after a bit of messing about, as a normal memebr i woudl alwasy get a "you dont have acces to this forum" error and while looking around the code its somthign to do with private forums.

but also what i noticed, it seems as the stats page on default.asp doesnt filter out private forums as well.

i am either missing somthing or this is beyong my knowledge.

will have another look and see what i can come up with

P.S make sure you havent messed up of the code placements as somthign isnt quite right there, its liek it looking at a fixed value when goign to the forum.asp page.

if you remove the active topic cout does the forums work as normal?<

© 1999-2010 MaD2ko0l

Edited by - MaD2ko0l on 03 June 2008 18:08:03
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 03 June 2008 :  21:38:49  Show Profile  Visit leatherlips's Homepage  Reply with Quote
quote:
Originally posted by MaD2ko0l

if you remove the active topic cout does the forums work as normal?

Yes. Thanks for sticking with me on this.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.7 seconds. Powered By: Snitz Forums 2000 Version 3.4.07