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 :  08:11:07  Show Profile  Visit Azaniah's Homepage
Within the inc_functions.asp, you have lot's of functions defined.

The chances of my line 881 being the same as your as slim. If you can post the function it is calling can mark which line is 881 I might be able to help.

Cheers Az

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

suhern
Junior Member

186 Posts

Posted - 07 November 2001 :  08:20:14  Show Profile
quote:

Hi,

I added the mod according to the readme and updated my access 200 database but when i go into the topic.asp, I get the following error:

ADODB.Field error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/home/inc_functions.asp, line 881


Please help






The above error only happen in a 'logout' state - that if I did not login at all.

Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  08:40:20  Show Profile  Visit Azaniah's Homepage
What happens if you are logged in?

Cheers Az

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

suhern
Junior Member

186 Posts

Posted - 07 November 2001 :  08:50:49  Show Profile
I think I found a bug. I change the topic.asp code to the following and it works perfectly (I think):

<% ' ################# TOPIC RATING MOD ###################### ' %>
<% if strDBNTUserName <> "" Then %>
<% if ( getMemberID(strDBNTUserName) = rsTopic("T_AUTHOR") ) then %>


<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgColor="<% =strPageBGColor %>" align=left <%= strColspan %>>
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small>You Cannot Rate your own Topic: </small></font>
</td>
</tr>
<table>

<% Else %>


<% iTopicRating = GetTopicRating( getMemberID(strDBNTUserName), rsTopic("TOPIC_ID") )
if iTopicRating <> -1 Then %>
<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">
<tr>
<td bgColor="<% =strPageBGColor %>" align=left <%= strColspan %>>
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small>You Rated this Topic: <%=iTopicRating %></small></font>
</td>
</tr>
<table>
<% else %>

<form action="pop_topic_rating.asp?mode=goRate&id=<%=rsTopic("TOPIC_ID")%>" method="Post" id=Form1 name=Form1>
<SELECT NAME="rating">
<OPTION value=''>Rate Topic
<OPTION value='10'>10: Highest Rating
<OPTION value='9'>9
<OPTION value='8'>8
<OPTION value='7'>7
<OPTION value='6'>6
<OPTION value='5'>5
<OPTION value='4'>4
<OPTION value='3'>3
<OPTION value='2'>2
<OPTION value='1'>1: Lowest Rating
</SELECT> <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Rate">
</form>
<%end if%>
<% end if%>

<% end if %>





<% ' ################# END TOPIC RATING MOD ###################### '%>



Edited by - suhern on 07 November 2001 10:08:40
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 07 November 2001 :  09:05:12  Show Profile  Visit rick7165's Homepage
You mean topic.asp

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 :  09:11:18  Show Profile  Visit rick7165's Homepage
You forgot the red also:

<% ' ################# 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

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  09:16:20  Show Profile  Visit Azaniah's Homepage
Yeah,

Maybe I'm missing something - but apart from changing the order of the if's I can't see what this is changing.

Has to be said, Suhern's is neater ..

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 :  09:54:51  Show Profile  Visit rick7165's Homepage
I'm trying to get stars to work with this instead of a %

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

suhern
Junior Member

186 Posts

Posted - 07 November 2001 :  10:10:32  Show Profile
quote:

Yeah,

Maybe I'm missing something - but apart from changing the order of the if's I can't see what this is changing.

Has to be said, Suhern's is neater ..

Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.



Without this, at the logout state u get a eof error - at least in my case...Cheers

Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  10:23:10  Show Profile  Visit Azaniah's Homepage
Some other mod I have must be preventing me from getting that EOF error.

In anycase I will change the file so that your method is used.

Apart from that (and the awful layout) - any use?

Thanks Az

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

suhern
Junior Member

186 Posts

Posted - 07 November 2001 :  10:27:25  Show Profile
quote:

Some other mod I have must be preventing me from getting that EOF error.

In anycase I will change the file so that your method is used.

Apart from that (and the awful layout) - any use?

Thanks Az

-------
Eagles fly!, but weasels don't get sucked into jet engines.



I think it is a great mod. The layout is fine with me. But some people may prefer to see stars as opposed to %. Gread work and thanks.

Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 07 November 2001 :  10:59:44  Show Profile  Visit Azaniah's Homepage
Rick,

If you want to get stars to work then you will need to add the following function.



function GetTopicRatingPicture( iRating )

select case( iRating )
case 0
strRatingPict = ""
case 1
strRatingPict = "topic_ratings_1.gif"
case 2
strRatingPict = "topic_ratings_2.gif"
case 3
strRatingPict = "topic_ratings_3.gif"
case 4
strRatingPict = "topic_ratings_4.gif"
case 5
strRatingPict = "topic_ratings_5.gif"
case 6
strRatingPict = "topic_ratings_5.gif"
case 7
strRatingPict = "topic_ratings_5.gif"
case 8
strRatingPict = "topic_ratings_5.gif"
case 9
strRatingPict = "topic_ratings_5.gif"
case 10
strRatingPict = "topic_ratings_5.gif"
end select

GetTopicRatingPicture = strRatingPict

end function


Then in the GetTopicRatingAvg function..
Replace

iTopicRating = FormatPercent( rsTopicRating("TOPIC_RATING_TOTAL") / (rsTopicRating("TOPIC_RATING_TOTAL_COUNT")*10) )

with

iTopicRating = cint(rsTopicRating("TOPIC_RATING_TOTAL") / rsTopicRating("TOPIC_RATING_TOTAL_COUNT") )

That should give you 1,2,3, etc.

Finally - where you access the rating.

For example in Topic.asp

<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small>You Rated this Topic: <img src="<%=strImageUrl %><%=GetTopicRatingPicture( iTopicRating )%>"><%=iTopicRating %></small></font>

Replace green text with red.

The ONLY problem here is this will require 10 different rating pictures. (ie half stars) - which I don't have.

But if you do have any let me know it is always useful to have them.

Thanks 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:29:14  Show Profile  Visit rick7165's Homepage
Missing something for the Forum.asp

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:30:04  Show Profile  Visit rick7165's Homepage
Get this in when viewing the forums

Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "Not Rated"]'

/inc_functions.asp, line 2695


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:33:15  Show Profile  Visit rick7165's Homepage
BTW.. I converted it to 5 stars.

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
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.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07