Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Links Manager MOD Error
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

richfed
Average Member

United States
999 Posts

Posted - 27 June 2010 :  08:35:22  Show Profile  Visit richfed's Homepage
I have had this MOD installed on my forum for several years. No problems.

I just added a new link to the forum, and when I click on "Rate this Link," I get the following error:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'strPostDate'

/messageboard/pop_links.asp, line 188


None of the previously added links gives this error. I am wondering WHY? I am using Snitz 3.4.05 - Any guidance appreciated!

Rich
[size=1]A Complete Idiot's Guide to MOD Implementation || On the Trail of the Last of the Mohicans[/size=1]

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 28 June 2010 :  04:38:40  Show Profile
Can you provide a link to a *.txt copy of that file and a direct link to the link that's causing the problem (with test account details if necessary)?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Classicmotorcycling
Development Team Leader

Australia
2085 Posts

Posted - 28 June 2010 :  05:35:11  Show Profile
This is the code that I am using that I know works for the rating:
<%
'#################################################################################
'## Copyright (C) 2000  Michael Anderson
'## 
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to 
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'## 
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'## GNU General Public License for more details.
'## 
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
'## 
'## Support can be obtained from support forums at:
'## http://forum.snitz.com 
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'## 
'## or
'## 
'## Snitz Communications 
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
'## MOD: Links Manager v3.0 Beta 1 for Snitz Forums v3.4
'## Copyright (c)2002, 2003 OneWayMule
'## File: pop_links.asp
'##
'## Get the latest version of this MOD at
'## http://www.onewaymule.org/onewayscripts/
'#################################################################################
%>
<!-- #include file="inc_sha256.asp"-->
<!-- #include file="config.asp" -->
<!-- #include file="inc_func_secure.asp" -->
<!-- #include file="inc_func_links.asp" -->
<!-- #include file="inc_header_short.asp" -->
<%
If Request.QueryString("id") = "" or IsNumeric(Request.QueryString("id")) = False Then
  Response.Write  "<center><br /><br />Error: No ID.<br /><br /></center>" & vbNewLine & _
  WriteFooterShort
  Response.End
End If
strAction = Request.Querystring("action")
intLinkID = CInt(Request.Querystring("id"))
SELECT CASE strAction

'#####################################################################################################
'###  DELETE COMMENT/RATING ###
'##############################
CASE "deletecomment"
  Err_Str = ""
  If mLev < 4 Then
    strsql = "SELECT RATE_BY FROM " & strTablePrefix & "LINKS_RATING WHERE RATING_ID=" & intLinkID
    Set rs = my_conn.Execute(strsql)
    If getMemberID(strDBNTUsername) = rs("RATE_BY") Then
      strCAuthor = "your"
    Else
      Err_Str = "<li>You are not allowed to delete this comment</li>"
    End If
    rs.Close
    Set rs = nothing
  Else
    strCAuthor = "this"
  End If
  If Err_Str <> "" Then
    Response.Write  "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHoverFontColor & """>" & vbNewLine & _
                    "<font size=""" & strHeaderFontSize & """>There Was A Problem.</font></p>" & vbNewLine & _
                    "<center><ul>" & ErrString & "</ul></center>" & vbNewLine
  Else
    If Request.QueryString("do") = "yes" Then
      strsql = "DELETE FROM " & strTablePrefix & "LINKS_RATING WHERE RATING_ID=" & intLinkID
      my_conn.execute(strsql),,adCmdText + adExecuteNoRecords
      Response.Write  "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHoverFontColor & """>" & vbNewLine & _
                      "Comment deleted.</font></p>" & vbNewLine
    Else
      Response.Write  "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
                      "Are you sure you want to delete " & strCAuthor & " comment?<br />" & vbNewLine & _
                      "<a href=""pop_links.asp?action=deletecomment&id=" & intLinkID & "&do=yes"">Yes</a></font></p>" & vbNewLine
    End If
  End If
                    
'#####################################################################################################
'###  REPORT BAD LINK  ###
'#########################
CASE "badlink"
  If Request.QueryString("do") = "yes" Then
    strsql = "UPDATE " & strTablePrefix & "LINKS SET BADLINK=1 WHERE LINK_ID=" & intLinkID
    my_conn.execute(strsql),,adCmdText + adExecuteNoRecords
    strsql = "SELECT NAME FROM " & strTablePrefix & "LINKS WHERE LINK_ID=" & intLinkID
    Set rs = my_conn.execute(strsql)
    strLinkName = rs("NAME")
    rs.Close
    Set rs = Nothing
    Response.write "  <center><br /><br />Thank you for reporting the bad link for: <br><br>" & vbNewLine & _
                   "  <b>" & strLinkName & "</b><br /><br />" & vbNewLine & _
                   " We will correct the problem as soon as possible</center>" & vbNewLine 
  Else
    Response.write "<center><br /><br />Are you sure you want to report this link?<br><br>" & vbNewLine & _
                   "<a href=""pop_links.asp?action=badlink&id=" & intLinkID & "&do=yes"">Yes</a></center>" & vbNewLine 
  End If
