Multiple Topic Delete Option

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/70041?pagenum=1
05 November 2025, 01:59

Topic


Andy Humm
Multiple Topic Delete Option
10 November 2011, 04:04


I have just been streamlining my forum, by deleting a lot of the older threads and wonder if there is mod on the streets, that will allow administrators to tag multiple threads and delete them in one swipe. I have searched through here and snitzbitz - no results. Any help would be greatfully appreciated

 

Replies ...


Carefree
10 November 2011, 04:19


Don't know of one, Andy. If nobody has one, I'll write you one when I finish the usergroup EMail project.
Andy Humm
10 November 2011, 06:27


Thanks CF no rush..just a general request to help improve this forum
Carefree
11 November 2011, 12:38


Here you go. SnitzBitz
Andy Humm
11 November 2011, 18:13


CF Thanks everso much for your rapid response. I have downloaded the files and they are all password protected including the readme file...,
Carefree
11 November 2011, 18:45


Shouldn't have been. I'll rezip it.
Done. File replaced.
Andy Humm
15 November 2011, 02:59


Hi CF, I am still getting the password block ??????????
Carefree
15 November 2011, 10:59


Sorry, I was retarded and uploaded the wrong zip file.
Andy Humm
19 November 2011, 05:35


No problems now CF thank you ever so much!
Carefree
19 November 2011, 10:30


You're welcome.
Andy Humm
19 November 2011, 18:53


Craig, just as an observation, I have a Snitz Version 06 with many different mods included in the forum.asp and found that the multi-drop_delete.asp file would not open after selecting the topic threads to delete.
I have commented out line 53
<!--#INCLUDE FILE="inc_subforum.asp" -->
and everything works fine..
Thanks again
Andy
Carefree
19 November 2011, 19:31


Sorry, left that by accident since I was testing on a site with subforums installed.
Andy Humm
20 November 2011, 04:33


Craig absolutely no problems at all We can only all thank you for your excellent support.
Carefree
20 November 2011, 12:11


That's good. We aim to please.
Andy Humm
14 February 2013, 13:18


Its been a while since i embodied this excellent facility, but no changes to pages since, 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. I have noticed there is no link in the bstatus bar suggesting the url link may be missing. Any solutions would be greatly appreciated..
Bottom of forum page

Andy Humm
14 February 2013, 14:53


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
Carefree
15 February 2013, 15:19


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.
Carefree
15 February 2013, 16:15


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":

Code:

<%
'###############################################################################
'##
'## 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
%>
Andy Humm
16 February 2013, 17:43


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
Carefree
17 February 2013, 01:43


Nothing wrong there that I can see, Andy. It should be working. Anyone else experiencing this?
Davio
17 February 2013, 02:36


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.
Carefree
17 February 2013, 10:45


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.
Code:

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
Andy Humm
17 February 2013, 19:54


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..
© 2000-2021 Snitz™ Communications