Advertisement:

Author Topic: A Friendly YouTube BBC XHMTL1.2  (Read 31685 times)

Offline GantMan

  • Newbie
  • *
  • Posts: 2
A Friendly YouTube BBC XHMTL1.2
« on: April 14, 2007, 10:49:46 PM »
Link to Mod

Augmentation of Marlon's mod. I found people kept pasting the ENTIRE link to the youtube page.
 
So I wrote up the RegEx to clean up the link and have it auto format to find the v= ID.

So now [youtube=425,350]http://youtube.com/watch?v=H69eCYcDcuQ[/youtube]
will turn itself into
[youtube=425,350]H69eCYcDcuQ[/youtube]

This, plus some cleanup suggestions from the community to allow for correct installation of the youtube GIF.

Complements of BleachEatingFreaks.com and mindwarppavilion.org

Offline cekcok

  • Semi-Newbie
  • *
  • Posts: 28
    • cekcok.com bebas dan santai
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #1 on: April 15, 2007, 10:29:49 AM »
hello,

i already upload this mode on my site but not working good

http://www.cekcok.com/index.php?topic=55.0  what wrong?

Offline Tick

  • Full Member
  • ***
  • Posts: 466
  • Tiny Portal Support Team
    • Tiny Portal Hosting
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #2 on: April 15, 2007, 10:50:16 AM »
Whats not working about it.  It looked fine to me.

Offline cekcok

  • Semi-Newbie
  • *
  • Posts: 28
    • cekcok.com bebas dan santai
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #3 on: April 15, 2007, 10:59:19 AM »
i see using IE 6 and youtube frame is brokens and the video not playing

Offline Tick

  • Full Member
  • ***
  • Posts: 466
  • Tiny Portal Support Team
    • Tiny Portal Hosting
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #4 on: April 15, 2007, 11:02:15 AM »
ok I see.  I was using firefox and it looked fine.

Offline Tick

  • Full Member
  • ***
  • Posts: 466
  • Tiny Portal Support Team
    • Tiny Portal Hosting
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #5 on: April 15, 2007, 11:05:22 AM »
Just checked it in IE and it looked fine too.

Offline Chris369

  • Semi-Newbie
  • *
  • Posts: 61
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #6 on: April 15, 2007, 02:29:18 PM »
Hi

I've just installed this but at the top of the forum I get this text ...

$txt['youtube'] = 'YouTube';

How do I get rid of that?

Link is www.psnfriends.net

Thanks in advance.

Offline Chris369

  • Semi-Newbie
  • *
  • Posts: 61
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #7 on: April 15, 2007, 02:56:44 PM »
hmm made the text go really big in IE7 as well.

I tried the old one (the Marlon one) and both problems were in that too :/

Offline Simplemachines Cowboy

  • Jr. Member
  • **
  • Posts: 354
  • KA-CLICK
    • The Open Range
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #8 on: April 15, 2007, 04:12:41 PM »
AWESOME!
Works perfectly.
My SMF forum: The Open Range

Offline cekcok

  • Semi-Newbie
  • *
  • Posts: 28
    • cekcok.com bebas dan santai
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #9 on: April 15, 2007, 05:06:07 PM »
well,

maybe my connection is too bad..btw Thank for this mod

awesome mod

Offline JeanYves

  • Newbie
  • *
  • Posts: 1
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #10 on: April 15, 2007, 07:25:15 PM »
very good this modification !
it is much more simple to clic the youtube url and just paste, rather the search the ID !
great !

and what about the same for dailymotion ?

thanks again, great job !

Offline AllMassive

  • Jr. Member
  • **
  • Posts: 144
  • Gender: Male
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #11 on: April 15, 2007, 08:16:14 PM »
THX !

Working fine with my SMF 1.1.2 .

Offline sjb

  • Newbie
  • *
  • Posts: 3
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #12 on: April 16, 2007, 06:17:11 PM »
I've edited line 22 to say this:

Code: [Select]
                'content' => '<object width="$2" height="$3"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" wmode="transparent" width="$2" height="$3"></embed></object><br><a href="http://www.youtube.com/v/$1">http://www.youtube.com/v/$1</a>',
So that now the link appears underneath the video, because I've been having a problem.

Y'see any of the members who are using FireFox 1.5 can't get it to work. Only Firefox 2.0... I'll paste some of the tihngs they've said:

Quote
It thinks the link to the vid and play button is elsewhere than where it's shown. You gotta do some rapid clicking around the video area til you finally get linked to the actual video.

Quote
When you move your mouse, that's the only time the finger cursor is shown, and it flickers.

