Author |
Topic |
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 12:35:02
|
Is this is since "you went stars?"
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 12:39:58
|
OK I know what it is...
My bad (again)
In the function GetTopicRatingAvg
Change
if rsTopicRating("TOPIC_RATING_TOTAL_COUNT") = 0 Then iTopicRating = "Not Rated" else
To
if rsTopicRating("TOPIC_RATING_TOTAL_COUNT") = 0 Then iTopicRating = 0 else
That should then select case 0
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
rick7165
Senior Member
USA
1094 Posts |
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 07 November 2001 : 12:56:06
|
Hangon.. it's in this code in forum.asp
<%'################### Topic Rating Mod #####################'%> <% TopicRatingAvg = GetTopicRatingAvg( rs("TOPIC_ID") ) %> <td bgcolor="<% =strForumCellColor %>" valign="center" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><%= TopicRatingAvg %></font></td> <%'################### End Topic Rating Mod #####################'%>
Test Site: http://www.eastpasco.com running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: http://freeaspcode.net/snitz/ |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 07 November 2001 : 12:59:58
|
Ok.. Gota change this in the forum.asp ... replace the green with the red
<%'################### Topic Rating Mod #####################'%> <% TopicRatingAvg = GetTopicRatingAvg( rs("TOPIC_ID") ) %> <td bgcolor="<% =strForumCellColor %>" valign="center" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><img src="<%=strImageUrl %><%=GetTopicRatingPicture( iTopicRating )%>"><%= TopicRatingAvg %></font></td> <%'################### End Topic Rating Mod #####################'%>
Ok.. now if it's not rated.. I get the X image.
Test Site: http://www.eastpasco.com running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: http://freeaspcode.net/snitz/ |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 07 November 2001 : 13:03:02
|
Ok.. In inc_functions.asp
you need to add the red
case 0 strRatingPict = "icon_blank.gif"
Now last problem.. stars don't fit in table
Test Site: http://www.eastpasco.com running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: http://freeaspcode.net/snitz/ |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 13:06:15
|
Yeah I was about to say that...
I think you will either need a "blank" gif or have some logic - such as
<% TopicRatingAvg = GetTopicRatingAvg( rs("TOPIC_ID") ) %> <% if iTopicRating = 0 then %> <td bgcolor="<% =strForumCellColor %>" valign="center" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>">Not Rated</font></td> <% else %> <td bgcolor="<% =strForumCellColor %>" valign="center" align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>"><img src="<%=strImageUrl %><%=GetTopicRatingPicture( iTopicRating )%>"></font></td> <% end if %>
That should do the trick - sorry about that
CHeers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 13:07:48
|
Now you see why I used numbers
Smaller gifs?
Oh yeah forgot about the blank gif.
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
rick7165
Senior Member
USA
1094 Posts |
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 13:13:08
|
*Cheers*
Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
Posted - 07 November 2001 : 13:20:25
|
actually a better way to get the correct amount of stars, well this is what i use, one a site i am building. I allow them to pick numbers from 1 - 5 on the ranking 1=2, 2=4, 3=6, 4=8, 5=10. this way it helps so you dont not get any percents. I then send the average amount of stars to a function which is below. This function will return up to 10 stars, but its really not 10 stars its 5 remember? so below is all how it is layed out.
1 = .5 stars 2 = 1 star 3 = 1.5 stars 4 = 2 stars 5 = 2.5 stars and so on. but here is the function i use.
function ShowVisualRating(frating) if frating="" or isnull(frating) or frating="0" then ShowVisualRating = "<b>No Rating</b>" exit function end if Select Case frating Case "10" ShowVisualRating = "<img src=""" & strBaseImageURL & "10stars.gif"">" Case "9" ShowVisualRating = "<img src=""" & strBaseImageURL & "9stars.gif"">" Case "8" ShowVisualRating = "<img src=""" & strBaseImageURL & "8stars.gif"">" Case "7" ShowVisualRating = "<img src=""" & strBaseImageURL & "7stars.gif"">" Case "6" ShowVisualRating = "<img src=""" & strBaseImageURL & "6stars.gif"">" Case "5" ShowVisualRating = "<img src=""" & strBaseImageURL & "5stars.gif"">" Case "4" ShowVisualRating = "<img src=""" & strBaseImageURL & "4stars.gif"">" Case "3" ShowVisualRating = "<img src=""" & strBaseImageURL & "3stars.gif"">" Case else ShowVisualRating = "<img src=""" & strBaseImageURL & "2stars.gif"">" End Select end function
Brad Web Hosting with SQL Server @ $24.95 per month Snitz Mod Archive
|
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 07 November 2001 : 13:20:33
|
Oh that was my fault :( I had a table off.
Ok.. What I've done is down size it to 5 stars.. (Easier to fit)
and Images work great.
You can test it on my test site.
I'll wrap it up for you if you want it?
Test Site: http://www.eastpasco.com running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: http://freeaspcode.net/snitz/ |
|
|
redbrad0
Advanced Member
USA
3725 Posts |
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 07 November 2001 : 13:22:37
|
10 Stars would be hard to get in there. The 5 stars are popular.. Used in Snitz for rank and Also some run the Members Rank mod...
Test Site: http://www.eastpasco.com running on Huw's Code 3.3.10 SQL 2000 Need a Snitz MOD? Click Here: http://freeaspcode.net/snitz/ |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 13:23:43
|
Sure if you want.
Might be worth having an either or (stars or numbers).
Thanks for the help Rick..
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
Topic |
|