Author |
Topic |
GauravBhabu
Advanced Member
4288 Posts |
Posted - 03 September 2002 : 08:14:40
|
Mod Five Stars To Admins Always Author: Rakesh Jain(GauravBhabu) Compatability: Snitz version 3.4 and up
Implementation: Replace the function getStar_Level (Look between Lines 92-123) in the File inc_func_member.asp with the following.
function getStar_Level(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
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
Mod Five Stars To Admins and Moderators Always Author: Rakesh Jain(GauravBhabu) Compatability: Snitz version 3.4 and up
Implementation: Replace the function getStar_Level (Look between Lines 92-123) in the File inc_func_member.asp with the following.
function getStar_Level(fM_LEVEL, fM_POSTS)
dim strStarImage, intRank, strStar_Level
dim intStarCount, strNewRankColor, arrRankLevels, arrRankColors
strStar_Level = ""
select case fM_LEVEL
case "1"
if (fM_POSTS < cint(intRankLevel1)) then getStar_Level = strStar_Level : exit function
case "2", "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
Rem -Five Stars to Moderators Always
intRank = 4
case "3"
strNewRankColor = strRankColorAdmin
Rem -Five Stars to Admins Always
intRank = 4
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
|
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
Edited by - GauravBhabu on 06 September 2002 15:27:59 |
|
ErEf
New Member
Netherlands
74 Posts |
Posted - 03 September 2002 : 10:49:44
|
after replacing the function default.asp returns with this error. Error Type: Microsoft VBScript compilation (0x800A03EE) Expected ')' /forum/inc_func_member.asp, line 98, column 16 if (fM_POSTS < cint(intRankLevel1)) then getStar_Level = strStar_Level : exit function
well found it out myself .. went something wrong with copy past. Works fine now.
Can it also be changed that also moderators have 5 stars?
|
If you think you can or you think you cannot, you are right. - Henry Ford |
Edited by - ErEf on 03 September 2002 11:08:07 |
|
|
drirene
Junior Member
USA
129 Posts |
Posted - 04 September 2002 : 00:37:40
|
I found a much easier way to give mods and admins five stars: In 3.4.2 when you edit their profiles, you can change the number of posts they've made. Kick it up over 5000, and - BAM - five stars! |
*Trubble* the Cat & Dr. Irene http://drirene.com |
|
|
Kat
Advanced Member
United Kingdom
3065 Posts |
Posted - 04 September 2002 : 05:09:57
|
Yeah but that isn't a proper fix. it isn't representative of the real posts. I wouldn't advise you do that. |
KatsKorner
Installation Help | Snitz Mods | Forum Hosting
|
|
|
alex042
Average Member
USA
631 Posts |
Posted - 04 September 2002 : 08:02:26
|
quote: Yeah but that isn't a proper fix. it isn't representative of the real posts. I wouldn't advise you do that.
People do it with checkbooks.
|
|
|
Kat
Advanced Member
United Kingdom
3065 Posts |
|
alex042
Average Member
USA
631 Posts |
Posted - 04 September 2002 : 08:28:39
|
quote: Pardon?
Some companies wouldn't take checks from 'new' accounts. The account was assumed to be 'new' if the checks numbers were low, say less than 1000 so some people start their checkbook numbering sequence at 1001 instead of 101. That's what I ended up doing because I didn't want to deal with the hassle of companies not taking my check just because of the check number.
|
|
|
Kat
Advanced Member
United Kingdom
3065 Posts |
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 04 September 2002 : 08:50:54
|
Checks/Cheques? Discuss stars or the Mod please. |
|
|
Kat
Advanced Member
United Kingdom
3065 Posts |
|
Lydecker
Junior Member
United Kingdom
297 Posts |
Posted - 06 September 2002 : 14:50:25
|
I have to say I had ZERO faith in this MOD working when I looked at the amount of code I would be deleting, but it seems to work Great :) :) :)
How can we do the same with Moderators??
THanks for the MOD!! |
|
|
Lydecker
Junior Member
United Kingdom
297 Posts |
Posted - 06 September 2002 : 14:54:52
|
Okay I took a stab - is this correct or will the site blow up in a day? Thanks
case "1" strNewRankColor = arrRankColors(intRank) case "2" strNewRankColor = strRankColorMod Rem -Five Stars to Mods Always intRank = 4
case "3" strNewRankColor = strRankColorAdmin Rem -Five Stars to Admins Always intRank = 4
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 06 September 2002 : 15:09:14
|
quote: Originally posted by Lydecker
Okay I took a stab - is this correct or will the site blow up in a day? Thanks
case "1" strNewRankColor = arrRankColors(intRank) case "2" strNewRankColor = strRankColorMod Rem -Five Stars to Mods Always intRank = 4
case "3" strNewRankColor = strRankColorAdmin Rem -Five Stars to Admins Always intRank = 4
Need to change as shown below as well
select case fM_LEVEL
case "1"
if (fM_POSTS < cint(intRankLevel1)) then getStar_Level = strStar_Level : exit function
case "2", "3"
Rem -Admin, Moderator so continue
case else
getStar_Level = strStar_Level & "Error"
exit function
end select
|
CSS and HTML4.01 Compilant Snitz Forum . ForumSquare . Rakesh Jain
It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Prayer Of Forgiveness "I forgive all living beings. May all living beings forgive me! I cherish the friendliness towards all and harbour enmity towards none." -- Aavashyaka Sutra(Translated) |
|
|
Lydecker
Junior Member
United Kingdom
297 Posts |
Posted - 06 September 2002 : 15:16:50
|
Dosent work. I returns all stars as: icon_star_.gif
The way I had it did work for MODS (but there was probibly something wrong) - but the code you just gave dosent show any stars :(
Any ideas??
Many thanks for the help. |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 06 September 2002 : 15:25:29
|
The change I mentioned is for the first part of the select case statements (5th and 7th statements within the function). The change you made also remains but that is for the second part. |
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 06 September 2002 : 15:29:28
|
I also posted the code to give Five stars to both Admins and Moderators in my first post |
|
|
Topic |
|