News:

Wondering if this will always be free?  See why free is better.

Main Menu

[Deprecated, use Aeva] YouTube BBCode v2.6

Started by Nao 尚, September 27, 2007, 05:51:05 PM

Previous topic - Next topic

bostonb

Quote from: .brian on February 04, 2010, 02:56:54 PM
If anyone needs a simple solution...


array(
'tag' => 'youtube',
'before' => '<embed src="http://www.youtube.com/v/',
'after' => '&&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed>',
),


Start a new line on 997, paste this code and have your users only paste the Video ID. Sure it requires your users to have an IQ higher than 80 but at least you won't have any issues with URL's and the like.

Example:
[youtube]VIDEOID[/youtube]

Simple, basic, does the job.


sorry for the dumb question, but is the above all that is necessary to add youtube function to smf? what file do we modify at "line 997"? does this work on the latest version of smf?

Nao 尚

Yes it does, but you don't need it.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.


Nao 尚

1/ This is unrelated to your quote...

2/ You're trying to install v2.5, aren't you? On SMF2? Instead of v2.6? Does it really warrant a post to complain, when you could simply try the latest version?
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nier

#404
Quote from: Nao on February 08, 2010, 09:26:15 AM
1/ This is unrelated to your quote...

2/ You're trying to install v2.5, aren't you? On SMF2? Instead of v2.6? Does it really warrant a post to complain, when you could simply try the latest version?

Yes u were right, i installed the wrong one. Now i installed the good one: version 2.6

