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
 "Who Has Posted" Mod Causing Active.asp Error
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MaGraham
Senior Member

USA
1297 Posts

Posted - 31 May 2013 :  19:49:43  Show Profile  Reply with Quote
After doing the "Who Has Posted Mod" I am receiving the following error message in my active.asp.


Microsoft VBScript compilation error '800a03ea'

Syntax error

/fp/active.asp, line 566

if CLng(Topic_Replies) > 0 then


Here are lines 564 - 577


Response.Write " </td>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText"">" & profileLink(chkString(Member_Name,"display"),Topic_Author) & "</span></font></td>" & vbNewLine & _
if CLng(Topic_Replies) > 0 then
response.write " <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """><span class=""spnMessageText""><acronym title=""Click here to see who has posted in this topic. (" & ChkString(Topic_Subject,"title") & ")""><a href=""JavaScript:openWindow3('pop_posted.asp?" & ArchiveLink & "Topic_ID=" & Topic_ID & "')""" & dWStatus("Who has posted?") & ">" & Topic_Replies & "</a></acronym></span></font></td>" & vbNewLine
else
response.write " <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_Replies & "</font></td>" & vbNewLine
end if
" <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_View_Count & "</font></td>" & vbNewLine
If IsNull(Topic_Last_Post_Author) Then
strLastAuthor = ""
Else
strLastAuthor = "<br />by: <span class=""spnMessageText"">" & profileLink(Topic_Last_Post_Author_Name,Topic_Last_Post_Author) & "</span>"
If strJumpLastPost = "1" Then strLastAuthor = strLastAuthor & " " & DoLastPostLink
End If


Otherwise, the mod works PERFECT and I LOVE it!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 June 2013 :  01:31:22  Show Profile
Delete the "& _" from line 565.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 June 2013 :  03:30:03  Show Profile

That caused this error message.


Microsoft VBScript compilation error '800a0400'

Expected statement

/fp/active.asp, line 571

" <td bgcolor=""" & strForumCellColor & """ valign=""middle"" align=""center""> <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & Topic_View_Count & "</font></td>" & vbNewLine
^




So, I added a "Response.Write" at the beginning of line 571 and that seems to have corrected it. I did good?




"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 June 2013 :  05:34:23  Show Profile
Yep, that's what was needed.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 June 2013 :  08:17:24  Show Profile

Thank you so much, Carefree! I am learning a little. . .very slowly. Thanks to you that I am learning though!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 01 June 2013 08:18:55
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 June 2013 :  10:57:30  Show Profile
We all had to start somewhere.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 June 2013 :  00:56:24  Show Profile

Another question regarding the "Who Has Posted Mod" . . .

When you click on the link in a topic to get the pop-up window that displays the usernames of the members who have posted on the topic. . .instead of the members' usernames displaying, would it be difficult to display their avatars instead, or in addition to, their username?



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 02 June 2013 00:58:28
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 02 June 2013 :  05:08:49  Show Profile
This works.

"pop_posted.asp"

<%
'###############################################################################
'##
'##	              Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 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
'##
'###############################################################################
%>                                                                                   
<!--#include file="config.asp"-->
<!--#include file="inc_header_short.asp" -->
<%
Dim intTopicID
Dim strError : strError = ""
Dim strSql
Dim rsPosted : Set rsPosted = Server.CreateObject("ADODB.RecordSet")
Dim arrPosted
Dim intPostedCount : intPostedCount = -1
Dim intM_NAME : intM_NAME = 0
Dim intM_POSTS : intM_POSTS = 1
Dim intM_ID : intM_ID = 2
Dim intLoop
Dim blnArchive : blnArchive = Trim(Request.QueryString("ARCHIVE"))
if len(blnArchive) = 0 then blnArchive = false
if (Request("Topic_ID") = "" or IsNumeric(Request("Topic_ID")) = False)  then
	Call DoError("<li>Invalid forum id!</li>")
	response.end
else
	intTopicID = cLng(Trim(Request("Topic_ID")))
end if 
if blnArchive then
	strActivePrefix = strTablePrefix & "A_"
	strSql = "SELECT M.MEMBER_ID,M.M_NAME,Count(M.M_NAME) AS CNT,M.M_AVATAR_URL,R.R_AUTHOR FROM " &_
		 strMemberTablePrefix & "MEMBERS M, " & strActivePrefix & "REPLY R " &_
		 "WHERE M.MEMBER_ID = R.R_AUTHOR AND R.TOPIC_ID = " & intTopicID &_
		 " GROUP BY M.M_NAME, R.R_AUTHOR "
else
	strSql = "SELECT M.MEMBER_ID,M.M_NAME,Count(M.M_NAME) AS CNT,M.M_AVATAR_URL,R.R_AUTHOR FROM " &_
		 strMemberTablePrefix & "MEMBERS M, " & strTablePrefix & "REPLY R " &_
		 "WHERE M.MEMBER_ID = R.R_AUTHOR AND R.TOPIC_ID = " & intTopicID &_
		 " GROUP BY M.M_NAME, R.R_AUTHOR "
end if
Set rsPosted=my_Conn.Execute(strSql)
response.write	"<table border=""0"" cellspacing=""0"" width=""100%"" cellpadding=""0"" align=""center"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"		<td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
	"			<table border=""0"" cellspacing=""1"" width=""100%"" cellpadding=""3"">" & vbNewLine & _
	"				<tr valign=""middle"">" & vbNewLine & _
	"					<td bgcolor=""" & strHeadCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>User</b></font></td>" & vbNewLine & _
	"					<td bgcolor=""" & strHeadCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Posts</b></font></td>" & vbNewLine & _			
	"				</tr>" & vbNewLine
