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)
 Topic Review Mod? (v3.3.03)
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 21 August 2002 :  13:55:38  Show Profile  Visit MarkJH's Homepage
I had a go at implementing Gor's Topic Review Mod (see Completed Mods forum) but didn't really like the way it's been designed to work. Gor's mod shows the first post in the topic, then lists the last x number of posts, in reverse order.

I want the modification to the code to just display the posts just as it does normally, but only the last x amount of posts. x being determined by the number of posts displayed on a page as set in Admin Options.

Any ideas?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 21 August 2002 :  19:12:54  Show Profile  Visit MarkJH's Homepage
Looks like this has already been implemented in v3.4 going by this forum.

Any ideas on how this could be done in my v3.3.03 code?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 22 August 2002 :  18:37:04  Show Profile  Visit MarkJH's Homepage
Anyone?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 23 August 2002 :  03:26:34  Show Profile
Mark is it this mod? If so maybe try changing the DESC to ASC...

Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 24 August 2002 :  11:03:23  Show Profile  Visit MarkJH's Homepage
I'm not keen on the way that mod works. All I want is to display the last 25 posts in the Topic Review and in exactly the same way as it works standard in v3.3.03 but obviously not displaying all the posts in the topic.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 26 August 2002 :  20:20:55  Show Profile  Visit MarkJH's Homepage
Okay, i've changed DESC to ASC as you suggested, Hamlin.

There's a lot wrong with this mod for v3.3.03:

In this mod, Gor stated that "Because we're using 3.3.02 here at the site, strPageSize now is a string.
The RED code is needed to convert it to an integer for it to work." There doesn't appear to be any RED code anywhere on the page! The current code still displays all the posts rather than the latest x amount.

Rather than saying "L A T E S T R E P L I E S", how could I change it to make it say "LATEST x NO. OF REPLIES"?

TIA.

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 28 August 2002 :  13:05:42  Show Profile  Visit MarkJH's Homepage
Somebody... please?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 28 August 2002 :  13:42:24  Show Profile
Mark to convert strPage size to a int I think on this line

(rs.EOF or (intRecordCount > strPageSize))

you need to add Cint(strPageSize)

So it would be

(rs.EOF or (intRecordCount > Cint(strPageSize)))

And if you made this line


sResponse.Write("L A T E S T R E P L I E S (Newest First)</font></b></td></tr>")

to

Response.Write("L A T E S T " & strPageSize & " R E P L I E S (Newest First)</font></b></td></tr>")

It would get the X number you want


That was all wrong

Edited by - Hamlin on 28 August 2002 13:49:35
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 28 August 2002 :  14:03:06  Show Profile  Visit MarkJH's Homepage
quote:
Mark to convert strPage size to a int I think on this line

(rs.EOF or (intRecordCount > strPageSize))

you need to add Cint(strPageSize)

So it would be

(rs.EOF or (intRecordCount > Cint(strPageSize)))


Kinda working... except it's listing the first 25 replies!

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 28 August 2002 :  14:41:48  Show Profile


lol you know where I suggested make it ASC well that was wrong er I was sleepy....doing DESC will give the newest reply...I think
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 29 August 2002 :  13:15:38  Show Profile  Visit MarkJH's Homepage
Okay, this is the problem.

When I use DESC, it does list the last 25 replies but in opposite order i.e. the latest reply is at the top whilst the 25th latest is at the bottom.

If I use ASC, it lists the first 25 replies to the topic, but in the correct order (top to bottom).

I need a combination of both! lol

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 29 August 2002 :  13:16:41  Show Profile  Visit MarkJH's Homepage
This is what i've got so far:

'## Forum_SQL - Get all replies to Topic from the DB
strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strActivePrefix & "REPLY.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strActivePrefix & "REPLY "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strActivePrefix & "REPLY.R_AUTHOR "
strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
' DEM --> Added check for moderation so that only admins and moderators can see the unapproved posts.
if Moderation = "Y" then
strSql = strSql & " AND R_STATUS < 2 " ' Ignore unapproved and rejected posts...
else
strSql = strSql & " AND R_STATUS < 3 " ' Ignore all rejected posts....
end if
strSql = strSql & " ORDER BY " & strActivePrefix & "REPLY.R_DATE ASC"

set rs = Server.CreateObject("ADODB.Recordset")

' rs.cachesize=15
rs.open strSql, my_Conn, 3

