Author |
Topic |
eauxvives
Junior Member
Bhutan
145 Posts |
Posted - 24 February 2006 : 12:03:14
|
I have tried to install this, but it includes a file named inc_functions.asp which I don't have ? searching throught the forum i found that this was used for older versions of snitz, however this update is from 2005, so I'm confused i've replaced inc_functions.asp by inc_func_common.asp but i get this error
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'getmemberID'
/forum/bookmark.asp, line 162< |
Edited by - eauxvives on 24 February 2006 12:07:03 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 25 February 2006 : 23:24:17
|
For that function, you'll have to use this include ...
<!--#INCLUDE FILE="inc_func_secure.asp" -->
For example,
<!--#INCLUDE FILE="config.asp"--> <!--#INCLUDE FILE="inc_func_secure.asp" --> <!--#INCLUDE FILE="inc_sha256.asp"--> <!--#INCLUDE FILE="inc_header.asp" -->< |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 30 October 2009 : 02:48:38
|
Anyone still have a copy of this mod can upload it to snitzbitz and post the link for me? |
Support Snitz Forums
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 30 October 2009 : 04:16:53
|
I know it was incorporated in Image's 3D Portal and in SHN's v9. Let me see if I can rebuild it from one of those zips. There is also a version of it used with the User Space mod.
Note: Unsure of the first two, but there was an error in the "user_space.asp" file which only showed up if a bookmark was checked the same day it was added. I fixed that but don't think I ever posted the fix. I'll compare files and see what I did to make it work. |
Edited by - Carefree on 30 October 2009 04:49:28 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 30 October 2009 : 06:19:11
|
Well, I can manage on fixing any problem there might be in the script. But would love the base code. Thanks carefree. |
Support Snitz Forums
|
|
|
cripto9t
Average Member
USA
881 Posts |
|
Davio
Development Team Member
Jamaica
12217 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 30 October 2009 : 11:28:39
|
I have original code if that isn't it (looks like it is though) |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 30 October 2009 : 20:32:20
|
Good deal, saves me a bit of time. |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 09 November 2009 : 00:22:59
|
The bookmarks mod has a lot of old code and a lot of security holes. Like taking values from the url and using it right into an sql query. It needs a little brushing up. |
Support Snitz Forums
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 09 November 2009 : 02:37:09
|
<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. 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 an 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:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
'##
'## Add a link to inc_header.asp (probably near the search link):
'## <a href="bookmark.asp" title="View your bookmarks">Your Bookmarks</a>
'##
'## Insert the following line two places in topic.asp:
'## Response.Write "<a href=""bookmark.asp?mode=add&id=" & Topic_ID & """>" & getCurrentIcon(strIconFavorites,"Bookmark this topic","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
'##
'## First, after the following, appx lines 820-824:
'## if (strYAHOO = "1") then
'## if Trim(Member_YAHOO) <> "" then
'## Response.Write " <a href=""http://edit.yahoo.com/config/send_webmesg?.target=" & ChkString(Member_YAHOO, "urlpath") & "&.src=pg"" target=""_blank"">" & getCurrentIcon(strIconYahoo,"Send " & ChkString(Member_Name,"display") & " a Yahoo! Message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
'## end if
'## end if
'##
'## Next, after the following, appx lines 617-621:
'## if strYAHOO = "1" then
'## if Trim(Reply_MemberYAHOO) <> "" then
'## Response.Write " <a href=""http://edit.yahoo.com/config/send_webmesg?.target=" & ChkString(Reply_MemberYAHOO, "urlpath") & "&.src=pg"" target=""_blank"">" & getCurrentIcon(strIconYahoo,"Send " & ChkString(Reply_MemberName,"display") & " a Yahoo! Message","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine
'## end if
'## end if
'##
'## Finally, create a file called "bookmark.asp" and put the following code in it.
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<%
Response.Buffer = true
nRefreshTime = Request.Cookies(strCookieURL & "Reload")
if Request.form("cookie") = "1" then
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "Reload").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "Reload") = Request.Form("RefreshTime")
Response.Cookies(strCookieURL & "Reload").expires = strForumTimeAdjust + 365
nRefreshTime = Request.Form("RefreshTime")
end if
if nRefreshTime = "" then
nRefreshTime = 0
end if
ActiveSince = Request.Cookies(strCookieURL & "ActiveSince")
if Request.form("cookie") = "2" then
ActiveSince = Request.Form("ShowSinceDateTime")
if strSetCookieToForum = 1 then
Response.Cookies(strCookieURL & "ActiveSince").Path = strCookieURL
end if
Response.Cookies(strCookieURL & "ActiveSince") = ActiveSince
end if
Select Case ActiveSince
Case "LastVisit"
lastDate = ""
Case "LastHour"
lastDate = DateToStr(DateAdd("h",-1,strForumTimeAdjust))
Case "LastDay"
lastDate = DateToStr(DateAdd("d",-1,strForumTimeAdjust))
Case "LastWeek"
lastDate = DateToStr(DateAdd("w",-7,strForumTimeAdjust))
Case "LastMonth"
lastDate = DateToStr(DateAdd("m",-1,strForumTimeAdjust))
Case "Registration"
lastDate = "All"
Case Else
lastDate = ""
End Select
%>
<!--#INCLUDE FILE="inc_header.asp" -->
<script language="JavaScript">
<!--
function autoReload()
{
document.ReloadFrm.submit()
}
//-->
</script>
<script language="JavaScript">
<!--
function SetLastDate()
{
document.LastDateFrm.submit()
}
//-->
</script>
<%
if IsEmpty(Session(strCookieURL & "last_here_date")) then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
end if
if lastDate = "" then
lastDate = Session(strCookieURL & "last_here_date")
end if
if Request.Form("AllRead") = "Y" then
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
Session(strCookieURL & "last_here_date") = ReadLastHereDate(strDBNTUserName)
lastDate = Session(strCookieURL & "last_here_date")
end if
bkMarkPageSize = 2
set rs = server.CreateObject("ADODB.RecordSet")
set rsUser = server.CreateObject("ADODB.RecordSet")
if trim(strDBNTUserName)="" Then
Response.Write "<br><br><P><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><center><b>You need to login to create or view bookmarks.</b><br><br>if you have not registered then you can <a href=""register.asp"">do so</a> for free." & vbNewLine & _
"</P>"
Response.End
end if
Select Case Request.QueryString("mode")
Case "add"
if isNumeric(chkString(Request.QueryString("id"),"id")) then
strTopic = chkString(Request.QueryString("id"),"id")
testSql ="SELECT * FROM "& strTablePrefix & "Bookmarks WHERE B_MemberID=" & getmemberID(strDBNTUserName) & " and B_TopicID=" & strTopic
rs.Open testSql, my_Conn
if rs.BOF or rs.EOF Then
' Bookmark doesn't already exist so add it
insSql = "INSERT INTO "& strTablePrefix & "Bookmarks (B_MemberID, B_TopicID) VALUES ("
insSql = insSql & getmemberID(strDBNTUserName) & ", "
insSql = insSql & strTopic & ")"
my_conn.Execute (insSql)
end if
Response.Write "<br><center>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""3; URL=link.asp?topic_id=" & strTopic & """>" & vbNewLine & _
"<center>" & vbNewLine & _
"<p><font size=""" & strDefaultFontSize & """><b>Bookmark Added!</b></font></p>" & vbNewLine & _
"<p><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>To view a bookmarked topic<br> at any time, click the <b>Bookmarks</b> link at the top of the page.<br>You will be returned back to the forum or topic. if you are not, click <a href=""" & strForumURL & "link.asp?topic_id=" & strTopic & """>here</a>." & vbNewLine & _
"</font></p></center>" & vbNewLine & _
"<div align=""center""><font face=""" & strDefaultFontFace & """ size="" & strFooterFontSize & ""><a href=""default.asp"">Back to Forum</a></font>" & vbNewLine & _
"</div>" & vbNewLine & _
"<P> <p> <p>" & vbNewLine
end if
Case "delete"
delBookmark = split(Request.Form("delBookmark"), ",")
for i = 0 to ubound(delBookmark)
' Delete selected topic bookmarks
delSQL = "Delete From "& strTablePrefix & "Bookmarks where Bookmark_ID = " & cInt(delBookmark(i))
my_conn.Execute delSQL
next
Response.Write "<br><center><font face=""" & strDefaultFontFace & """ size=3><b>Selected Bookmarks Deleted!</b></font><br>" & vbNewLine & _
"JavaScript:setTimeout(function(){history.back()},10);</center>" & vbNewLine
Case "deleteAll"
delBookmark = split(Request.Form("delBookmark"), ",")
delSQL = "Delete From "& strTablePrefix & "Bookmarks where B_MemberID = " & getmemberID(strDBNTUserName)
my_conn.Execute delSQL
Response.Write "<br><center><font face=""" & strDefaultFontFace & """ size=3><b>All Bookmarks Deleted!</b></font><br>" & vbNewLine & _
"JavaScript:setTimeout(function(){history.back()},10);</center>" & vbNewLine
Case default
if trim(strDBNTUserName)="" then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Invalid UserName or Password</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Go Back To Retry</a></font></p>" & vbNewLine
Response.End
end if
strSql = "SELECT B.BOOKMARK_ID, C.CAT_NAME, F.F_SUBJECT, M.M_NAME, T.CAT_ID, T.FORUM_ID, T.T_DATE, T.T_LAST_POST, T.T_LAST_POST_AUTHOR, T.T_REPLIES, T.T_SUBJECT, T.TOPIC_ID FROM ("& strTablePrefix & "CATEGORY C INNER JOIN "& strTablePrefix & "FORUM F ON C.CAT_ID = F.CAT_ID) INNER JOIN ("& strMemberTablePrefix & "MEMBERS M INNER JOIN ("& strTablePrefix & "BOOKMARKS B INNER JOIN "& strTablePrefix & "TOPICS T ON B.B_TOPICID = T.TOPIC_ID) ON M.MEMBER_ID = T.T_AUTHOR) ON F.FORUM_ID = T.FORUM_ID WHERE (B.B_MEMBERID=" & MEMBERID & ")"
if lastDate <> "All" then strsql = strsql & " AND T.T_LAST_POST > '" & lastDate & "'"
rs.Open strSQL, my_Conn, 3
iPage = CLng(request("iPage"))
rs.PageSize = bkMarkPageSize
iPageCount = cInt(rs.PageCount)
if iPage < 1 then
iPage = 1
end if
if iPageCount < 1 then
iPageCount = 1
end if
Response.Write "<table width=""95%"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""/default.asp"">Home</a><br>" & vbNewLine & _
"" & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""" & strForumURL & "default.asp"">All Forums</a><br>" & vbNewLine & _
"" & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " Bookmarked Topics which have been active Since<br>" & vbNewLine & _
" <form name=""LastDateFrm"" action=""bookmark.asp"" method=""post"">" & vbNewLine & _
" <select name=""ShowSinceDateTime"" size=""1"" onchange=""SetLastDate();"">" & vbNewLine & _
" <option value=""LastVisit"""
if ActiveSince = "LastVisit" or ActiveSince = "" then Response.Write (" SELECTED")
Response.Write "> Last Visit on " & ChkDate(Session(strCookieURL & "last_here_date"), " " ,true) & " </option>" & vbNewLine & _
" <option value=""LastHour"""
if ActiveSince = "LastHour" then Response.Write (" SELECTED")
Response.Write "> Last Hour</option>" & vbNewLine & _
" <option value=""LastDay"""
if ActiveSince = "LastDay" then Response.Write (" SELECTED")
Response.Write "> Yesterday</option>" & vbNewLine & _
" <option value=""LastWeek"""
if ActiveSince = "LastWeek" then Response.Write (" SELECTED")
Response.Write "> Last Week</option>" & vbNewLine & _
" <option value=""LastMonth"""
if ActiveSince = "LastMonth" then Response.Write (" SELECTED")
Response.Write "> Last Month</option>" & vbNewLine & _
" <option value=""Registration"""
if ActiveSince = "Registration" or ActiveSince = "All" then Response.Write (" SELECTED")
Response.Write "> Registration</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" <input type=""hidden"" name=""Cookie"" value=""2"">" & vbNewLine & _
" </form>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td align=""right"">" & vbNewLine & _
" <form name=""ReloadFrm"" action=""bookmark.asp"" method=""post"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><br>" & vbNewLine & _
" <select name=""RefreshTime"" size=""1"" onchange=""autoReload();"">" & vbNewLine & _
" <option value=""0""" & vbNewLine
if nRefreshTime = "0" then Response.Write (" SELECTED")
Response.Write ">Don't reload automatically</option>" & vbNewLine & _
" <option value=""1"""
if nRefreshTime = "1" then Response.Write (" SELECTED")
Response.Write ">Reload page every minute</option>" & vbNewLine & _
" <option value=""5"""
if nRefreshTime = "5" then Response.Write (" SELECTED")
Response.Write ">Reload page every 5 minutes</option>" & vbNewLine & _
" <option value=""10"""
if nRefreshTime = "10" then Response.Write (" SELECTED")
Response.Write ">Reload page every 10 minutes</option>" & vbNewLine & _
" <option value=""15"""
if nRefreshTime = "15" then Response.Write (" SELECTED")
Response.Write ">Reload page every 15 minutes</option>" & vbNewLine & _
" <option value=""30"""
if nRefreshTime = "30" then Response.Write (" SELECTED")
Response.Write ">Reload page every 30 minutes</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" <input type=""hidden"" name=""Cookie"" value=""1"">" & vbNewLine & _
" </font>" & vbNewLine & _
" </form>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<br>" & vbNewLine & _
"<form Action=""bookmark.asp?mode=delete"" method=""post"" id=""form1"" name=""form1"">" & vbNewLine & _
" <table align=""center"" border=""0"" cellPadding=""3"" cellSpacing=""1"" width=""55%"" bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <tr bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ width=""85%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strFooterFontSize & """><B>Topic</B>" & vbNewLine
if iPage > 1 then
Response.Write " <a href=""bookmark.asp?iPage=1"" alt=""first page"">[first] </a>" & vbNewLine & _
"<a href=""bookmark.asp?iPage=" & iPage - 1 & """ alt=""previous page"">" & vbNewLine & _
"« prev</a> | "
else
Response.Write "« prev | "
end if
if iPage < iPageCount then
Response.Write "<a href=""bookmark.asp?iPage=" & iPage + 1 & """ alt=""next page"">" & vbNewLine & _
"next »</a>" & vbNewLine & _
" <a href=""bookmark.asp?iPage=" & iPageCount & """ alt=""last page"">[Last]</a>"
else
Response.Write "next »"
end if
Response.Write " [Page:" & iPage & "/" & iPageCount & "]" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """>" & vbNewLine & _
" <a href=""" & strForumURL & "bookmark.asp?mode=deleteAll"" title=""Delete all bookmarks"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ color=""" & strHeadFontColor & """ size=""" & strFooterFontSize & """><B>Delete All</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </a>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
if rs.Eof OR rs.Bof then
Response.Write " <tr>" & vbNewLine & _
" <td colspan=2 bgcolor='" & strForumCellColor & "'>" & vbNewLine & _
" <font face='" & DefaultFontFace & "' size='2'><b>No Bookmarks Found</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>"
boolNoBookmarks = true
Else
rs.AbsolutePage = iPage
boolNoBookmarks = false
Dim i, CCsolor
i=0
rec = 1
do until rs.eof or rec = (bkMarkPageSize +1)
if i = 0 then
CColor = strAltForumCellColor
else
CColor = strForumCellColor
end if
Response.Write " <td bgcolor='" & CColor & "'>" & vbNewLine & _
" <font face='" & strDefaultFontFace & "' color=" & strForumFontColor & " size='2'><b>" & rs("Cat_Name") & "/" & rs("F_SUBJECT") & " Forum: " & vbNewLine & _
"<br><a href='link.asp?topic_id=" & rs("Topic_ID") & "'>" & FormatStr(left(rs("T_Subject"), 50)) & "</a></b>" & vbNewLine & _
" </font>" & vbNewLine & _
" <font size=-2>"
if rs("T_Replies") > strPageSize Then
' More than X replies on the page and therefore must be more than one page
Response.Write " - Jump to page: "
Dim strRef, nCounter, nPages
nPages = fix(rs("T_Replies") / strPageSize)
if ( ( nPages * strPageSize ) <> rs("T_Replies") ) Then
nPages = nPages + 1
end if
For nCounter = 1 to nPages
strRef="<a href='topic.asp"
strRef=strRef & "?whichpage=" & nCounter
strRef=strRef & "&topic_id=" & rs("Topic_ID")
strRef=strRef & "&forum_id=" & rs("Forum_ID")
strRef=strRef & "&cat_id=" & rs("CAT_ID")
strRef=strRef & "'>" & nCounter & "</a>"
Response.Write strRef & " "
Next
end if
Create_Date = rs("T_Date")
Last_Post = rs("T_LAST_POST")
Response.Write "<br> <b>Created by " & rs("M_Name") & "</b> on " & ChkDate(Create_Date, " " ,true) & vbNewLine & _
" <b>Last post on</b> " & ChkDate(Last_Post, " " ,true) & " <b>by " & getMemberName(rs("T_LAST_POST_AUTHOR")) & "</b></font></td>" & vbNewLine & _
" <td bgcolor=" & CColor & " align=center>" & vbNewLine & _
" <font face=" & strDefaultFontFace & " color=" & strForumFontColor & " size=2><input type=checkbox name=""delBookmark"" value=""" & rs("Bookmark_ID") & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>"
rec = rec + 1
rs.MoveNext
i = i + 1
if i = 2 then i = 0
loop
end if
Response.Write " </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p><div align=""center"">" & vbNewLine & _
" <input type=""submit"" name=""del"" value=""Delete Selected Bookmarks"">" & vbNewLine & _
"</FORM>" & vbNewLine & _
"</div></p><p></p>" & vbNewLine & _
"<div align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""default.asp"">Go Back</a></font>" & vbNewLine & _
"</div>" & vbNewLine & _
"<SCRIPT>" & vbNewLine & _
"<!--" & vbNewLine & _
"if (document.ReloadFrm.RefreshTime.options[document.ReloadFrm.RefreshTime.selectedIndex].value > 0) {" & vbNewLine & _
"reloadTime = 60000 * document.ReloadFrm.RefreshTime.options[document.ReloadFrm.RefreshTime.selectedIndex].value" & vbNewLine & _
"self.setInterval('autoReload()', 60000 * document.ReloadFrm.RefreshTime.options[document.ReloadFrm.RefreshTime.selectedIndex].value)" & vbNewLine & _
"}" & vbNewLine & _
"//-->" & vbNewLine & _
"</SCRIPT>" & vbNewLine
End Select
set rs = nothing
set rsUser = nothing
WriteFooter
%>
|
Edited by - Carefree on 09 November 2009 05:26:41 |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 09 November 2009 : 12:46:15
|
lol did you just do that carefree? Or you had a 3.4.07 compatible version? |
Support Snitz Forums
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 09 November 2009 : 18:46:29
|
Just did it this morning when I saw your message. |
|
|
Topic |
|
|
|