PDA

View Full Version : Mass selective thread move


Bozza
06-16-2011, 06:37 PM
Hi chaps - looking for some practical help with a problem that hit me today...

My site is a reasonable size - 195,000 threads (95% in the one main forum) and 4.1m posts. We are heavily reliant on Google Adsense revenue to pay our hosting bills.

Today, Adsense disabled ads from us because of some of the content on the site. The example they gave was a thread that included a picture of a topless woman. Nothing that can't be seen in many UK 'family' newspapers on any given day, but there you have it.

I want to retain Adsense if I can, as the site could struggle to exist without it.

As there could be similar content anywhere over the site I've done a mass move - moving everything older than a month to a new, currently hidden, forum. The idea is to get a trusted group of users to work through threads in this forum, clean them if required and then move them back into view. However this is c180,000 threads - in all likelihood this will not all be reviewed.

To try and keep the manual work as small as possible I thought it would be good if there were a way to programmatically move all threads that didn't contain either an attachment or an IMG tag as these won't contain anything dodgy. The remainder could then be reviewed manually.

My SQL skills are OK and I reckon I could write a script to identify all such threads, but is this practical? It strikes me that the SQL could be massively intensive given the need to effectively do a LIKE on each of 4m posts.

Is this the only way I could do something 'clever' or is there another option for me? All help appreciated!

--------------- Added 1308302479 at 1308302479 ---------------

Ignore this all done - the SQL executed amazingly quickly.