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 - 08 November 2001 :  12:30:45  Show Profile  Visit Azaniah's Homepage
OK,

This is not the most elegant fix - (maybe someone can suggest a better one)

But for those of you using version 3.1 your topic.asp should look like this


<% ' ################# TOPIC RATING MOD ###################### ' %>
<% '## Forum_SQL - Find Topic Author
strSql = "SELECT " & strTablePrefix & "TOPICS.T_AUTHOR "
strSql = strSql & " FROM " & strTablePrefix & "TOPICS "
strSql = strSql & " WHERE " & strTablePrefix & "TOPICS.TOPIC_ID = " & Request.QueryString("TOPIC_ID")

set rsRating = my_Conn.Execute (StrSql) %>

<% if strDBNTUserName <> "" Then %>
<% if ( getMemberID(strDBNTUserName) = rsRating("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), rs("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 %>
<% rsRating.Close
set rsRating = nothing %>

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


I "think" that should cover everything. I don't like the idea of another connection "just" for that.

Cheers Az

(hope it works)

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

Edited by - azaniah on 08 November 2001 13:08:33
Go to Top of Page

extrafree
New Member

54 Posts

Posted - 08 November 2001 :  12:41:34  Show Profile  Visit extrafree's Homepage
on your code I modified rsTopic whith rs.
now i made this:
ADODB.Recordset error '800a0cc1'

Item cannot be found in the collection corresponding to the requested name or ordinal.

/testforum/inc_functions.asp, line 39


but now in inc_function.asp





Edited by - extrafree on 08 November 2001 12:43:08
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 08 November 2001 :  12:43:49  Show Profile  Visit Azaniah's Homepage
You will need to do the change posted above.

That change does not include the moderation check. But it should fix the 3.1 problem.

Thanks Az

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

Raichelle
Junior Member

370 Posts

Posted - 08 November 2001 :  13:04:42  Show Profile
i just used the fix you posted but now am getting this

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'rsTopic'

/forum/topic111.asp, line 475




Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 08 November 2001 :  13:07:12  Show Profile  Visit Azaniah's Homepage
argghhhh

Sorry my Bad - still need to change the rsTopics to rs

The important thing to add really is the rsRating (so that it can see the T_AUTHOR).

I'll ge back and change the above code too.

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 - 08 November 2001 :  13:11:13  Show Profile  Visit rick7165's Homepage
Azaniah.. I see what I forgot :(

If this works need to wrap it up and setup for download alot of people still use 3.1



Test Site:
EastPasco running on Huw's Code 3.3.10 SQL 2000
Need a Snitz MOD? Click Here: Snitz Mod Resource
Go to Top of Page

extrafree
New Member

54 Posts

Posted - 08 November 2001 :  13:20:51  Show Profile  Visit extrafree's Homepage
AS FAR AS I'M CONCERNED YOU ARE GREATTTTT, YOU ARE FANTASTIC,
IT WORKS PERFECTLY!!!!!
THANK YOU VERY VERY MUCH! I DON'T ANY WORDS TO THANK YOU!!!


ps: just one thing, you forgot to close the table </table>

Edited by - extrafree on 08 November 2001 13:22:46
Go to Top of Page

suhern
Junior Member

186 Posts

Posted - 08 November 2001 :  13:48:41  Show Profile
quote:

Azaniah,

Using your concept for topic.asp I had a go at implementing it in forum.asp such that if rating is turned off for the forum the rate column will not be shown at forum.asp.

I had a slightly different system of showing the stars therefore my forum.asp will not be relevant here. You may want to take a look and if you choose to you may want to update your forum.asp

see here

Anyway thanks for the great work to make forum selection possible for rating.





This modified mod is now available at the link above.

Go to Top of Page

extrafree
New Member

54 Posts

Posted - 08 November 2001 :  14:22:57  Show Profile  Visit extrafree's Homepage
it work fine everyway but if I open a topic close it made this error:


error '80020009'
Exception occurred.

/testforum/inc_functions.asp, line 36

my line 36:
strSQL = strSQL & "TOPIC_RATINGS Where RATINGS_BYMEMBER_ID =" & iTopicRatingID & " AND RATINGS_TOPIC_ID =" & iTopicRatedID







Edited by - extrafree on 08 November 2001 14:25:17
Go to Top of Page

Raichelle
Junior Member

370 Posts

Posted - 08 November 2001 :  18:33:00  Show Profile
still no fix yet?

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 09 November 2001 :  01:32:35  Show Profile  Visit dayve's Homepage
is this code based on big9erfan's Member Rating Mod? code seems quite similar...

anyone have a link with this working on 3.1SR4?

Dayve
Go to Top of Page

extrafree
New Member

54 Posts

Posted - 09 November 2001 :  03:29:36  Show Profile  Visit extrafree's Homepage
quote:
anyone have a link with this working on 3.1SR4?



http://www.extrafree.it/testforum

it works fine everyway but if I open a topic locked it made one error

(sorry for my English)



Edited by - extrafree on 09 November 2001 04:15:56

Edited by - extrafree on 09 November 2001 04:21:02
Go to Top of Page

Azaniah
Senior Member

United Kingdom
1004 Posts

Posted - 09 November 2001 :  04:45:13  Show Profile  Visit Azaniah's Homepage
Dayve,

Yep - It's pretty much big9er's code - just moved about a bit.

Seemed to do everything you needed for a topic rating just needed to point it to different fields.

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 - 09 November 2001 :  04:47:55  Show Profile  Visit Azaniah's Homepage
Extrafree,

I'm a little bit confused.

The "only" error you get is when you open a locked topic? is that correct?

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 - 09 November 2001 :  04:48:43  Show Profile  Visit Azaniah's Homepage
Raichelle,

I'm a bit lost as to what the error you are having is.

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