MyBB Community Forums

Full Version: Release: My Youtube v1.3 [Update]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
I've try it and no problem at all...

you may want to download from the MyBB official plugin repository here:
http://mods.mybboard.net/view/toolbar-container
(2009-12-22, 10:47 AM)Azizone05 Wrote: [ -> ]Only the version 1.1 is working fine,

I followed your advise and you are right this version works correct.
I hope c0kr3x will change this version that you also can add a youtube video when you start a new thread.
for spinning and Azizone05:

I don't know what is your problem, since in my test all version working fine and the button appears when you: 1) Create New Thread, 2) New Reply, 3) Reply

Please give some information what OS do you running and what browser do you use.

thanks
I just spotted a problem, you didn't cap the width and height with in the plugin, any user can specify ridiculous width and height such as 5000x5000 and that will interfere with the theme. Try using "preg_replace_callback" instead of "preg_replace".

Example
function my_youtube_parse_message($post_message) {
   
   $pattern = "#\[my\-youtube\s+width=([0-9]{1,3}?)\s+height=([0-9]{1,3}?)\]http://(www\.)?youtube.com/watch\?v=(.*?)\[/my\-youtube\]#i";
   $post_message = preg_replace_callback($pattern, "my_youtube_replacement", $post_message);
   return $post_message;
}

function my_youtube_replacement($match){
	$width = $match[1];
	$height = $match[2];
	$youtubeCode = $match[4];
	if($width < 240 || $width > 860 || $height < 240 || $height > 600){
		$width = 425;
		$height = 334;
	}
	$replacement = '<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$youtubeCode.'&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'.$youtubeCode.'&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'.$width.'" height="'$height'"></embed></object>';
	return $replacement;
}
OK I give you all the information I can.
Before I start remember still 70% of people use MS Internet Explorer so their the script must work for sure.
I test all your version and on every version is the same error in Internet Explorer. Mozilla do not have this error.

You can create on different ways an answer.

1. NEW THREAD
2. REPLY
3. QUICK REPLY

1. New thread No button in IE (in mozilla it works fine)
You get the message error on page in IE as showed earlier in this thread.
see attach 1
2. Reply sometimes there is no button in IE (in mozilla it works fine)
You get the message error on page in IE as showed earlier in this thread.
see attach 2
3. Quick reply works fine
see attach 3

I use Internet Explorer 8.0

I being trying to get this plugin works for over a year now, I post on different forums (there also was a version for MBB 1.2) but nobody will or can help.
This plugin is important for my forum that why I regulary post about it.
(2009-12-25, 10:42 AM)spinning Wrote: [ -> ]Before I start remember still 70% of people use MS Internet Explorer so...

http://www.w3schools.com/browsers/browsers_stats.asp Rolleyes
(2009-12-25, 11:45 AM)spinning Wrote: [ -> ]http://en.wikipedia.org/wiki/Usage_share...b_browsers

Fair enough! Cool
@spinning
I have try version 1.3 using IE 6 and IE 7(Win XP SP 3) and no problem. Prior version 1.3 My Youtube has a problem with IE. And don't forget that v1.3 needs Toolbar Container Plugin, activate this plugin and everything should be ok.

@CJ Jackson,
thanks for your suggestion, I will note that in next release...
NO IN IE IT DO NOT WORK
I guess you have turned of the error notification in Internet Explorer.

Version 1.3 works 100% correctly for Mozila I tested that.
In IE 8.0 no button, no page container only a error (see new attachment).

Foutdetails webpagina

Gebruikersagent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Tijdstempel: Fri, 25 Dec 2009 17:10:56 UTC


Bericht: 'null' is leeg of geen object
Message: 'null' is emty or does have any object
Regel: 105
Line: 105
Teken: 19
Sign: 19
Code: 0
URI: http://www.ikf-forum.eu/newthread.php?fid=602

So I guess it has nothing to do with the way where you show the button because also with page container there is an error.

And there is a bug also on Mozilla.
There are 4 buttons in the edit post page.
Pages: 1 2 3 4 5 6