The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Massive BB Code replacement by MySQL query
Hello,
Forcing use of the new 'Insert Video' functionality, I replace my old [YT]video_id[/YT] tags in posts executing this query on MySQL: Code:
update post set pagetext = Replace(pagetext,'[yt]','[video]http://www.youtube.es/watch?v='); update post set pagetext = Replace(pagetext,'[/yt]','[/video]'); [video=youtube;video_id]http://www.youtube.com/watch?v=video_id[/video] Therefore, for embedded player displaying I must expand the [video] tag with the parameters in bold, but I don't know what query I should run in mysql to capture the appropiate video_id from the URL... I saw something like this, but I think it's not the case... Thanks for your help!!! |
#2
|
||||
|
||||
ahhh, you see when you watch a youtube video via the host website it uses "/watch?v=" but to embed it you use "/watch/v/". i still use my own youtube bbcode which looks like this:
<embed src="http://www.youtube.com/watch/v/{param}" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed> i suppose you could make this more user-friendly by allowing members to add whole youtube link and replacing the code above to correct it for embedding. |
#3
|
||||
|
||||
Quote:
I understand the query to run in the vBulletin AdminCP is: Code:
UPDATE tablename SET tablefield = replace(tablefield,"findstring","replacestring"); Thank you for any guidance. Jim |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|