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

XF 1.2 YouTube Links

Discussion in 'Styling and Customization Questions' started by Wild Onion, Jan 5, 2014.

  1. Wild Onion

    Wild Onion Member

    I'm wrapping up my transition from vBulletin 3.7 to XF 1.2. On my vBulletin board, I had a BB Code for embedding YouTube Links, using VB's BB Code Manager.

    After the import, these links no longer work, but my users still visit these threads. Any idea how to update these links?
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    How does the code appear in the posts?

    If it is simply the YT tags with the video ID then you can do a simple replacement by running a query:
    Code:
    UPDATE xf_post SET message = REPLACE(message,'current_content','new_content');
    So for simple YT tags the queries would be:
    Code:
    UPDATE xf_post SET message = REPLACE(message,'[YT]','[media=youtube]');
    UPDATE xf_post SET message = REPLACE(message,'[/YT]','[/media]');
    
    Take a backup of the database first.
     
    ibrian and ARSamo like this.
  3. Wild Onion

    Wild Onion Member

    Looks like that will work. I'll run the replacement query after the backup.

    Thanks for all the help.
     

Share This Page