The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Using Dailymotion Api in BB Code Template
Hi,
I wanted to use HTML5 schema in my BB code templates and wanted to fetch video data via dailymotion API and for that i have to create and echo variables inside template The code i am using is PHP Code:
PHP Code:
|
#2
|
||||
|
||||
You can't use PHP in the bbcode templates, or any templates for that matter.
|
#3
|
|||
|
|||
Quote:
I created a Plugin with this code PHP Code:
PHP Code:
|
#4
|
||||
|
||||
Take a look at the video bbcode related stuff.
|
#5
|
|||
|
|||
There is something like this {vb:raw code} in "bbcode_video" in templates. now how can i send this {vb:raw code} to plugin ??
|
#6
|
|||
|
|||
You can remove these two lines from your code:
Code:
$templater = vB_Template::create('dailymotion_video_api'); $templater->render(); I understand that you want the video id to be a parameter, but I don't understand where you want to enter it. Edit: Maybe you want to provide the code as part of the bbocde? Which hook location are you using for your plugin? |
#7
|
|||
|
|||
By the way, have you looked at this mod: https://vborg.vbsupport.ru/showthread.php?t=230707 ? Maybe it already does what you want.
And I noticed that there are a couple older mods below in the "Similar Threads" section below. They are for older versions, but they still might work with vb4, or at least give you an idea of how to do it. Edit: Oh, well, I guess you're trying to use the api to get the thumbnail and not just embed the video, so maybe those don't help. |
#8
|
||||
|
||||
Also, if you just want to use dailymotion, you can update the bbcode_video.xml file, no need for a lot of complicated nonsense.
|
#9
|
|||
|
|||
Quote:
i want to get video id from thread where video is embedded and parse that id to my plugin function so i can get video_tubmnail, title, length and other stuff from dailymotion --------------- Added [DATE]1398493348[/DATE] at [TIME]1398493348[/TIME] --------------- I can see that you are not getting what i wanted to do. i am not stupid enough to get stuck on just embedding videos. |
#10
|
||||
|
||||
Please enlighten me, why can't you just update the video bbcode template?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|