Run Query to insert all attachments as full image

Smooth

Active member
Hi guys,

Sure this will be a quick fix, but could someone help me with the query I need to run on the DB to have all images that were posted as just an attachment to be inserted into the post as a Full Image?

It is a fix as our app does not insert full as standard, just as an attachment.

Many thanks,
 

Jake Bunce

XenForo moderator
Staff member
Code:
UPDATE xf_post
SET message = REPLACE(message, '[ATTACH]', '[ATTACH=full]');
That will update all inline thumbnails to be full images.
 

Smooth

Active member
Jake - this has worked perfectly for those inserted as thumbnails, but not those that have not been inserted at all, just attached. Is there any way to grab them too?

Many thanks once again!
 

Jake Bunce

XenForo moderator
Staff member
Jake - this has worked perfectly for those inserted as thumbnails, but not those that have not been inserted at all, just attached. Is there any way to grab them too?
That can't be done with a simple query. It requires a custom script.
 

Smooth

Active member
Ahh ok thanks Jake. Is there any way to run that query automatically? Ie like a Cron Entry?

Thanks again!
 
Top