| Author |  Topic  | 
              
                | extrafreeNew Member
 
  
 
                54 Posts |  | 
              
                | AzaniahSenior Member
 
     
 
                United Kingdom1004 Posts
 | 
                    
                      |  Posted - 13 November 2001 :  08:31:25     
 |  
                      | ok good  
 Now I can finish the mod for version 3.3
 
 Cheers Az
 
 -------
 Eagles fly!, but weasels don't get sucked into jet engines.
 |  
                      |  |  | 
              
                | extrafreeNew Member
 
  
 
                54 Posts | 
                    
                      |  Posted - 13 November 2001 :  11:24:27     
 |  
                      | an other small question!!! 
 I'd like to show the Form to rating in an other window as in your mode! like rati1.asp
 
 I had replace the old code with your new,now I can see all as in your new version, but the only thing that I can do is open the pop up whit the form with the corrisponding code.
 
 exemple: this is the form in to Topic.asp
 
 <form action="pop_topic_rating.asp?mode=goRate&id=<%=Request.QueryString("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 this is your code to open a pop up window :
 
 <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><i><a href="JavaScript:openWindow('rate1.asp?id=<%=rsTopic("TOPIC_ID")%>')">Rate This Topic   </a></i></font>
 
 but this not work in 3.1 some any idea???
 
 the italian golden forum
 
 
 Edited by - extrafree on 13 November 2001  11:26:37
 |  
                      |  |  | 
              
                | suhernJunior Member
 
   
 
                186 Posts | 
                    
                      |  Posted - 13 November 2001 :  11:29:44   
 |  
                      | quote:
 an other small question!!!
 
 I'd like to show the Form to rating in an other window as in your mode! like rati1.asp
 
 I add replace the old code with your new,now I can see all as in your new version bat the only thing that I can do is open the pop up whit the form whit the corrisponding code.
 
 exemple: this is the form in to Topic.asp
 
 <form action="pop_topic_rating.asp?mode=goRate&id=<%=Request.QueryString("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 this is your code to open a pop up window :
 
 <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><i><a href="JavaScript:openWindow('rate1.asp?id=<%=rsTopic("TOPIC_ID")%>')">Rate This Topic   </a></i></font>
 
 but this not work in 3.1 some any idea???
 
 the italian golden forum
 
 
 
 
 The popup rate1.asp was a version that I developed on my site. It will only work with an altered pop_topic_rating.asp which is found in my original download.
 
 I afraid you may have Azaniah verison kind of mix-up with mine.
 
 Try to use the other pop that comes with rate1.asp, it may work. If not please post more detail regarding error. cheers
 
 
 |  
                      |  |  | 
              
                | extrafreeNew Member
 
  
 
                54 Posts | 
                    
                      |  Posted - 13 November 2001 :  11:57:47     
 |  
                      | well ,if I insert this: <form action="pop_topic_rating.asp?mode=goRate&id=<%=Request.QueryString("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>
 
 it work good becouse it go directly to pop_topic_rating.asp ,
 but if I try to insert the code to show this form on the pop up window
 as this script :
 
 <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><i><a href="JavaScript:openWindow('rate1.asp?id=<%=rs("TOPIC_ID")%>')">Rate This Topic   </a></i></font>
 
 it gave me error as reccord as been deleted!
 
 so I tryed to add this on it <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><i><a href="JavaScript:openWindow('rate1.asp?id=<%=Request.QueryString("TOPIC_ID")%>')">Rate This Topic   </a></i></font>
 
 after this modified dont' gave me error and it open your pop up,but after voted it gave me error!
 
 this is the code in rate1.asp
 
 <form action="pop_topic_rating.asp?mode=goRate&id=<%=Request.QueryString("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>
 
 It look like my code in topic.asp.
 in topic.asp this code work in an external window not!
 
 thanks
 
 
 
 the italian golden forum
 
 |  
                      |  |  | 
              
                | suhernJunior Member
 
   
 
                186 Posts | 
                    
                      |  Posted - 13 November 2001 :  12:15:30   
 |  
                      | extrafree, 
 This is my rate1.asp (only 5 values)
 
 <form action="pop_topic_rating.asp?mode=goRate&id=<%=Request.QueryString("id") %>" method="Post" id=Form1 name=Form1>
 <SELECT NAME="rating">
 <OPTION value=''>Rate Topic
 <OPTION value='5'>5: Best Rating
 <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>
 
 ]This is pop_topic_rating
 
 
 <!--#INCLUDE FILE="inc_functions.asp" -->
 <% if not(strUseExtendedProfile) then %>
 <!--#INCLUDE FILE="inc_top_short.asp" -->
 <% else %>
 <!--#INCLUDE FILE="inc_top_short.asp" -->
 <% end if %>
 
 <% '################### Topic Rating Mod #####################' %>
 <%
 if Request.QueryString("mode") = "goRate" then
 'update the topic rating here
 iTopicRating = Request.Form("rating")
 if iTopicRating = "" or iTopicRating = " " then
 strErr = "You did not select a proper rating<br>"
 else
 iTopicRatingMemberID = getMemberID( strDBNTUserName )
 iTopicRated = Request.QueryString("id")
 iReturnTopicRating = RateTopic( iTopicRating, iTopicRatingMemberID, iTopicRated )
 if iReturnTopicRating <> -1 Then
 strErr = ""
 else
 strErr = "There is something wrong with the information provided.  Please go back and check it."
 end if
 end if %>
 
 <%if strErr = "" Then %>
 
 <head>
 
 
 </head>
 
 <p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Rating Submitted.</font></p>
 
 <p align="center"><font size="<% =strDefaultFontSize %>"><a href="JavaScript:onClick= window.close()"><font color="#800080">Close Window</font></A></font></p>
 <%
 else
 %>
 <p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There Was A Problem With Your Rating</font></p>
 
 <table align=center>
 <tr>
 <td align=center><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><center>
 <ul>
 <% =strErr %>
 </ul></center></font>
 </td>
 </tr>
 </table>
 
 <p align=center><font size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Go Back And Fix The Rating</a></font></p>
 <p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Forum</a></font></p>
 <% end if %>
 <% end if %>
 <% '################### End Member Rating Mod #####################' %>
 
 
 <%
 my_Conn.Close
 set my_Conn = nothing
 %>
 
 This is in topic.asp
 
 <td  align="center"  bgcolor="<% =strHeadCellColor %>" width="<% =strTopicWidthRight %>" <% if lcase(strTopicNoWrapRight) = "1" then Response.Write(" nowrap") %>><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
 <% ' ################# TOPIC RATING MOD ###################### ' %>
 
 <% if intRatingAuth = 1 then %>
 <% if request("ARCHIVE") <> "true" then %>
 <% TopicRatingAvg = GetTopicRatingAvg( rstopic("TOPIC_ID") ) %>
 <% if TopicRatingAvg  <> "Not Rated" then %>Topic Rated <img src="<%= TopicRatingAvg %>stars.gif">  <% else %> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strForumFontColor %>">Not Rated</font>  <% end if %>
 
 
 <% if strDBNTUserName <> "" Then %>
 <% if ( getMemberID(strDBNTUserName) <> rsTopic("T_AUTHOR") ) then %>
 
 
 <%	iTopicRating = GetTopicRating( getMemberID(strDBNTUserName), rsTopic("TOPIC_ID") )
 if iTopicRating <> -1 Then %>
 
 <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><i>    You Rated this Topic </i></small></font> <img src="<%= iTopicRating %>stars.gif">
 
 
 
 
 
 
 <% else %>
 <% Dim ratei, ratet
 ratei = "1"
 ratet = rsTopic("TOPIC_ID")
 
 %>
 
 <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><i>      <a href="JavaScript:openWindow('rate1.asp?id=<%=rsTopic("TOPIC_ID")%>')">Rate This Topic</a></i>  </font>
 
 
 
 
 <%end if%>
 <% end if%>
 
 <% end if %>
 
 <% end if %>
 
 <% end if %>
 
 
 <% ' ################# END TOPIC RATING MOD ###################### ' %>
 
 
 Finally just before include of inc_jump in topic.asp I have this:
 
 <% if ratei = "1" then %>
 
 <font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><b><i><a href="JavaScript:openWindow('rate1.asp?id=<%=ratet %>')">Rate This Topic</a></i></b></font>
 
 <% end if %>
 
 <!--#INCLUDE FILE="inc_jump_to.asp" -->
 
 
 
 
 |  
                      |  |  | 
              
                | extrafreeNew Member
 
  
 
                54 Posts | 
                    
                      |  Posted - 13 November 2001 :  14:21:46     
 |  
                      | <% ' ################# TOPIC RATING MOD ###################### ' %><% '## Forum_SQL - Find Topic AuthorstrSql = "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)TopicAuthor = rsRating("T_AUTHOR") %><% if strDBNTUserName = " " or strDBNTUserName = "" Then %>	<% ' do nothing %>		<% else %>	<% if ( getMemberID(strDBNTUserName) = TopicAuthor  ) 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), Request.QueryString("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=<%=Request.QueryString("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.Closeset rsRating = nothing %><% ' ################# END TOPIC RATING MOD ###################### ' %> 
 
 I have this code in my topic.asp
 the input box is show in this file
 and I want to put select box for rate topic in an pop up window
 
 my version of forum is 3.1 sr4
 
 this is the pop_topic_rating.asp
 
 <!--#INCLUDE FILE="config.asp" -->
 <!--#INCLUDE FILE="inc_functions.asp" -->
 <% if not(strUseExtendedProfile) then %>
 <!--#INCLUDE FILE="inc_top_short.asp" -->
 <% else %>
 <!--#INCLUDE FILE="inc_top_short.asp" -->
 <% end if %>
 
 <% '################### Topic Rating Mod #####################' %>
 <%
 if Request.QueryString("mode") = "goRate" then
 'update the topic rating here
 iTopicRating = Request.Form("rating")
 if iTopicRating = "" or iTopicRating = " " then
 strErr = "You did not select a proper rating<br>"
 else
 iTopicRatingMemberID = getMemberID( strDBNTUserName )
 iTopicRated = Request.QueryString("id")
 iReturnTopicRating = RateTopic( iTopicRating, iTopicRatingMemberID, iTopicRated )
 if iReturnTopicRating <> -1 Then
 strErr = ""
 else
 strErr = "There is something wrong with the information provided.  Please go back and check it."
 end if
 end if %>
 
 <%if strErr = "" Then %>
 
 <head>
 
 
 </head>
 
 <p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Rating Submitted.</font></p>
 
 <p align="center"><font size="<% =strDefaultFontSize %>"><a href="JavaScript:onClick= window.close()"><font color="#800080">Close Window</font></A></font></p>
 <%
 else
 %>
 <p align=center><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">There Was A Problem With Your Rating</font></p>
 
 <table align=center>
 <tr>
 <td align=center><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><center>
 <ul>
 <% =strErr %>
 </ul></center></font>
 </td>
 </tr>
 </table>
 
 <p align=center><font size="<% =strDefaultFontSize %>"><a href="JavaScript:history.go(-1)">Go Back And Fix The Rating</a></font></p>
 <p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% if InStr(1,Request.Form("refer"),"register.asp",1) > 0 then Response.Write("default.asp") else Response.Write(Request.Form("refer")) end if %>">Back To Forum</a></font></p>
 <% end if %>
 <% end if %>
 <% '################### End Member Rating Mod #####################' %>
 
 
 <%
 my_Conn.Close
 set my_Conn = nothing
 %>
 
 
 <script language="javascript1.2">
 self.opener.location.reload();
 </script>
 
 thanks
 
 the italian golden forum
 
 |  
                      |  |  | 
              
                | bjawnieStarting Member
 
 
 
                18 Posts | 
                    
                      |  Posted - 14 November 2001 :  16:32:50   
 |  
                      | Hii I've jsut updated snitz to v. 3.3 but I can't get the rating mod to
 work. In the topics page I get the error:
 
 Microsoft VBScript runtime fejl '800a000d'
 
 Type mismatch: 'rsTopic'
 
 topic.asp, linje 624
 
 I guess you don't know where that is. Let me point it out to ya'.
 
 
 <% '## Member Rating %>
 | Rating:
 <%
 TopicRatingAvg = GetTopicRatingAvg(rsTopic("TOPIC_ID"))
 if iReplyRating <> "0" Then %>
 <% if strUseExtendedProfile then %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>">
 <% else %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>')">
 <% end if %>
 <b><%=iReplyRating%></b> </a>(<%=GetMemberTotalRatingsCount( rsTopic("MEMBER_ID"))%>)
 <% else %>
 <% if strUseExtendedProfile then %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>">
 <% else %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>')">
 <% end if %>
 <b>Not Rated</b></a>
 <% end if %>
 
 <% '## Member Rating %>
 
 any help would be very much appreciated as I'm going out of my mind.
  
 By the way, this really looks like a kewl mod.
 
 oOºBjawnieºOo
 |  
                      |  |  | 
              
                | AzaniahSenior Member
 
     
 
                United Kingdom1004 Posts
 | 
                    
                      |  Posted - 14 November 2001 :  17:13:23     
 |  
                      | If your on Version 3.3 
 I would re-install the mod, using the code from Topic Rating V1.
 
 There is another topic here entitled that.
 
 Cheers Az
 
 -------
 Eagles fly!, but weasels don't get sucked into jet engines.
 |  
                      |  |  | 
              
                | bjawnieStarting Member
 
 
 
                18 Posts | 
                    
                      |  Posted - 14 November 2001 :  17:23:01   
 |  
                      | that is the mod i've used. 
 Just a thought could it be possible that a could have a look at
 a functional topic.asp and inc_functions.asp? If someone could mail me these files I really would be greatful
  . 
 oOºBjawnieºOo
 |  
                      |  |  | 
              
                | AzaniahSenior Member
 
     
 
                United Kingdom1004 Posts
 | 
                    
                      |  Posted - 14 November 2001 :  17:48:33     
 |  
                      | I don't have any code here at home (at least not for that)... 
 Let me have a look tomorrow.
 
 Cheers Az
 
 -------
 Eagles fly!, but weasels don't get sucked into jet engines.
 |  
                      |  |  | 
              
                | bjawnieStarting Member
 
 
 
                18 Posts | 
                    
                      |  Posted - 14 November 2001 :  17:51:30   
 |  
                      | ThanX 
 oOºBjawnieºOo
 |  
                      |  |  | 
              
                | AzaniahSenior Member
 
     
 
                United Kingdom1004 Posts
 | 
                    
                      |  Posted - 15 November 2001 :  06:41:34     
 |  
                      | Bjawnie, 
 The example topic.asp and inc_function.asp in the zip file for topic_rating_v1.zip are functional. However I wouldn't use them.
 
 If you can email me your topic.asp and inc_functions.asp I will have a look at them for you.
 
 azaniah@hotmail.com
 
 Cheers Az
 
 -------
 Eagles fly!, but weasels don't get sucked into jet engines.
 |  
                      |  |  | 
              
                | suhernJunior Member
 
   
 
                186 Posts | 
                    
                      |  Posted - 15 November 2001 :  09:06:59   
 |  
                      | try changing to: 
 <% TopicRatingAvg = GetTopicRatingAvg( rstopic("TOPIC_ID") ) %>
 
 
 
 |  
                      |  |  | 
              
                | AzaniahSenior Member
 
     
 
                United Kingdom1004 Posts
 | 
                    
                      |  Posted - 15 November 2001 :  11:39:09     
 |  
                      | ok I think I got you. 
 The Forum is moaning about the member rating mod, not topic rating.
 
 Although they use almost the same functions they are not linked.
 
 If you haven't "installed" the member rating mod, then I would remove all code marked "member rating".
 
 However, what is causing you the problem is this..
 
 
 iReplyRating = GetMemberRatingAvg( rsTopic("MEMBER_ID") )
 if iReplyRating <> "0" Then %>
 <% if strUseExtendedProfile then %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>">
 <% else %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>')">
 <% end if %>
 <b><%=iReplyRating%></b> </a>(<%=GetMemberTotalRatingsCount( rsTopic("MEMBER_ID"))%>)
 <% else %>
 <% if strUseExtendedProfile then %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>">
 <% else %>
 <font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><small><a href="JavaScript:openWindow3('pop_profile.asp?mode=display&id=<% =rsTopic("MEMBER_ID") %>')">
 <% end if %>
 <b>Not Rated</b></a>
 <% end if %>
 
 <% '## Member Rating %>
 
 
 You have different code the that marked in red above.
 
 Best bet is to remove anything that is marked member rating. Without the other functions and code it won't work, and as you have it the topic rating won't work either.
 
 I have amended the standard member rating to appear at the bottom of each topic/reply. So in "my" topic.asp you will see at least two sections for this code. One refers to rsTopics the other to rsReplies.
 
 Cheers Az
 
 
 -------
 Eagles fly!, but weasels don't get sucked into jet engines.
 |  
                      |  |  | 
              
                
                |  Topic  |  |