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

XF 1.2 BBcode YouTube embeds

Discussion in 'Installation, Upgrade, and Import Support' started by Vidmarc, Sep 25, 2013.

  1. Vidmarc

    Vidmarc Member

    Since importing from vB4, all of our YouTube embedded videos are appearing like this:

    Code:
    [YOUTUBE]8_ocrenOCPo[/YOUTUBE]
    Any suggestions as to how to fix it?
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    You'll need to either edit the post or use Kier's post replacement tool to replace all instances in the database.
     
  3. Vidmarc

    Vidmarc Member

    Thanks - where can I find the replacement BBcode tool?
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

  5. Brogan

    Brogan XenForo Moderator Staff Member

    For simple content such as that, you can use an SQL query, which is what I did.

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

    Vidmarc Member

    No idea what I need to do to replace those BB codes. Can anybody help please?

    I guess I need to search for the first and last parts of the code and replace these?

    [YOUTUBE]

    [/YOUTUBE]
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Code:
    UPDATE xf_post SET message = REPLACE(message,'[YOUTUBE]','[media=youtube]');
    Code:
    UPDATE xf_post SET message = REPLACE(message,'[/YOUTUBE]','[/media]');
    Rebuild the search index once done.
     
  8. Vidmarc

    Vidmarc Member

    Thanks, what field do I add these to?

    Quick Find
    Regular expression
    Replacement String
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    As I mentioned in my earlier post, you can enter those as direct SQL queries in phpMyAdmin, rather than use the add-on.
     
  10. Vidmarc

    Vidmarc Member

    I've no idea about phpMyAdmin, would rather use the add on tool.
     
  11. Jeremy

    Jeremy XenForo Moderator Staff Member

  12. Vidmarc

    Vidmarc Member

    "Please enter a message with no more than 5 pieces of media."

    Any clues?
     
  13. Jeremy

    Jeremy XenForo Moderator Staff Member

    You'll need to either up the user group permissions or modify the option (I forget which one media is defined in).
     

Share This Page