MyBB Community Forums
[How To?] Add an option for videos - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 General Support (https://community.mybb.com/forum-127.html)
+------ Thread: [How To?] Add an option for videos (/thread-106240.html)



Add an option for videos - M.Abbasi - 10-20-2011

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


RE: Add an option for videos - Yaldaram - 10-20-2011

Why not install a MyCode for it ?


RE: Add an option for videos - M.Abbasi - 10-20-2011

OK.
I am trying to use a mycode for this but how i can add an option for videos?


RE: Add an option for videos - Yaldaram - 10-20-2011

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!


RE: Add an option for videos - M.Abbasi - 10-20-2011

Done changes but it show "undefined" replace "aparat"


RE: Add an option for videos - Yaldaram - 10-20-2011

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

I told you to edit language file too.


RE: Add an option for videos - M.Abbasi - 10-20-2011

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