I am migrating a wordpress blog with thousands of posts to drupal. Everything imported smoothly except the youtube videos. Its just showing text like this:

[youtube=http://www.youtube.com/watch?v=7EaI0U1_IW4]

Is there a way to automatically change this to the embed code? The video input format is no help because the syntax is [video:url] not [youtube:url]

HELP!!!

Comments

vm’s picture

you would have to do a manual replacement in the database which woudl be difficult I'd think or creating your own filter that mimics what the "youtube" bbcode did may be of benefit.

trickyricky26’s picture

Would adding a new tag in the bbcode module work?

thanks for response!

vm’s picture

don't know. never tried to do it. It would likely require a but more than the tag itself as the tag is what calls the embed code and then inserts the needed part of the url for the video.

vm’s picture

it just dawned on me to use the video module as you already tried.

then do a search and replace to replace the tags.

trickyricky26’s picture

search and replace in the template.php?

vm’s picture

no. On the node revisions table in the database where the content is physically stored.

trickyricky26’s picture

oops sorry i just used the module search and replace scanner and it WORKS! thanks so much for your idea saved me tons of time. i owe ya a coke!