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 2 yrs, 4 mths ago (October 10, 2007). Know a better answer? Let us know! Related categories . acpi album apache artist asio cache caching centos [comment] [computer] epg episode [gallery] golf gossip girl [hosting] hotlinking html hyper-v linux live messenger mce media center messenger mod_rewrite mp3 msn msn messenger music [mysql] negative delta time ost [pc] php pilot playlist power management remote control seo server server 2008 server 2008 r2 song soundblaster soundtrack [spam] sport [sql] sstp str suspend television template tv unreal tournament ut video vista vmc vpn [web] windows windows 7 windows mobile xhtml xp yahoo messenger User submitted comments: anon, about 2 mths, 14 days 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 © 2009 Ned Martin | |
Akom, about 1 yr, 5 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.