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 Completed Add-Ons
 MOD (small): Limit length of TOPIC REVIEW
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rigger82
Junior Member

USA
311 Posts

Posted - 13 February 2001 :  09:51:28  Show Profile  Visit Rigger82's Homepage  Send Rigger82 an AOL message  Send Rigger82 a Yahoo! Message
Can anyone tell me where the code lies so I can turn off the display of the entire topic when you post a reply?

I have a hot issue that has been broken out now 5 times and is going on 6 times (I break the topic off at 15 pages or so).

Some users say that they cannot reply since the browser times out displaying all the posts below the reply form... All agree that if they are replying, they really dont need to see the ENTIRE post or really ANY of them so I would like to disable that function.

I was thinking I might modify it so it only shows the last few posts from the topic.

Any help?

---------------------
Mark Christianson
Gulf War Veteran (82nd Airborne Division)
Owner/Operator of www.paratrooper.net
Rigger@paratrooper.net<

gor
Retired Admin

Netherlands
5511 Posts

Posted - 13 February 2001 :  11:52:37  Show Profile  Visit gor's Homepage
The sql-statement that selects the previous replies can be found at line 1012 in post.asp:


'## Forum_SQL - Get all replies to Topic from the DB
strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "REPLY.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR "
strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE"


Pierre<
Go to Top of Page

Rigger82
Junior Member

USA
311 Posts

Posted - 13 February 2001 :  12:06:49  Show Profile  Visit Rigger82's Homepage  Send Rigger82 an AOL message  Send Rigger82 a Yahoo! Message
Thanks Gor... above that I just added _disabled for each item in the If Then statement so it never runs...

Later I will look at modifying that code so it shows the last few posts only.

Thanks again from all the grateful paratroopers at paratrooper.net


HEY ALL, 2 RANGERS ARE MARCHING 750 MILES FROM GA TO DC TO SHOW OUR RESOLVE AGAINST THE ISSUING OF THE BLACK BERET TO ALL MEMBERS OF THE US ARMY! COME TO PARATROOPER.NET FOR MORE INFORMATION AND HELP SPREAD THE WORD!

---------------------
Mark Christianson
Gulf War Veteran (82nd Airborne Division)
Owner/Operator of www.paratrooper.net
Rigger@paratrooper.net<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 13 February 2001 :  14:26:58  Show Profile  Visit gor's Homepage
Mark,

When I posted my previous reply I had to post and run (was time for dinner).
After a nice dinner I looked a bit longer at the code in post.asp
If you make the blue code changes in post.asp it will only show the newest X replies (sorted descending, meaning newest first). The number of replies shown is the same as the number of posts normally shown on one page (set in the Admin Options).

The code shown below starts at about line 1012 in post.asp:

'## Forum_SQL - Get all replies to Topic from the DB
strSql ="SELECT " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strTablePrefix & "REPLY.R_MESSAGE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS, " & strTablePrefix & "REPLY "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "REPLY.R_AUTHOR "
strSql = strSql & " AND TOPIC_ID = " & Request.QueryString("TOPIC_ID") & " "
strSql = strSql & " ORDER BY " & strTablePrefix & "REPLY.R_DATE DESC"

set rs = Server.CreateObject("ADODB.Recordset")
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  (Newest First)</font></b></td></tr>")

rs.movefirst
do until (rs.EOF or (intRecordCount > strPageSize))
if strI = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
Response.Write " <TR>" & vbCrLf & _
" <TD bgcolor='" & CColor & "' valign='top'"
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>" & vbCrLf & _
" <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>" & vbCrLf & _
" </tr>" & vbCrLf
rs.MoveNext
intRecordcount = intRecordcount + 1
strI = strI + 1
if strI = 2 then
strI = 0
end if
loop
end if


Seeing the large number of replies on some of the Mod-topics this might be something to add to the source code..... (Mike ?)

Pierre<
Go to Top of Page

Rigger82
Junior Member

USA
311 Posts

Posted - 13 February 2001 :  14:30:43  Show Profile  Visit Rigger82's Homepage  Send Rigger82 an AOL message  Send Rigger82 a Yahoo! Message
Wow.. and tied into the posts per page.. Im impressed. This might be a good addition to the full forum code.

Keep up the great work!

---------------------
Mark Christianson
Gulf War Veteran (82nd Airborne Division)
Owner/Operator of www.paratrooper.net
Rigger@paratrooper.net<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 13 February 2001 :  14:38:02  Show Profile  Visit gor's Homepage
Thank you , I'm going to rename and move this into the finished MODs forum for now.
We'll see if it ends up in the source.

Pierre<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 19 August 2001 :  02:55:39  Show Profile  Visit gor's Homepage
Other than that the shown code starts at about 1236 in Version 3.3.x this MOD still works in the new versions

Pierre
Join a Snitz Mailinglist<
Go to Top of Page

gor
Retired Admin

Netherlands
5511 Posts

Posted - 19 August 2001 :  04:14:16  Show Profile  Visit gor's Homepage
Oops, sorry missed one change,
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.

Pierre
Join a Snitz Mailinglist<
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07