Hard Answers |
Delete Comment Spam From Gallery |
|
Mass-delete comment spam from GalleryEver woken up to find your Gallery full of comment spam? Ever tried deleting the comment spam, one by one? Not good... Here’s how to delete it directly from the database, all at once (for Gallery 2.x). You will need access to the database running behind your Gallery. This can often be through phpMyAdmin in cPanel or similar. You’ll need to change the parts in bold to match what you’re trying to delete. Note that a % is a wildcard in SQL, so matches anything. For example, ‘%a%’ would match anything with an ‘a’ in it, and ‘209.31.123%’ would match anything starting in ‘209.31.123’. To delete comments posted by an IP, or a few IPs, run this SQL statement: delete ce, e, co from g2_ChildEntity ce, g2_Entity e, g2_Comment co where ce.g_id=e.g_id and e.g_id=co.g_id and e.g_entityType='GalleryComment' and (co.g_host='67.104.112.176' or co.g_host='209.31.123.128') To delete comments based on the comment itself, run this SQL statement: delete ce, e, co from g2_ChildEntity ce, g2_Entity e, g2_Comment co where ce.g_id=e.g_id and e.g_id=co.g_id and e.g_entityType='GalleryComment' and (co.g_comment like '%[url=http://%') To delete comments by a specific author or authors, run this SQL statement: delete ce, e, co from g2_ChildEntity ce, g2_Entity e, g2_Comment co where ce.g_id=e.g_id and e.g_id=co.g_id and e.g_entityType='GalleryComment' and (co.g_author like '%ialis%' or co.g_author like '%iagra%') More InformationFore more information on:
Updated about 4 yrs, 3 mths ago (October 10, 2007). Know a better answer? Let us know! Related categories . ac-3 acpi album apache artist asio cache caching carputer centos [comment] [computer] displayport dolby digital dts ebay epg episode exchange exchange 2010 falcon ford [gallery] golf gossip girl hard answers hash hdmi [hosting] hotlinking htaccess html hyper-v iis laptop linux live messenger mce media center messenger mobile mod_rewrite mouse mp3 msn msn messenger music [mysql] negative delta time netbook ost owa [pc] php pilot playlist power management redirect regex regular expressions remote control seo server server 2008 server 2008 r2 song soundblaster soundtrack [spam] spdif sport [sql] sstp str string surround sound suspend television template text tv unreal tournament ut video vista vmc vpn [web] wi-fi windows windows 7 windows mobile wireless xhtml xp yahoo messenger User submitted comments: anon, about 2 yrs, 1 mth ago Thank you! This saved me a bunch of time. Comment on this article (no HTML, max 1200 characters): |
||
| Got a question? Ask us. | Copyright © 2007–2011 Ned Martin | |
Akom, about 3 yrs, 4 mths ago
Monday September 29, 2008 1:38 AM
Saved me tons of time. Though in the end it turned out that I had nothing besides spam! :)
Thanks for posting this.