Author |
Topic |
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 08:11:07
|
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. |
|
|
suhern
Junior Member
186 Posts |
Posted - 07 November 2001 : 08:20:14
|
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.
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 08:40:20
|
What happens if you are logged in?
Cheers Az
------- Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
suhern
Junior Member
186 Posts |
Posted - 07 November 2001 : 08:50:49
|
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 |
|
|
rick7165
Senior Member
USA
1094 Posts |
|
rick7165
Senior Member
USA
1094 Posts |
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 09:16:20
|
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. |
|
|
rick7165
Senior Member
USA
1094 Posts |
|
suhern
Junior Member
186 Posts |
Posted - 07 November 2001 : 10:10:32
|
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
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 10:23:10
|
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. |
|
|
suhern
Junior Member
186 Posts |
Posted - 07 November 2001 : 10:27:25
|
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.
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 07 November 2001 : 10:59:44
|
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. |
|
|
rick7165
Senior Member
USA
1094 Posts |
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 07 November 2001 : 12:30:04
|
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/ |
|
|
rick7165
Senior Member
USA
1094 Posts |
|
Topic |
|