I've tried recoding the thing so that the embed tag is identical to the youtube one (just with the relevant $1, $2 and $3 in place) but it's not made a difference. I wonder what in the world could be going wrong.
« Last Edit: April 16, 2007, 06:21:55 PM by sjb »

Offline cristianx

  • Semi-Newbie
  • *
  • Posts: 11
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #13 on: April 30, 2007, 05:25:16 PM »
it only works if I add the number 425,350 [youtube=425,350]http://youtube.com/watch?v=H69eCYcDcuQ[/youtube] which I'm not sure what is it!

Without this number and trying with the full URL does not work, can anyone help?

thanks

cristian

PS apart from thsi working fine on 1.1.2

Offline jploaiza

  • Newbie
  • *
  • Posts: 2
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #14 on: May 15, 2007, 10:05:13 PM »
hi all. the mod works fine to me, but i want to integrate the youtube.gif on another theme, and i don't know how i can do it!!

Please help, i already look the *.xml files, and i find the modification that the mod do to some files on the default theme, but in my theme, there is not the same files.... my theme now is mesh...


Thanks!!

Offline jploaiza

  • Newbie
  • *
  • Posts: 2
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #15 on: May 15, 2007, 10:34:48 PM »
¬¬ i got it... only i have to copy the youtube.gif image from Themes/default/images/bbc to Themes/mesh/images/bbc and thats it folks!!!

good work, now im happy!!

Offline glennk

  • Sr. Member
  • ****
  • Posts: 899
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #16 on: May 20, 2007, 06:26:31 PM »
I get the error mentioned above

at the top of the forum I get this text ...

$txt['youtube'] = 'YouTube';

and all my forum users are complaining of big text.

Offline tenderobject

  • Newbie
  • *
  • Posts: 6
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #17 on: May 21, 2007, 08:33:47 AM »
the mod is working on firefox and safari mac. i love it.. although wehn i checked it on Ie there is an error in the status bar.
dunno why..

i still have the mod that marlon made in my SMF. do i need to leave it there or unintall it as well?

thanks fofrr the mod

Offline neilbombd

  • Semi-Newbie
  • *
  • Posts: 90
  • Author Unknown
    • Cook'd and Bomb'd
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #18 on: May 23, 2007, 10:27:28 PM »
it only works if I add the number 425,350

Yes, I would like to get rid of the need for 425,350, is there any way to do this?  I tried editing the XML file to take out those numbers, but it didn't seem to do the trick.

Alternatively, it should also parse [youtube][/youtube], please.  I've just migrated from another board, and that's how all my links are.  Cheers.
« Last Edit: May 23, 2007, 11:08:34 PM by neilbombd »

Offline gilipter

  • Semi-Newbie
  • *
  • Posts: 16
    • 365.com.mk
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #19 on: May 24, 2007, 07:41:28 AM »
I have the Marion's mod working ok. I just want to update it with the new code that checks the URL (you know, the [youtube=425,350]http://youtube.com/watch?v=H69eCYcDcuQ[/youtube] thing). How should I do this?
Thanks!

Offline Fryz

  • Newbie
  • *
  • Posts: 1
  • Gender: Male
    • Spaß und Fun Board
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #20 on: May 28, 2007, 09:10:16 AM »
Hi

I've just installed this but at the top of the forum I get this text ...

$txt['youtube'] = 'YouTube';

How do I get rid of that?

Link is hxxp:www.psnfriends.net [nonactive]

Thanks in advance.

It's the same with me. Could you perhaps give me a tip how I could get rid of it?

hxxp:alkoven.al.funpic.de/ [nonactive]



hxxp:fryz.fr.funpic.de/4images/ [nonactive]


Air_Cooled_Nut

  • Guest
Forum Error logged!
« Reply #21 on: June 22, 2007, 03:30:51 PM »
This mod has been working fine for me and my users (SMF 1.1.2 and IE6, "Ancient and Rusted" theme).  I had to manually install it, of course.

When looking through my Forum Error log I saw a BUNCH of these:
Code: [Select]
8: Undefined index: youtube
File: /.../theddb/forums/Themes/default/languages/Post.english-utf8.php (main sub template - eval?)
Line: 780

What's this mean?  What's happening and how do I fix it?
« Last Edit: September 21, 2007, 01:10:42 AM by Air_Cooled_Nut »

Offline Matthew Schenker

  • Jr. Member
  • **
  • Posts: 396
  • Gender: Male
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #22 on: July 05, 2007, 11:52:07 AM »
This is an excellent modification!