strI = 0
intRecordcount = 1
if rs.EOF or rs.BOF then
Response.Write ""
else
Response.Write("<tr>")
Response.Write("<td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>")
Response.Write("L A T E S T     R E P L I E S</font></b></td></tr>")
rs.movefirst
do until (rs.EOF or (intRecordCount > Cint(strPageSize)))
if strI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
Response.Write " <TR>" & vbNewline & _
" <TD bgcolor='" & CColor & "' valign='top'" & vbNewline
if lcase(strTopicNoWrapLeft) = "1" then
Response.Write " nowrap"
end if
Response.Write "><b><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & ChkString(rs("M_NAME"),"display") & "</font></b></td>" & vbNewline & _
" <TD bgcolor='" & CColor & "' valign='top'"
if lcase(strTopicNoWrapRight) = "1" then
Response.Write " nowrap"
end if
Response.Write "><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & formatStr(rs("R_MESSAGE")) & "</font></td>" & vbNewline & _
" </tr>" & vbNewline
rs.MoveNext
intRecordcount = intRecordcount + 1
strI = strI + 1
if strI = 2 then
strI = 0
end if
loop
end if

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 30 August 2002 :  13:23:01  Show Profile  Visit MarkJH's Homepage
Hmm, I know that v3.4 is most peoples primary focus right now but surely somebody could help me with this please? I'm not wanting to rant and rave but i'm really needing some help here. I've had to bump this three times already.

Hamlin, thanks for all your help so far!

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 30 August 2002 :  16:01:07  Show Profile
hi~ Mark
it really a "creative" topic review method... i never thought it~

not sure this doing right or wrong, but maybe you can try it...

'## Forum_SQL - Get all replies to Topic from the DB
strSql ="SELECT TOP " & Cint(strPageSize) & " " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strActivePrefix & "REPLY.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strActivePrefix & "REPLY "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strActivePrefix & "REPLY.R_AUTHOR "
strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
' DEM --> Added check for moderation so that only admins and moderators can see the unapproved posts.
if Moderation = "Y" then
strSql = strSql & " AND R_STATUS < 2 " ' Ignore unapproved and rejected posts...
else
strSql = strSql & " AND R_STATUS < 3 " ' Ignore all rejected posts....
end if
strSql = strSql & " ORDER BY " & strActivePrefix & "REPLY.R_DATE DESC"

set rs = Server.CreateObject("ADODB.Recordset")

' rs.cachesize=15
rs.open strSql, my_Conn, 3

strI = 0
intRecordcount = 1
if rs.EOF or rs.BOF then
Response.Write ""
else
Response.Write("<tr>")
Response.Write("<td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>")
Response.Write("L A T E S T     R E P L I E S</font></b></td></tr>")
rs.MoveLast
do until (rs.BOF or (intRecordCount > Cint(strPageSize)))
if strI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
Response.Write " <TR>" & vbNewline & _
" <TD bgcolor='" & CColor & "' valign='top'" & vbNewline
if lcase(strTopicNoWrapLeft) = "1" then
Response.Write " nowrap"
end if
Response.Write "><b><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & ChkString(rs("M_NAME"),"display") & "</font></b></td>" & vbNewline & _
" <TD bgcolor='" & CColor & "' valign='top'"
if lcase(strTopicNoWrapRight) = "1" then
Response.Write " nowrap"
end if
Response.Write "><font color='" & strForumFontColor & "' face='" & strDefaultFontFace & "' size='2'>" & formatStr(rs("R_MESSAGE")) & "</font></td>" & vbNewline & _
" </tr>" & vbNewline
rs.MovePrevious
intRecordcount = intRecordcount + 1
strI = strI + 1
if strI = 2 then
strI = 0
end if
loop
end if


i think this can show the last "strPageSize"(u can chage this..) replies and in normal order...

hope this have some help~~

~......~.~~
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 31 August 2002 :  06:11:21  Show Profile  Visit MarkJH's Homepage
Dora, you are a legend!

That works perfectly! This'll take a lot of strain off of my server and it'll mean my moderators won't have to keep locking threads after 10 pages. Awesome stuff, no forum should be without it!

Thanks again!

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page

MarkJH
Senior Member

United Kingdom
1722 Posts

Posted - 31 August 2002 :  06:22:53  Show Profile  Visit MarkJH's Homepage
Erm, one more thing.

How would I go about changing the "Latest Replies" to something like "x latest replies (oldest first)" where x is the number of replies up to the largest amount of replies set by me in the admin section? i.e x could be anywhere between 1 and - in the case of my forums - 25?

Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 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 1.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07