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)
 Multiple Topic Delete Option
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 15 February 2013 :  15:19:59  Show Profile  Reply with Quote
quote:
Originally posted by Andy Humm

...I have noticed that when you select the bottom Delete Topic button the multi-delete does not work, however everything is okay from top button.


Just tested it here, it works from the bottom button. Post a link to your "forum.asp" in .txt format for us to see what's wrong.
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 15 February 2013 :  16:15:44  Show Profile  Reply with Quote
quote:
Originally posted by Andy Humm

Further to the above, I have noticed if you do not click/tag a topic to delete and then press on one of the Delete Topic Icon buttons, and error message appears

Microsoft VBScript runtime error '800a000d'
Type mismatch: 'cInt'
/forum/multi-topic_delete.asp, line 67





Didn't try that one, thanks. Here's the fix:

"multi-topic_delete.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
'##
'###############################################################################
'##
'## Multi-topic Delete
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_subforum.asp" -->
<%
If mLev < 4 or Request.Form("Forum")="" Then
	Response.Write	"<script>javascript:history.go(-1);</script>"
	Response.End
End If
Forum_ID=cInt(chkString(Request.Form("Forum"),"SQLString"))
strTopics=chkString(trim(Request.Form("MassDelete")),"SQLString")+","
If len(strTopics)<3 Then 
	Response.Write  "<table align=""center"" width=""50%"" border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
		"	<tr valign=""middle"">" & vbNewLine & _
		"		<td align=""center"" width=""100%"">" & vbNewLine & _
		"			<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strDefaultFontColor & """>No topics selected for deletion.  Go <a href=""javascript:history.go(-1)"">back</a> to correct." & vbNewLine & _
		"			</font>" & vbNewLine  & _
		"		</td>" & vbNewLine & _
		"	</tr>" & vbNewLine & _
		"</table>" & vbNewLine
	WriteFooter
	Response.End
End If
dim intDelete(50), intj
strTopic="":intj=0
For i = 1 to len(strTopics)
	If mid(strTopics,i,1)<>"," Then
		strTopic=strTopic+mid(strTopics,i,1)
	Else
		intj=intj+1
		intDelete(intj)=cInt(strTopic)
		strTopic=""
	End If
Next
strSql = "DELETE FROM " & strTablePrefix & "TOPICS WHERE TOPIC_ID = " & intDelete(1)
If intj > 1 Then
	For i = 2 to intj
		strSql = strSql & " OR TOPIC_ID = " & intDelete(i)
	Next
End If
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
strSql = "DELETE FROM " & strTablePrefix & "REPLY WHERE TOPIC_ID = " & intDelete(1)
If intj > 1 Then
	For i = 2 to intj
		strSql = strSql & " OR TOPIC_ID = " & intDelete(i)
	Next
End If
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
strSql = "DELETE FROM " & strTablePrefix & "SUBSCRIPTIONS WHERE TOPIC_ID = " & intDelete(1)
If intj > 1 Then
	For i = 2 to intj
		strSql = strSql & " OR TOPIC_ID = " & intDelete(i)
	Next
End If
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
On Error Resume Next
strSql = "SELECT TOPIC_ID, T_LAST_POST, T_LAST_POST_AUTHOR, T_LAST_POST_REPLY_ID FROM " & strTablePrefix & "TOPICS WHERE FORUM_ID = " & Forum_ID & " AND T_STATUS <=1 AND T_ARCHIVE_FLAG = 0 ORDER BY T_LAST_POST DESC"
Set rs = my_Conn.Execute(strSql)
my_Conn.Errors.Clear
Err.Clear
If not rs.EOF Then
	rs.MoveFirst
	strLast_Post = rs("T_LAST_POST")
	strLast_Post_Author = rs("T_LAST_POST_AUTHOR")
	strLast_Post_Topic_ID = rs("TOPIC_ID")
	strLast_Post_Reply_ID = rs("T_LAST_POST_REPLY_ID")
Else
	strLast_Post = ""
	strLast_Post_Author = "NULL"
	strLast_Post_Topic_ID = 0
	strLast_Post_Reply_ID = 0