'#####################################################################################################
'###  RATE LINK  ###
'###################
CASE "rate"
  If strDBNTUsername <> "" Then
    strsql = "SELECT MEMBER_ID FROM " & strTablePrefix & "MEMBERS WHERE M_NAME='" & strDBNTUsername & "'"
    Set rsmid = my_conn.execute(strsql)
    strUserMemberID = rsmid("MEMBER_ID")   
    rsmid.Close
    Set rsmid = Nothing
  Else
    strUserMemberID = -1
  End If
  If Request.Querystring("do") = "yes" Then
    intFormRating = CInt(Request.Form("rating"))
    If strLMRating = "0" Then
      intFormRating = intFormRating * 2
    End If
    strComments = ChkString(request.form("comments"), "message")
    strError = ""
    If strUserMemberID = -1 Then
      strError = "<li>Only Members can rate links.</li>"
      strError = strError & "<li>If you are already a member, then log in to rate this link.</li>"
    Else
      strsql = "SELECT RATE_BY FROM " & strTablePrefix & "LINKS_RATING WHERE LINK=" & intLinkID & " AND RATE_BY=" & strUserMemberID
      Set rsCheck = my_conn.execute(strsql)
      If NOT rsCheck.EOF Then
        strError = "<li>You have already rated on this link.  You cannot vote again.</li>"
      end if
      rsCheck.Close
      Set rsCheck = Nothing
    End If
    If intFormRating = "" Then
      strError = "<li>You didn't select a rating.</li>"
    End If
    If strError <> "" Then
      Response.Write  "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>There Was A Problem.</font></p>" & vbNewLine & _
	              "<table align=""center"" border=""0"">" & vbNewLine & _
                      "  <tr>" & vbNewLine & _
 	              "    <td align=""center"">" & vbNewLine & _
 	              "      <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
                      "      " & strError & "</font>" & vbNewLine & _
                      "    </td>" & vbNewLine & _
                      "  </tr>" & vbNewLine & _
                      "</table>" & vbNewLine & _
                      "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
                      "<a href=""JavaScript:history.go(-1)"">Go Back To Rate</a></font></p></center>" & vbNewLine
    Else
      strSQL = "SELECT VOTES, RATING FROM " & strTablePrefix & "LINKS WHERE LINK_ID = " & intLinkID
      Set rsLinkRating = my_conn.execute(strsql)
      intVotes = rsLinkRating("VOTES") + 1
      intRating = rsLinkRating("RATING") + intFormRating
      rsLinkRating.Close
      Set rsLinkRating = Nothing
      strsql = "UPDATE " & strTablePrefix & "LINKS SET VOTES = " & intVotes & " , RATING = " & intRating & " Where LINK_ID = " & intLinkID
      my_Conn.execute(strsql),,adCmdText + adExecuteNoRecords
      strSQL = "INSERT INTO " & strTablePrefix & "LINKS_RATING (LINK, RATING, COMMENTS, RATE_BY, RATE_DATE ) VALUES ( " & intLinkID & " , " & intRating & " , '" & strComments & "', " & strUserMemberID & " , '" & DateToStr(strForumTimeAdjust) & "' )"
      my_Conn.execute(strSQL),,adCmdText + adExecuteNoRecords
      Response.Write "Thank You for rating this link."
    End if
  Else
    intLinkID = Request.QueryString("id")
    strsql = "SELECT LINK_ID, NAME, POST_DATE, SHOW, RATING, VOTES, LAST_UPDATE FROM " & strTablePrefix & "LINKS WHERE LINK_ID = " & intLinkID
    Set rsLink = my_conn.execute(strsql)
    If rsLink.EOF Then
      Response.Write  "<center>Link does not exist.</center>"
    Else
      strLinkName = rsLink("NAME")
      strPostDate = ChkDate(rsLink("POST_DATE")," ", true)
      strLastUpdate = ChkDate(rsLink("LAST_UPDATE")," ",true)
      If strLastUpdate > strPostDate Then
        dateSince = DateDiff("d", Date(), strLastUpdate)+7
      Else
        dateSince=DateDiff("d", Date(), strPostDate)+7
      End If
      Response.Write  "  <form method=""post"" action=""pop_links.asp?action=rate&id=" & intLinkID & "&do=yes"">" & vbNewLine & _
                      "    <table border=""0"" width=""360"" cellspacing=""0"" cellpadding=""0"" align=""left"">" & vbNewLine & _
                      "      <tr>" & vbNewLine & _
                      "        <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
                      "          <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
                      "            <tr>" & vbNewLine & _
                      "              <td bgcolor=""" & strCategoryCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Rate Link</b></font></td>" & vbNewLine & _
                      "            </tr>" & vbNewLine & _
                      "            <tr>" & vbNewLine & _
                      "              <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
                      "                <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
                      "                <li>Rating Scale: <font color=""red"">1</font> = worst, "
      If strLMRating = "0" Then
        Response.Write  "                <font color=""green"">5</font> = best</li>" & vbNewLine
      Else
        Response.Write  "                <font color=""green"">10</font> = best</li>" & vbNewLine
      End If        
      Response.Write  "                <li>Please try to be objective.</li>" & vbNewLine & _
                      "                <li>Only registered members can rate links.</li>" & vbNewLine & _
                      "                <li>You can only rate a link once.</li>" & vbNewLine & _
                      "                <li>Feel free to add a comment about this site</li>" & vbNewLine & _
                      "                </font>" & vbNewLine & _
                      "              </td>" & vbNewLine & _
                      "            </tr>" & vbNewLine & _
                      "            <tr>" & vbNewLine & _
                      "              <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
                      "                <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
                      "                <b><a href=""links.asp?action=goto&id=" & intLinkID & """ target=""_blank"">" & strLinkName & "</a></b>" & vbNewLine & _
                      "                <br /><font size=""" & strFooterFontSize & """>(Added : " & strPostDate & " | Last Update: " & strLastUpdate & ")</font></font><br />" & vbNewLine & _
                      "              </td>" & vbNewLine & _
                      "            </tr>" & vbNewLine & _
                      "            <tr>" & vbNewLine & _
                      "              <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
                      "                <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
                      "                <b>Rating:</b> " & vbNewline & _
                      "                <select name=""rating"">" & vbNewLine & _
                      "                  <option value="""">-</option>" & vbNewLine & _
                      "                  <option value=""1"">1</option>" & vbNewLine & _
                      "                  <option value=""2"">2</option>" & vbNewLine & _
                      "                  <option value=""3"">3</option>" & vbNewLine & _
                      "                  <option value=""4"">4</option>" & vbNewLine & _
                      "                  <option value=""5"">5</option>" & vbNewLine
      If strLMRating = "1" Then
      Response.Write  "                  <option value=""6"">6</option>" & vbNewLine & _
                      "                  <option value=""7"">7</option>" & vbNewLine & _
                      "                  <option value=""8"">8</option>" & vbNewLine & _
                      "                  <option value=""9"">9</option>" & vbNewLine & _
                      "                  <option value=""10"">10</option>" & vbNewLine
      End If
      Response.Write  "                </select>" & vbNewLine & _
                      "                </font>" & vbNewLine & _
                      "              </td>" & vbNewLine & _
                      "            </tr>" & vbNewLine & _
                      "            <tr>" & vbNewLine & _
                      "              <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
                      "                <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
                      "                <b>Comments:</b> <br />" & vbNewLine & _
                      "                <textarea rows=""8"" cols=""35"" name=""comments""></textarea>" & vbNewLine & _
                      "                </font>" & vbNewLine & _
                      "              </td>" & vbNewLine & _
                      "            </tr>" & vbNewLine & _
                      "            <tr>" & vbNewLine & _
                      "              <td align=""center"" bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
                      "                <input type=""submit"" value="" Submit "">  <input type=""reset"" value="" Clear ""></td>" & vbNewLine & _
                      "            </tr>" & vbNewLine & _
                      "          </table>" & vbNewLine & _
                      "        </td>" & vbNewLine & _
                      "      </tr>" & vbNewLine & _
                      "    </table>" & vbNewLine & _
                      "    <input type=""hidden"" name=""id"" value=""" & intLinkID & """>" & vbNewLine & _
                      "  </form>" & vbNewLine 
      rsLink.Close
      Set rsLink = Nothing
    end if
  end if
End Select
WriteFooterShort
Response.End
%>

Cheers,

David Greening
Go to Top of Page

richfed
Average Member

United States
999 Posts

Posted - 28 June 2010 :  07:17:12  Show Profile  Visit richfed's Homepage
Thanks, guys. Link to pop_links: pop_links.txt

URL of link in question: Well, hold on! I just went to copy the link address and, lo and behold, it worked! I tried and tried yesterday - nada! Error every time!

I wonder, is there some sort of timer on a newly created link whereby it cannot be rated before a set time?

Anyway, working now. I didn't do a thing!
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.55 seconds. Powered By: Snitz Forums 2000 Version 3.4.07