Mod Extra Star to ForumAdmin
Six Stars to Forum Admin and Five Stars To Other Admins
Author: Rakesh Jain(GauravBhabu)
Compatability: Snitz version 3.4 and up
Implementation:
Requires Modification of code in following files
1. inc_func_member.asp
2. member.asp
3. topic.asp
Step 1
File: inc_func_member.asp
Replace the function getStar_Level (Look between Lines 92-123) in the File inc_func_member.asp with the following.
function getStar_Level(fM_ID, fM_LEVEL, fM_POSTS)
dim strStarImage, intRank, strStar_Level
dim intStarCount, strNewRankColor, arrRankLevels, arrRankColors
strStar_Level = ""
select case fM_LEVEL
case "1", "2"
if (fM_POSTS < cint(intRankLevel1)) then getStar_Level = strStar_Level : exit function
case "3"
Rem -Admin, so continue
case else
getStar_Level = strStar_Level & "Error"
exit function
end select
arrRankLevels = array(intRankLevel1,intRankLevel2,intRankLevel3,intRankLevel4,intRankLevel5)
arrRankColors = array(strRankColor1,strRankColor2,strRankColor3,strRankColor4,strRankColor5)
for intRank = 0 to 3
if (fM_POSTS < cint(arrRankLevels(intRank + 1))) then exit for
next
arrRankLevels = empty
select case fM_LEVEL
case "1"
strNewRankColor = arrRankColors(intRank)
case "2"
strNewRankColor = strRankColorMod
case "3"
strNewRankColor = strRankColorAdmin
Rem -Five Stars to Admins Always
intRank = 4
Rem -Six Stars to Forum Admin Always
if fM_ID = intAdminMemberID then intRank = intRank + 1
end select
arrRankColors = empty
strStarImage = getCurrentIcon("icon_star_" & strNewRankColor & ".gif|13|12","","")
for intStarCount = 0 to intRank
strStar_Level = strStar_Level & strStarImage
next
getStar_Level = strStar_Level
strStarImage = "" : strStar_Level = ""
intRank = 0 : intStarCount = 0
end function
Step 2
File: members.asp
Find these statements around Lines 439-441
if strShowRank = 2 or strShowRank = 3 then
Response.Write("<br />" & getStar_Level(Members_MemberLevel, Members_MemberPosts) & "")
end if
Modify/Replace the above statements as below
if strShowRank = 2 or strShowRank = 3 then
Response.Write("<br />" & getStar_Level(Members_MemberID, Members_MemberLevel, Members_MemberPosts) & "")
end if
Step 3
File: topic.asp
Find these statements around Lines 579-581
if strShowRank = 2 or strShowRank = 3 then
Response.Write " " & getStar_Level(Reply_MemberLevel, Reply_MemberPosts) & "<br />" & vbNewLine
end if
Modify/Replace the above statements as below
if strShowRank = 2 or strShowRank = 3 then
Response.Write " " & getStar_Level(Reply_MemberID, Reply_MemberLevel, Reply_MemberPosts) & "<br />" & vbNewLine
end if
Step 4
File: topic.asp
Find these statements around Lines 780-782
if strShowRank = 2 or strShowRank = 3 then
Response.Write " " & getStar_Level(Member_Level, Member_Posts) & "<br />" & vbNewLine
end if
Modify/Replace the above statements as below
if strShowRank = 2 or strShowRank = 3 then
Response.Write " " & getStar_Level(TMember_ID, Member_Level, Member_Posts) & "<br />" & vbNewLine
end if
That is all.