Mod YouGotANewRank
Author: GauravBhabu(Rakesh Jain) www.forumSquare.com
Upload: March 04, 2002 14:10:00
Compatible: Version 3.03
Installation level: 1 (1=Easy to 10=Difficult)
Database Changes: None
Files to be edited: 1
Additions and Edits
Statements to Edit: 2
New Statements : 5
New Functions : 1
Changes in Post_info.asp
Step:1
Add the statement in red as shown beloe at Around Line 44
dim intCurrPosts
if request("ARCHIVE") = "true" then
Step:2
Find the following statement - Around Line 589 and 705
strSql = "SELECT MEMBER_ID, M_LEVEL, M_EMAIL, "&Strdbntsqlname
Step:3
Replace as below:
strSql = "SELECT MEMBER_ID, M_LEVEL, M_POSTS, M_EMAIL, "&Strdbntsqlname
Step:4
Find the following statements - Around Lines 628-629
'## Forum_SQL - Add new post to Topics Table
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID"
Step:5
Add the statement in red just above these statements as shown below
intCurrPosts = rs("M_POSTS")
'## Forum_SQL - Add new post to Topics Table
strSql = "INSERT INTO " & strTablePrefix & "TOPICS (FORUM_ID"
Step:6
Find the following statements - Around Lines 742-743
'## Forum_SQL
strSql = "INSERT INTO " & strTablePrefix & "REPLY "
Step:7
Add the statement in red just above these statements as shown below
intCurrPosts = rs("M_POSTS")
'## Forum_SQL
strSql = "INSERT INTO " & strTablePrefix & "REPLY "
Step:8
Find the following statements - Around Lines 1426-1447
Add the statements in red as shown below
case "Reply", "ReplyQuote", "TopicQuote"
' DEM --> If moderated post, the counts should not be updated until after approval
' Combined the Reply, ReplyQuote and TopicQuote because the basic code was the same.
if Moderation = "Yes" then
Response.Write("New Reply Posted! It will appear once approved by a moderator")
else
Response.Write("New Reply Posted!")
DoPCount
DoUCount Request.Form("UserName")
DoULastPost Request.Form("UserName")
end if
if ChkNewRank then Response.Write("<br><br>****Congratulations You Got a New Rank!****")
case "Topic"
' DEM --> If moderated post, the counts should not be updated until after approval
if Moderation = "Yes" then
Response.Write("New Topic Posted! It will appear once approved by a moderator")
else
Response.Write("New Topic Posted!")
DoTCount
DoPCount
DoUCount Request.Form("UserName")
DoULastPost Request.Form("UserName")
end if
if ChkNewRank then Response.Write("<br><br>****Congratulations You Got a New Rank!****")
Step:9
Add this function to the end of post_info.asp
<%
function ChkNewRank()
dim arrRankLevels,intRank
ChkNewRank = False
arrRankLevels = array(intRankLevel1,intRankLevel2,intRankLevel3,intRankLevel4,intRankLevel5)
for intRank = 0 to 4
if cint(intCurrPosts + 1) = cint(arrRanklevels(intRank)) then
ChkNewRank = True
exit function
end if
next
end function
%>
Cool!
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Edited by - GauravBhabu on 04 March 2002 14:27:42