MyBB Community Forums

Full Version: Add an option for videos
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.
I have a question.

I want to add an option to videos list.
e.g: we can put a video from youtube with this code:
[video=youtube]http://example.com/[/video]

Now i want to add an option with this codes:
[video=aparat]http://example.com/[/video]

and these for show it:
<embed height="400" width="600" flashvars="config=http://www.aparat.com//video/video/config/videohash/{$id}" allowfullscreen="true" quality="high" name="aparattv" id="aparattv" style="" src="http://www.aparat.com/public/public/player/aparattv" type="application/x-shockwave-flash">

Can you help me for doing it? Heart
Why not install a MyCode for it ?
OK.
I am trying to use a mycode for this but how i can add an option for videos?
Open ./jscripts/editor.js file and find;

		this.videos["dailymotion"] = this.options.lang.video_dailymotion;
		this.videos["googlevideo"] = this.options.lang.video_googlevideo;
		this.videos["metacafe"] = this.options.lang.video_metacafe;
		this.videos["myspacetv"] = this.options.lang.video_myspacetv;
		this.videos["vimeo"] = this.options.lang.video_vimeo;
		this.videos["yahoo"] = this.options.lang.video_yahoo;
		this.videos["youtube"] = this.options.lang.video_youtube;

Add an additional Video code adding at the bottom, using the syntax;

		this.videos["VIDEO_NAME"] = this.options.lang.video_VIDEO_NAME;

Now open ./inc/languages/english/global.php.lang file and add a language string after;

{$lang->editor_video_youtube}

Using the syntax;

{$lang->editor_video_VIDEO_NAME}

and of course Replace VIDEO_NAME with your own Video Name.

Now you have to add a MyCode of that video in your templates and have to Evaluate it from ./inc/class_parser.php file.

DONE!
Done changes but it show "undefined" replace "aparat"
(2011-10-20, 11:58 AM)Jondan Wrote: [ -> ]Done changes but it show "undefined" replace "aparat"

I told you to edit language file too.
global.lang.php changed!

You can view it: [attachment=24472]

I have other request: Please view this topic, can you watch video?
http://iriboard.com/forum/showthread.php?tid=2350