The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello guys! I have made my own product for parsing the youtube <embed> codes.
I made it so you type in: Code:
[youtube]<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/6RrzSbYeG14"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/6RrzSbYeG14" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>[/youtube] Then I made the handle_youtube to return this code: Code:
<object width="WIDTH" height="HEIGHT"><param name="movie" value="http://www.youtube.com/v/ID"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/ID" type="application/x-shockwave-flash" wmode="transparent" width="WIDTH" height="HEIGHT"></embed></object> So I added: Code:
<fieldset><legend>YouTube Movie</legend>THEMOVIE</fieldset> So I added a plugin to the product: Code:
<plugin active="1" executionorder="32767">
<title>Show unparsed in Wysiwyg</title>
<hookname>bbcode_create</hookname>
<phpcode><![CDATA[
if ($this->is_wysiwyg()) {
$this->unparsed_tags[] = 'youtube';
}
]]></phpcode>
</plugin>
Then I made a function to htmlentities() but then it wouldn't display the youtube movie properly, the code would be htmlentitiet everywhere. But I only want it to be like that INSIDE the wysiwyg editor, not on showthread. I added my product as attachment. What do you suggest? |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|