YouTube BBC Tag (XHTML Compliant)

Started by Daniel Marquard, January 03, 2007, 09:18:19 AM

Previous topic - Next topic

nicky6797

Haha it was pretty obvious, I just used the tag  [ c e n t e r ]

Thanks again

MrAnderson.cl

I've fixed part of the code for making easier the use of the tag... with this modification you can use [youtube=425,350] or just [youtube]

this part of the code
            <add><![CDATA[
            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>',
                'validate' => create_function('&$tag, &$data, $disabled', '
                    if (isset($disabled[\'url\']))
                        $tag[\'content\'] = \'$1\';'),
                'disabled_content' => '<a href="$1" target="_blank">$1</a>',
            ),
]]></add>


Must be replaced by
            <add><![CDATA[
            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>',
                'validate' => create_function('&$tag, &$data, $disabled', '
                    if (isset($disabled[\'url\']))
                        $tag[\'content\'] = \'$1\';'),
                'disabled_content' => '<a href="$1" target="_blank">$1</a>',
            ),
            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\';'),
                'disabled_content' => '<a href="$1" target="_blank">$1</a>',
            ),
]]></add>


This makes the tag work in one or another form... I'm still looking for making the content inside the tag work with either the long url provided by YouTube or just the 10 characters code that identify the video...

Greetings from Chile

StinkyLink

Awesome mod. :)

How hard would it be to allow only specific usergroups to post YouTube videos? I would love to have only moderators be able to posts vids.

Daniel Marquard

Quote from: StinkyLink on April 07, 2007, 11:53:38 AM
Awesome mod. :)

How hard would it be to allow only specific usergroups to post YouTube videos? I would love to have only moderators be able to posts vids.

I believe someone wrote a BBC permissions mod.  You should try searching for it.

MrAnderson.cl

Marlon... any way to make the mod work with the full or trimed url??

Greetings...

Caitlain

Quote from: MrAnderson.cl on April 07, 2007, 02:17:04 PM
Marlon... any way to make the mod work with the full or trimed url??

Greetings...

I, too, am curious about this.  I have 400 users I am going to migrate from a phpBB system, and they're used to using the full url.  It'll be a pain in the a$$ to have to tell eveyone to use just the video ID string.

bklynjay

#306
i just downloaded it on my forum  nyfuntime.com   and on the top of my forum   it now says  $txt['youtube'] = 'YouTube';       .... the videos work great  but i dont know why it says this.. can someone go there and take a look and if you happen to know how to fix please let me know.. thanks

NFM

Okay, first I uploaded it with the package manager...that didn't work for me.  I then went and uploaded it to a package parser and did all of the edits I was asked to do...and still...nothing.

SMF 1.1.2

Kindred

Quote from: bklynjay on April 12, 2007, 12:26:41 PM
i just downloaded it on my forum&nbsp; nyfuntime.com&nbsp; &nbsp;and on the top of my forum&nbsp; &nbsp;it now says&nbsp; $txt['youtube'] = 'YouTube';&nbsp; &nbsp; &nbsp; &nbsp;.... the videos work great&nbsp; but i dont know why it says this.. can someone go there and take a look and if you happen to know how to fix please let me know.. thanks

go to modifications.english.php and move the ?> to the end of the file...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

bklynjay

#309
Quote from: Kindred on April 12, 2007, 01:18:10 PM
Quote from: bklynjay on April 12, 2007, 12:26:41 PM
i just downloaded it on my forum&nbsp; nyfuntime.com&nbsp; &nbsp;and on the top of my forum&nbsp; &nbsp;it now says&nbsp; $txt['youtube'] = 'YouTube';&nbsp; &nbsp; &nbsp; &nbsp;.... the videos work great&nbsp; but i dont know why it says this.. can someone go there and take a look and if you happen to know how to fix please let me know.. thanks

go to modifications.english.php and move the ?> to the end of the file...


there are 2  modifications.english.php  one  has a ~  next to it  what one should i change? or do i change both?  thanks!

NFM

That second one is probably your servers auto backup version.

Daniel Marquard

Quote from: NFM on April 12, 2007, 02:11:10 PM
That second one is probably your servers auto backup version.

Indeed.  just modify Modifications.[language].php.

rickyb

Forgive me if I sound dumb, everyone seems to have success with this but, where the hell do I find the package manager ?  :-\
The route I took was `public html/packages` but no manager there to install it.

Where am I going wrong ?

Tick

in your forum go to the admin panel.  look on the left side you will see a tab for packages.   after you press that you will select the tab for download and install  and down at the bottom you will see where to upload the packages

sjb

Does anybody know what the problem with the code is that causes this to not work in Firefox 1.5? I am encouraging my users to upgrade to 2.0, and I understand that nobody wants to mod this to run on older browsers, but I wouldn't mind giving it a go myself, but I cant' seem to find what the problem is at all.

Daniel Marquard

Quote from: sjb on April 16, 2007, 06:29:43 PM
Does anybody know what the problem with the code is that causes this to not work in Firefox 1.5? I am encouraging my users to upgrade to 2.0, and I understand that nobody wants to mod this to run on older browsers, but I wouldn't mind giving it a go myself, but I cant' seem to find what the problem is at all.

As stated in previous posts, the code I use to embed YouTube videos into posts is different from the code YouTube provides in that my version is XHTML compliant.  The code used to embed these videos will remain the same.  This mod has in fact been tested with all newer versions of most major browsers.

Kindred

and yet... I can clearly show that over 90% of my users just see a white box where the video image should display.

The odd thing is that it works correctly for the user the first time they post or if we go in to EDIT the message and then save it.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Daniel Marquard

Quote from: Kindred on April 17, 2007, 08:21:50 AM
and yet... I can clearly show that over 90% of my users just see a white box where the video image should display.

The odd thing is that it works correctly for the user the first time they post or if we go in to EDIT the message and then save it.

Regarding that problem, Kindred, I've also noticed that issue on other computers with both same and different browser versions than mine.  For some reason, browsers don't like the position of the video, as SMF puts it within a div.  I'll have to look further into it.

tethead

i'm wondering how i might be able to install this mod without having to use the package installation tool?  the problem is that i cannot get the package installation tool to work properly.  i'd need an FTP account with root access on a remote Debian server, and i am not willing to do that just so i can install packages easier. 

so, from un-gzipping the mod, what can i do from a command line to install this in a 1.1.x SMF installation??

thanks!
week4paug.net - a website for all things PHiSH

Kindred

I do not believe there is any command line to install mods.

You can manually edit the files as indicated in the mod package...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: