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 Add-On Forum (W/Code)
 Topic Rating Version 0.90 (updated)
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 11

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  12:35:02  Show Profile  Visit Azaniah's Homepage
Is this is since "you went stars?"

Cheers Az



-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  12:39:58  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  12:48:33  Show Profile  Visit rick7165's Homepage
Not working

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/
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  12:56:06  Show Profile  Visit rick7165's Homepage
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/
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  12:59:58  Show Profile  Visit rick7165's Homepage
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/
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  13:03:02  Show Profile  Visit rick7165's Homepage
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/
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  13:06:15  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  13:07:48  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  13:12:23  Show Profile  Visit rick7165's Homepage
Ok.. All fixed and working :)



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/
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  13:13:08  Show Profile  Visit Azaniah's Homepage
*Cheers*

Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 07 November 2001 :  13:20:25  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
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

Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  13:20:33  Show Profile  Visit rick7165's Homepage
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/
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 07 November 2001 :  13:21:01  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
oh by the way, remember to add your mod at http://www.freeaspcode.net/snitz

Brad
Web Hosting with SQL Server @ $24.95 per month
Snitz Mod Archive

Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  13:22:37  Show Profile  Visit rick7165's Homepage
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/
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  13:23:43  Show Profile  Visit Azaniah's Homepage
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.
Go to Top of Page
Page: of 11 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07