End If
rs.Close
Set rs = Nothing
strSql = "UPDATE " & strTablePrefix & "FORUM SET F_COUNT = F_COUNT - " & cLng(risposte) + intJ & ", F_TOPICS = F_TOPICS - " & intJ & ", F_LAST_POST = '" & strLast_Post & "' "
strSql = strSql & ", F_LAST_POST_AUTHOR = " & strLast_Post_Author & ", F_LAST_POST_TOPIC_ID = " & strLast_Post_Topic_ID
strSql = strSql & ", F_LAST_POST_REPLY_ID = " & strLast_Post_Reply_ID & " WHERE FORUM_ID = " & Forum_ID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
strSql = "UPDATE " & strTablePrefix & "TOTALS "
strSql = strSql & " SET T_COUNT = T_COUNT - " & intJ
strSql = strSql & ",    P_COUNT = P_COUNT - " & cLng(risposte) + intJ
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
Response.Write  "<table align=""center"" width=""50%"" border=""0"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
	"	<tr valign=""middle"">" & vbNewLine & _
	"		<td align=""center"" width=""100%"">" & vbNewLine & _
	"			<font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strDefaultFontColor & """>" & intJ & " topic"
If intJ = 0 or intJ > 1 Then
	Response.Write  "s"
End If
Response.Write  " deleted.<br /><br />" & vbNewLine & _
	"			</font>" & vbNewLine & _
	"			<meta http-equiv=""Refresh"" content=""5; URL=forum.asp?FORUM_ID="&Forum_ID&""">" & vbNewLine & _
	"			<font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><a href=""default.asp"">All Forums</a>" & vbNewLine & _
	"			</font>" & vbNewLine & _
	"		</td>" & vbNewLine & _
	"	</tr>" & vbNewLine & _
	"</table><br /><br />" & vbNewLine
WriteFooter
%>
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 16 February 2013 :  17:43:38  Show Profile  Reply with Quote
quote:
Originally posted by Carefree

quote:
Originally posted by Andy Humm

...I have noticed that when you select the bottom Delete Topic button the multi-delete does not work, however everything is okay from top button.

Just tested it here, it works from the bottom button. Post a link to your "forum.asp" in .txt format for us to see what's wrong.


Try this forum.txt file thank you
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 17 February 2013 :  01:43:03  Show Profile  Reply with Quote
Nothing wrong there that I can see, Andy. It should be working. Anyone else experiencing this?
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 17 February 2013 :  02:36:24  Show Profile  Reply with Quote
Hmm, the multitopic mod uses a form on the forum.asp page, to submit the id's of the selected topics.
I see the form opened at the beginning of the topics table at the top, but I don't see any closing </form> tag for it at the end of the table.

The multitopic form encompasses other forms, like the topic sort form at the bottom of the table.
It could be, since the multi-topic delete button at the top is the first button in the form, that it works.
But once it is generated again at the bottom, another form has opened and closed since then and the browser might not know what to do with it.

Just my assessment looking through forum.txt file. I don't know how browsers will handle opening forms within a form, but it at least need a closing form tag some where.

Support Snitz Forums
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 17 February 2013 :  10:45:42  Show Profile  Reply with Quote
Skipped a piece of the file, brain-dead, but the odd thing is that it works on a test site despite the missing closing tag. SnitzBitz file has been corrected.


Look for the following lines (appx 572-575, after making earlier changes):

end if
'-------------------------------------------------
' TOPIC SORTING MOD
'-------------------------------------------------

Above them, insert these:

	'	##	Multi-Topic Delete Below
	Response.Write	"</form>" & vbNewLine
	'	##	Multi-Topic Delete Above

Edited by - Carefree on 17 February 2013 11:11:26
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 17 February 2013 :  19:54:05  Show Profile  Reply with Quote
quote:
Originally posted by Carefree

Nothing wrong there that I can see, Andy. It should be working. Anyone else experiencing this?

Hi Carefree, I have tried your suggested </form> tag below and still the same symptoms???
I still notice when you hover the mouse over the bottom delete icon, that no url appears in the status bar, indicating no link to multi-delete..
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000 Version 3.4.07