If not rsPosted.EOF then
	rsPosted.MoveFirst
	intI=0
	Do while not rsPosted.EOF
		strFM_Name=rsPosted("M_Name")
		intFM_Post=rsPosted("CNT")
		strFM_Avatar=rsPosted("M_Avatar_URL")
		intFM_ID=rsPosted("MEMBER_ID")
		strMemberLink = "<a href=""javascript:opener.location=('pop_profile.asp?mode=display&id=" & intFM_ID  & "'); self.close();""" & dWStatus("View " & ChkString(strFM_Name,"display") & "'s Profile") & ">"
		if intI = 0 then CColor = strAltForumCellColor else CColor = strForumCellColor
	 	response.write 	"				<tr>" &_
			"					<td bgcolor=""" & CColor & """ align=""center"">" & strFM_Name & "<br />" & strMemberLink &_
			"						<acronym style=""border:none; text-decoration:none;"" title=""View " & strFM_Name & "'s Profile""><img src=""" & strFM_Avatar & """ height=""75px;"" width=""75px;"" /></acronym></a>" &_
			"					</td>" &_ 
			"					<td bgcolor=""" & CColor & """ align=""right"">" & _
			"						<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & intFM_Post & "     " &_
			"						</font>" & _
			"					</td>" &_
			"				</tr>"
		 intI  = 1-intI
		 rsPosted.MoveNext	
	Loop
	rsPosted.Close
Else
	Call DoError("<li>There are no replies to this topic!</li>")
End If
Set rsPosted=Nothing
response.write	"			</table>" & vbNewLine &_
	"		</td>" & vbNewLine &_  
	"	</tr>" & vbNewLine &_
	"</table>" & vbNewLine &_
	"<table border=""0"" cellspacing=""0"" width=""100%"" cellpadding=""0"" align=""center"">" & vbNewLine & _
	"	<tr>" & vbNewLine & _
	"		<td align=""center"">" & vbNewLine & _   
	"			<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><a href=""javascript:opener.location=('topic.asp?topic_id=" & intTopicID & "'); self.close();""" & dWStatus("Close window and view topic?") & ">Show Topic and Close Window</a></font>" &_	
	"		</td>" &_						
	"	</tr>" &_
	"</table>"

Sub DoError(strErrMsg)
	Response.Write	"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem With Your Details</font></p>" & vbNewLine & _
		"<table align=""center"" border=""0"">" & vbNewLine & _
		"	<tr>" & vbNewLine & _
		"		<td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & strErrMsg & "</ul></font></td>" & vbNewLine & _
		"	</tr>" & vbNewLine & _
		"</table>" & vbNewLine
End Sub
%> 
<!--#INCLUDE FILE="inc_footer_short.asp" -->

Edited by - Carefree on 02 June 2013 15:59:58
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 June 2013 :  15:27:38  Show Profile


It works PERFECT, Carefree!

And, oh my goodness! It's looks Sooo neat, too!

This is so exciting to have!

Thank you SO MUCH!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 June 2013 :  21:25:49  Show Profile


I really like that this displays the members' avatars plus their usernames and that both are a link to their profile.

Thank you again, Carefree!


"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07