Now when i try in my post
it doesnt work.. also i upload the gif to my theme map i use Loner/images/bcc/youtube.gif  ... doesnt show too.. :(


EDIT: I cant even uninstall, i got errors :http://img694.imageshack.us/img694/1670/error1234.jpg

Nao 尚

That's what you get for installing YTBBC instead of the recommended Aeva :P

(Seriously, your forum is probably corrupted.)
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

waruna

Hye guys, I'm using SMF2.0 RC2. One quick question, can I just enable this youtube bbcode only at certain boards? Thanks in advance.
Trust of Lust

Nao 尚

Nope. This might end up in Aeva Media though, in the future... If I remember etc.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

bostonb

Quote from: Nao on February 08, 2010, 01:34:25 PM
That's what you get for installing YTBBC instead of the recommended Aeva :P

(Seriously, your forum is probably corrupted.)

is it safe to use the quick mod at line 997 that .brian posted? that is what I mean when I want extreme basic simplicity, I don't want any problems now or in future versions.

Nao 尚

Should be safe, I used a similar simple tag a few years ago, before I started using Aeva...
But you're really better off using something more evolved. Aeva 7.x is a very small mod and you can set it up the way you want.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nier

I just installed Aeva, but i was wondering if you can use now the tags
on the simple portal page? I wanna show youtube movies on portal page.

Arantor

You should be able to; IIRC the portal page is pushed via bbcode parser.

Nao 尚

Yeah, as long as a string is bbc_parsed, it'll show the videos.
You don't need to use the youtube bbcode if you're using Aeva. Just post the URL of the video.
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nier

Quote from: Nao on February 10, 2010, 06:17:34 AM
Yeah, as long as a string is bbc_parsed, it'll show the videos.
You don't need to use the youtube bbcode if you're using Aeva. Just post the URL of the video.

Btw i got now advertise on my website, since i installed Aeva..

Tiribulus

Quote from: Nier on February 10, 2010, 11:33:14 AM
Quote from: Nao on February 10, 2010, 06:17:34 AM
Yeah, as long as a string is bbc_parsed, it'll show the videos.
You don't need to use the youtube bbcode if you're using Aeva. Just post the URL of the video.

Btw i got now advertise on my website, since i installed Aeva..

I am guaranteeing you that if you installed AEVA from here or NAO's site, any ads you are getting are absolutely NOT from the mod. A couple hundred thousand people have downloaded and installed it along the way and it would have long ago been discredited not to even mention that it would never be approved in the first place if it generated ads. You have something else causing this.

Nao 尚

@Nier> If you're talking about the backlink, it's a very, very discreet (discrete?) link next to the other SMF links. Why would you even notice it?
I will not make any deals with you. I've resigned. I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.

Aeva Media rocks your life.

Nier

ok,,

But when i use the youtube movie on the site, its way to large. ( on diffrent configation like 1200x800 ) How can i change the width? I went to admin>aeva> and changed the width, didnt work..

edit : found it, nvm

Enjay

Hi, I'm trying to modify my message board to allow YouTube videos to be posted using this mod. 

The instructions aren't clear, where do I find:

         'flash' => array('code' => 'flash',

Also, I downloaded the .zip file and now I have a bunch of files I'm not sure what to do with?...

convert_ytplaylist_bbcode
install-1.1.x
install-2.0
languagestrings
package-info
readme
screenshot1
youtube.gif

Andiiieee[:

Quote from: Nao on September 27, 2007, 05:51:05 PM
Link to Mod


Compatibility
For SMF 1.1.x and SMF 2.x (MySQL only)

Introduction
Embed Youtube videos into posts with the use of [youtube][/youtube] bbcode.

It's the ultimate friendly YouTube mod for BBCode addicts, supporting various link formats (including Playlist links), safely and securely parsing the information for the piece of mind of forum admins.
It is, however, severely outdated when compared with its successor, Aeva, which has support for many more video websites and many more options.

So, if you want to be able to directly post YouTube URLs without tags and still have them embedded, I would recommend upgrading to Aeva or Aeva Media. Check its package file to find a conversion script inside it. It also converts tags from many other older mods such as [ytplaylist] or Google Video BBCode, etc.
Just extract the conversion script via FTP to your directory where SMF runs from. Put your forum in maintenance mode, and then point to it in your browser.

Features
o Adds a BBCode Button to Insert [youtube][/youtube] bbcode.
o Supports standard YouTube videos and YouTube playlists
- Standard: eg http://www.youtube.com/watch?v=FJ2UzCZiKgT
- Playlist: eg http://www.youtube.com/view_play_list?p=595A40209CB17411
o Supports links from YouTube's global site, and several localized sites (if you need support for all localised sites, use Aeva instead)
> Global (with or without www.) | Brasil | France | India | Ireland | Israel | Italia | Japan | Nederland | Polska | Espana | United Kingdom
> Australia | Hong Kong | Mexico | New Zealand | Deutsche | Canada | Russia | Taiwan | South Korea
o Supports various formats
- YouTube Page url
- Direct Embed url
- ID only
o Specify sizes (Optional)
- eg [youtube=425,350][/youtube]
- Defaulting to default YouTube sizes if not specified
- Size Protection to prevent embedding videos larger than 780px or less than 100px
o Safe from a security standpoint
- Properly validates/sanitizes/parses the video id before including it in the url
- Disables script access (allowScriptAccess="never")
o Alternative link and/or text provided for
- Invalid video id/links
- Printer friendly versions
- Disabled bbcoded
- Disabled flash
o Supports the following languages (both in ISO and UTF modes)
- English, British, Brazilian, French, German, Italian, Polish, Portuguese, Spanish, Swedish and Turkish.

Installation

Any previous versions of this mod need to be uninstalled prior to installing this version.

Installation slightly varies depending on SMF version.

SMF 1.1.1 to 1.1.4 & SMF 2.0 Beta 1
Installing the mod will only fully install the mod on the SMF Default Core Theme.
For all other themes which have a custom Post.template.php a manual edit will be required to add the BBCode Button.
(SMF 2.0 Beta 1 Only) You can choose to have the SMF Package Manager attempt* to perform the manual edit on all themes.

FIND
'flash' => array('code' => 'flash',
ADD BEFORE
'youtube' => array('code' => 'youtube', 'before' => '[youtube]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

You will also need to place a copy of the youtube.gif in each of your themes bbc image folders (eg Themes/{themename}/images/bbc)

If you're using a language different than the ones supported this mod (listed above), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)

FIND
?>
ADD BEFORE (and translate as necessary the language strings)
$txt['youtube'] = 'YouTube';
$txt['youtube_invalid'] = '#Invalid YouTube Link#';


SMF 2.0 Beta 2 / Beta 3 / Beta 3 Public / RC 1
Since SMF 2.0 Beta 2, the BBCode buttons have been moved from the templates and into the source files.
Therefore no manual edits will normally be required. Installing the mod will automatically install it on ALL themes.

However you will still need to place a copy of the youtube.gif in each of your themes bbc image folders (eg Themes/{themename}/images/bbc)

And if your using a language different than the ones supported this mod (listed above), then you will need to add the following to the Modifications.{language}.php for each theme (The language folder can be found eg Themes/{themename}/languages/)

FIND
?>
ADD BEFORE (and translate as necessary the language strings)
$txt['youtube'] = 'YouTube';
$txt['youtube_invalid'] = '#Invalid YouTube Link#';


Useful Links
Manual Installation Of Mods
How Do I Modify Files?

Support
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)

Changelog
2.6 - 5th February 2010
o Ownership given to Nao
o Updated readme and description
o Added French Language (translated by Nao)
o Added support for SMF 2.0 RC2 (eh, finally...?)
2.5 - 24th April 2009
o Ownership given to Runic
o Added Dutch Language (translated by Tom Te Selle)
2.4 - 5th October 2008
o Ensured compatible with SMF 2.0 Beta 4 and SMF 1.1.6
o Added YouTube FullScreen parameter (so player shows full screen button)
o Fixed encoded ampersands as &amp;
o Added Support for YouTube India (in), South Korea (kr) and Israel (il)
o Moved all language strings into a single file [languagestrings.xml] (save repetition) in the package
2.3 - 18th March 2008
o Ensured compatible with SMF 2.0 Beta 3 Public
o Added Polish language strings (Thanks to Nolt)
2.2 - 21st February 2008
o Added &rel=1 to all embed links as YouTube seesm to require it now.
2.1 - 31st January 2008
o Support for YouTube Playlist links
o Optimized preg and rewrote regex
o Changed max size supported to 780px
o Now builds the object based on browser

Awesome mod. Please check out my newest thread, http://www.simplemachines.org/community/index.php?topic=365898.msg2501457#msg2501457 and post there if you are interested. I would very much like to have you as an active participant!
A girl like me would be really happy with a forum like you! ;)

My SMF Forums:

Enjay

Quote from: Enjay on February 14, 2010, 10:15:14 PM
Hi, I'm trying to modify my message board to allow YouTube videos to be posted using this mod. 

The instructions aren't clear, where do I find:

         'flash' => array('code' => 'flash',

Also, I downloaded the .zip file and now I have a bunch of files I'm not sure what to do with?...

convert_ytplaylist_bbcode
install-1.1.x
install-2.0
languagestrings
package-info
readme
screenshot1
youtube.gif

OK I figured this out.  I'm using smf version 1.1.11  This is how I made this work for me.
Steps...

1) Download the zip file to your computer
2) Go into your forum and log on as administrator
3) On the first screen that appears, in the area that says, "Supports and Credits, Forum Maintenance, Themes and Layout" etc...  you want to select, "Packages".
4) On the next screen that appears, select the "Download Packages" tab.
5) In the "Upload a Package" area click on the "Browse" button and point it to the location of the zip folder you downloaded onto your computer.
6) Then click the "Upload" button.

I'm sure there's other ways to do it but this worked for me and I can now embed YouTube videos into posts on my Forum.

Advertisement: