• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.3 Convert VB Attachment images into full

Mian Shahid

Well-known member
#1
Hi,

After converting our VB4 board into XF, we found almost all large old image attachments displaying as thumb instead viewing full.

Attachment code example:

VB image attachment code displaying as
Code:
[ATTACH]457.vB[/ATTACH]
, if we edit it to view as full it will be looks like
Code:
[ATTACH=full]457[/ATTACH]
.

We have thousands of same like in pending, is there any easy way to convert all of them from "VB" to "full"?

Waiting......... :)

@Brogan
@Jeremy
@Jake Bunce
@
 

Brogan

XenForo moderator
Staff member
#2
You can use a simple SQL query to replace the opening tag text.

Are you familiar with using phpMyAdmin?

Code:
UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
Take a backup first.
 

Mian Shahid

Well-known member
#3
You can use a simple SQL query to replace the opening tag text.

Are you familiar with using phpMyAdmin?

Code:
UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
Take a backup first.
thanks for quick reply :)

I am novice using phpMyAdmin only once executed a query suggested by you regarding invisible users ;)
 

Brogan

XenForo moderator
Staff member
#4
As long as you take a backup first, you should be fine.

Then just run:
Code:
UPDATE xf_post SET message = REPLACE(message,'[ATTACH]','[ATTACH=full]');
 

Brogan

XenForo moderator
Staff member
#6
This is the actual query you need to run:
Code:
UPDATE xf_post SET message = REPLACE(message,'[ATTACH]','[ATTACH=full]');
 

Mian Shahid

Well-known member
#11
I don't see how it could, all it does is replace the opening tag.

What damage did it cause?
almost everything in database, forum was not accessible for public only errors displaying, only database restore doesn't worked, then we re installed almost everything from cpanal to software then restored database.

I am not sure about actual cause either it happens due to running above command from MySQL or some thing else, but everything gone wrong after running that command, before that, we make some adjustment regarding our pageload which work fine as per below screen:


so . . . . . . . . . . we recovered after 24 hrs :)
 

Brogan

XenForo moderator
Staff member
#12
That query wouldn't cause that.

I and many others have used simple queries such as that one and others to replace post content.

I converted from phpBB and had around 50 custom BB Codes which I had to change or remove, using queries exactly like that.
 

Mian Shahid

Well-known member
#13
I already said we are not sure about the actual cause, but we face that after running query, who investigate for actual cause? :) this is not required, but I only informed here what happens with us, may we make some mistake during running the query but . . . . . Ah! we like to forget everything regarding this incedent :)