I run a woodworking forum, and there are a lot of YouTube instructional videos out there that my members can use. It's great to be able to embed videos right in posts!

One question: does this eat up a lot of bandwidth? Or is it using the YouTube bandwidth?

Thanks!

Offline mark7144

  • Sophist Member
  • *****
  • Posts: 1,174
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #23 on: July 06, 2007, 07:56:14 AM »
May I ask in simple terms how the mod works? I'm curious to whether you'll need to update it frequently to keep up with YouTube's site.

I have the Marion's mod working ok. I just want to update it with the new code that checks the URL (you know, the [youtube=425,350]http://youtube.com/watch?v=H69eCYcDcuQ[/youtube] thing). How should I do this?
Thanks!
Open: Sources/Subs.php

Find: 'tag' => 'youtube',

Delete that array section and then simply replace with:

Code: [Select]
array(
        'tag' => 'youtube',
                'type' => 'unparsed_commas_content',
                'test' => '\d+,\d+\]',
                'content' => '<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://www.youtube.com/v/$1"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param></object><!-- Credz BleachEatingFreaks.com -->',
                'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
$pattern = \'/http:\/\/.+v=(.+)(&.+)*/i\';
if (preg_match($pattern, $data[0], $matches))
$data[0] = $matches[1];'),
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
),

One question: does this eat up a lot of bandwidth? Or is it using the YouTube bandwidth?
Nope, just YouTube.
« Last Edit: July 06, 2007, 07:58:37 AM by mark7144 »

Offline TriniTek

  • Newbie
  • *
  • Posts: 1
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #24 on: July 07, 2007, 10:05:28 AM »
I found a fix to the problem with the text $txt['youtube'] = 'YouTube'; appearing at the top of the page.

First open the Modifications.*.php file under Themes, Default, Languages.  Look for the tag and make sure ?> falls after $txt['youtube'] = 'YouTube';

Offline Matthew Schenker

  • Jr. Member
  • **
  • Posts: 396
  • Gender: Male
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #25 on: July 07, 2007, 01:31:41 PM »
mark7144,
Thanks for your help here!  This is an excellent modification.  I love that the video runs in the message, and also that readers can get all the YouTube menu options right in the message window.

Great work!

Offline desimatrix

  • Semi-Newbie
  • *
  • Posts: 18
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #26 on: July 16, 2007, 09:02:51 PM »
Hi

I've just installed this but at the top of the forum I get this text ...

$txt['youtube'] = 'YouTube';

How do I get rid of that?

Link is www.psnfriends.net [nofollow]

Thanks in advance.

I am having same problem.. and cant find detail solution on this.. can anyone help please.. thanks..
Hang Out Point -- Everything from Everywhere!! www.HangOutPoint.com [nofollow]

GameMania : One Site -- Countless Games!!  www.gamemania.co.nr [nofollow]

Project under construction : www.vrStupid.com [nofollow]

Get affliciated PM me for detail.

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #27 on: July 16, 2007, 09:52:42 PM »
Check your Modifications.english.php in your themes language directory and ensure that:

Code: [Select]
?>
...appears once only and at the end of the file on a line of its own...edit accordingly to make this so if needed.

Offline tonzi

  • Jr. Member
  • **
  • Posts: 163
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #28 on: July 17, 2007, 03:07:58 AM »
Check your Modifications.english.php in your themes language directory and ensure that:

Code: [Select]
?>
...appears once only and at the end of the file on a line of its own...edit accordingly to make this so if needed.

i tried this out but still it appears above and when i get rid of ?>
it gives me a template error

Offline tonzi

  • Jr. Member
  • **
  • Posts: 163
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #29 on: July 17, 2007, 03:18:46 AM »
damn i tried uninstalling this but $txt['youtube'] = 'YouTube';  remained on  my forum now its meesed help!!!

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #30 on: July 17, 2007, 05:11:36 AM »
Look at you Modifications.english.php file in the language directory of your theme. You should have:

Code: [Select]
?>
...shown once only and at the end of the file on a line of its own...edit to make this so.

 N.B. Your query suggests that you may have ignored fail reports when installing or uninstalling mods...don't. They are there for a reason and should not be ignored.

Offline tonzi

  • Jr. Member
  • **
  • Posts: 163
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #31 on: July 17, 2007, 07:57:18 AM »
but whenever i get rid of ?>
and placed it after $txt['youtube'] = 'YouTube';
i get a template parse error.

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #32 on: July 17, 2007, 10:23:34 AM »
Please note I didn't say "get rid of". You need to follow the directions I gave above exactly. I said:

Quote
Look at you Modifications.english.php file in the language directory of your theme. You should have:

Code: [Select]
?>
...shown once only and at the end of the file on a line of its own...edit to make this so.

« Last Edit: July 17, 2007, 10:56:12 AM by TrueSatan »

Offline tonzi

  • Jr. Member
  • **
  • Posts: 163
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #33 on: July 17, 2007, 10:36:46 AM »
yah works fine now. what i did is to get rid of this instead.
Code: [Select]
$txt['youtube'] = 'YouTube';"

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #34 on: July 17, 2007, 11:00:07 AM »
If that code is removed and the mod still works you must have installed it more than once. A single instance of the code you quote is required for the mod to work properly and, as stated above, the file must have the following line once only, at the end of the file, and on a line of its own:

Code: [Select]
?>

Offline desimatrix

  • Semi-Newbie
  • *
  • Posts: 18
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #35 on: July 18, 2007, 07:39:33 PM »
is it possible that developer of this mod modify this and update the mod so that people like me with no technical knowhow can have less difficulty...

or detail on what to do to get rid of that YouTube mark..
Hang Out Point -- Everything from Everywhere!! www.HangOutPoint.com [nofollow]

GameMania : One Site -- Countless Games!!  www.gamemania.co.nr [nofollow]

Project under construction : www.vrStupid.com [nofollow]

Get affliciated PM me for detail.

Offline Chantal Matar

  • Semi-Newbie
  • *
  • Posts: 63
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #36 on: August 10, 2007, 11:10:19 AM »
Hi guys, I have installed 2 different You Tube mods on my 1.1.3 forum (obviously not at the same time) they were both successful and I could upload videos, but they just don't play.

Why?

http://ps3smalltalk.com/index.php?topic=1052.new#new

Do I need to set permissions or anything like that?  I have looked everywhere.

Your advice please.   :)


Offline Ozz13

  • Newbie
  • *
  • Posts: 1
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #37 on: August 14, 2007, 02:26:47 PM »
can't get to work.. what is it we do with these 2 files?
yt_bbc_xhtml_1.2.xml
package-info.xml

Also, I'm having a problem with:
Language Integration

To make the mod work with your language, simply open Modifications.*.php, where * is the language you wish to integrate the mod into, and add $txt['youtube'] = 'YouTube'; to its own line in the file. I don't see this modification.english.php file anywhere

Theme Integration

Theme integration for this mod is fairly straight forward.  Simply copy youtube.gif from the default theme's images directory into your custom theme's images directory.  If your custom theme happens to use its own Post.template.php, open that template file and find (I don't see this post.template.php anywhere)

Should I create this .php files, adding the code below, and upload?  If so, which folder should I upload to?

Code:

         'flash' => array('code' => 'flash', 'before' => 'hxxp:', 'after' => ' [nonactive]', 'description' => $txt[433]),


Following that code, add:

Code:

         'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),
« Last Edit: August 14, 2007, 02:29:35 PM by Ozz13 »

Offline itsacoaster

  • Semi-Newbie
  • *
  • Posts: 33
Re: A Friendly YouTube BBC XHMTL1.2
« Reply #38 on: August 17, 2007, 01:06:12 AM »
All right, I've been trying to get it to work so that you don't have to specify the length and width.  I can't get it to work.  This is what I have so far:

array(
               
	
'tag' => 'youtube',
               
	
'type' => 'unparsed_content',
               
	
'content' => '<object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/$1">
<param name="movie" value="http://www.youtube.com/v/$1"></param>
<param name="wmode" value="transparent"></param></object>'
,
               
	
'validate' => create_function('&$tag, &$data, $disabled''
	
	
	
	
	
if (isset($disabled[\'url\']))
	
	
	
	
	
	
$tag[\'content\'] = \'$1\';
	
	
	
	
	
$pattern = \'/http:\/\/.+v=(.+)(&.+)*/i\';
	
	
	
	
	
if (preg_match($pattern, $data[0], $matches))
	
	
	
	
	
	
$data[0] = $matches[1];'
),
	
	
	
	
	
'disabled_content' => '<a href="$1" target="_blank">$1</a>',
            ),


I changed the content type and removed the 'test' parameter.

This returns an object box of the correct dimensions, but the regex isn't yanking out the video ID from the URL like it should, so I end up with a tag like:

<object type="application/x-shockwave-flash" width="425" height="350" data="http://www.youtube.com/v/http://youtube.com/watch?v=ZLsJyfN0ICU">

I didn't know the first thing about regexp until I started messing with it tonight, so I probably don't know what I'm doing. :P But perhaps it will spur someone to get an idea?