Ventrian Product Forums

We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.
Subject: Mass Delete Comments
Prev Next
You are not authorized to post a reply.

Author Messages
Jack HoelzUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:899


10/09/2010 6:06 AM  

I need help with a script to mass delete comments by the following:

Author - delete all comments on articles published by a specific author

ArticleID - delete all comments for a speficic article.

ArticleID w/date range

Portal - delete all comments for all articles in a specific portal

ModuleID - delete all comments for a specific module ID

It would be really nice if this feature was available from the admin portion of the module

 

Thanks for your help

 


Get The Net!!

Jack Hoelz
Yehuda TiramUser is Offline
Gold Membership
Ventrian Wiz
Ventrian Wiz
Posts:197


1/31/2011 10:06 AM  
I need that solution too.
Is it OK to just delete comments from the comments table?
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:21233


2/01/2011 4:52 AM  
You can delete from the comments table if you have a spam issue - it will calculate the count again for each article when displaying them.

Scott McCulloch
Site Administrator
Yehuda TiramUser is Offline
Gold Membership
Ventrian Wiz
Ventrian Wiz
Posts:197


2/01/2011 5:06 AM  
Yeah, spam is the issue.
Thanks
Maybe you can think of it as an enhancement (let admin delete all comments or even select from list)
Julia ReshUser is Offline
Registered Users
Ventrian Addict
Ventrian Addict
Posts:83

7/12/2012 2:56 AM  
Oh well deleting many comments at once would be a great idea
Super User AccountUser is Offline
Ventrian Wiz
Ventrian Wiz
Posts:131

7/12/2012 7:25 AM  
Julia, do you want an option in the screens or just a script?
Déclic VidéoUser is Offline
Gold Membership
Ventrian Master
Ventrian Master
Posts:1461


7/29/2012 8:31 AM  
Posted By Jack Hoelz on 10/09/2010 6:06 AM

I need help with a script to mass delete comments by the following:

1/ Author - delete all comments on articles published by a specific author

2/ ArticleID - delete all comments for a speficic article.

3/ ArticleID w/date range

4/ Portal - delete all comments for all articles in a specific portal

5/ ModuleID - delete all comments for a specific module ID

It would be really nice if this feature was available from the admin portion of the module

 

Thanks for your help

 


Hello,


That should do the trick:

1/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE UserId = xx

With xx the AuthorID number.

2/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE ArticleId = xx

With xx the ArticleId number.

3/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE CreatedDate > xxxxxx

With xxxxx the date.

4/
I don't know

5/
DELETE FROM DnnForge_NewsArticles_Comment
WHERE ArticleId IN (Select ArticleId FROM DnnForge_NewsArticles_Article WHERE ModuleId = xx)

With xxxxx the ModuleID


Hope it helps,
DV FX



Pinnacle Studio, proDAD and Boris FX tips and tricks, tutorials... Déclic Vidéo FX
You are not authorized to post a reply.
Forums > Modules > News Articles > Mass Delete Comments



ActiveForums 3.7
We've moved our Product Forums!
To better assist our customers, we've moved to an integrated knowledge base and ticketing system. You can access the new forums at http://support.ventrian.com.