MyBB Community Forums

Full Version: 1.6 Video MyCode customisation
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I was wondering if I can add a new video site for the Video MyCode that MyBB 1.6 has built in.

I want to add a new site from wich I can post videos on my site using the video MyCode feature from MyBB 1.6, besides the ones that are allready there I want to add new one.

How can I do this?
Thank you in advance !
You'd need to edit ./jscripts/editor.js
I did that but when i go to the dropdown menu to choose my site it shows as undefined or smth, eventhough I added the language variable in the language file, it doesn't show the name of the site, it just shows undefined.

And when i add the link to the video I want, it just shows the [video=blabla]link[/video] but not the video, I even made the template in the admin cp under my theme/ungrouped templates.

Could you please be more specific? Thank you !
Or someone who allready made this, can you please tell me how you did it?
I've not really looked at it before so not 100% sure without going through it, what site are you trying to add?
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!
(2010-12-02, 09:35 AM)Yaldaram Wrote: [ -> ]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.

DONE!

This is exactly what I did, and it happened what I sayed on my second post, when I go make a new post or a new reply and go to the drop down menu, instead of the video name i get undefined, and also when i enter the video link, it just shows me the code not the video when I submit the post, keep in mind that i've made the template in ungrouped templates in my theme.
You have to add the code of that Video in ./inc/class_parser.php file as well. Then have to evaluate your template from that file.
(2010-12-02, 10:11 AM)Yaldaram Wrote: [ -> ]You have to add the code of that Video in ./inc/class_parser.php file as well. Then have to evaluate your template from that file.

Ok, thank you, this is what I was missing.