1. 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

Discussion in 'Troubleshooting and Problems' started by Mian Shahid, Apr 16, 2014.

  1. Mian Shahid

    Mian Shahid Well-Known Member

    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
    @
     
    squarened likes this.
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
  3. Mian Shahid

    Mian Shahid Well-Known Member

    thanks for quick reply :)

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

    Brogan XenForo Moderator Staff Member

    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]');
     
    CountRock likes this.
  5. Mian Shahid

    Mian Shahid Well-Known Member

    you mentioned two commands in two post :confused: which on is for my issue? i think second one, kindly confirm.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    This is the actual query you need to run:
    Code:
    UPDATE xf_post SET message = REPLACE(message,'[ATTACH]','[ATTACH=full]');
     
  7. Mian Shahid

    Mian Shahid Well-Known Member

    Thanks a lot :)
     
  8. Mian Shahid

    Mian Shahid Well-Known Member

    This command damage our database, then we recover from backup :) so any one who like to use this may take extra care.
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    I don't see how it could, all it does is replace the opening tag.

    What damage did it cause?
     
  10. Falkor

    Falkor Member

    This is something we would also like to do but reading this maybe not :eek:
     
  11. Mian Shahid

    Mian Shahid Well-Known Member

    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:
    [​IMG]

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

    Brogan XenForo Moderator Staff Member

    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.
     
  13. Mian Shahid

    Mian Shahid Well-Known Member

    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 :)
     
  14. Mian Shahid

    Mian Shahid Well-Known Member

    You can do that, but with due care as Brogan said "
    In addition, I like to say, take complete site backup first:)
     
  15. Mian Shahid

    Mian Shahid Well-Known Member

Share This Page