Log in

View Full Version : Attachment code user post cleanup


PiotrGT
12-03-2014, 07:47 PM
Hello Guys,

Can you please help me come up with a sql query which will delete this sort of content from all user posts (entire forum)?

[attachment=8:1xeksqq9]Autumn Ring Mini_1.jpg[/attachment:1xeksqq9]
[attachment=7:1xeksqq9]Circuit de la Sarthe 2009_2.jpg[/attachment:1xeksqq9]
[attachment=6:1xeksqq9]High Speed Ring_1.jpg[/attachment:1xeksqq9]
[attachment=5:1xeksqq9]Lazurowe Wybrzeże.jpg[/attachment:1xeksqq9]
[attachment=4:1xeksqq9]Lazurowe Wybrzeże_1.jpg[/attachment:1xeksqq9]
[attachment=3:1xeksqq9]N?rburgring 24h_2.jpg[/attachment:1xeksqq9]
[attachment=2:1xeksqq9]Odcinek Specjalny - Route 7.jpg[/attachment:1xeksqq9]
[attachment=1:1xeksqq9]Odcinek Specjalny - Route 7_1.jpg[/attachment:1xeksqq9]
[attachment=0:1xeksqq9]Toskania_1.jpg[/attachment:1xeksqq9]

For example: http://granturismo.pl/vb5/forum/%C5%9Bwiat-gran-turismo/gran-turismo-5/gt5-photo-mode/4172-zdj%C4%99cia-czester2000

So basicly we need something that will find and delete content with the following data in it:
[attachment=**********]****[/attachment:********]

I did a upgrade from phpbb3 and I would like to clean up this mess. I made all of the attachments show up as images and im unable to include them as inline images them so I want to remove all of it and keep all of my attachments at the bottom of my posts (the basic/typical way).