News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

youtube links

Started by gary132, December 26, 2010, 07:42:04 AM

Previous topic - Next topic

gary132

Hi All i would like to know if someone could help me. on my forum i link to videos i post on youtube. is there any way to post rather than just a link like i have seen on other forums. where you can see the movie clip. slick it and it plays. rather than a link which pulls them away from site. any help appreciated. many thanks gary.


gary132

thanks trying to find the self installer

gary132

Looking i need help i think. im not sure how to install the mod and don't wan't to cause a mess on my site. any help would be appreciated friend. Gary.

Looking

It is not difficult. You do everything through Admin packages section. Have you looked at online docs?

If not, you can go to this section and post a request: http://www.simplemachines.org/community/index.php?board=50.0

Put it as either [Free] or [Paid].

gary132

Yeyyyyyyyyyyyyy got it woking great stuff. videos now play on site. excellent. have a great boxing day all. and thanks looking.

maclio

If you want to have youtube video embedded in your forum with BBCode, you don't have to install a mod with whole youtube profile and gallery and other unnecessary options.
The following method works with SMF 2.0 RC4 version if you put in your post the youtube code after "v=" from youtube link, between
tag:
- Modifications in "subs.php" (from "\Sources\" folder)
Before this code:
array(
'tag' => 'hr',
'type' => 'closed',
'content' => '<hr />',
'block_level' => true,
),


Add the following code:
                        array(
                        'tag' => 'youtube',
                                'type' => 'unparsed_content',
                                'content' => '<object type="application/x-shockwave-flash" width="425" height="344" 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>',
                        ),


- Also you have to modify your theme, the "Modifications.english.php" file from "\Themes\default\languages\" folder:
Before the end-code "?>" add the line-code below:
$txt['youtube'] = 'YouTube';

Don't forget to enable the "youtube" tag in your SMF forum: "Admin->Forum->Posts and Topics->Bulletin Board Code" it will appear between "html" and "hr" tags.

Now, if you want to have a "youtube" icon in your posting toolbar (the toolbar with Bold, Italic, Image, etc. icons) and your users just have to click the youtube icon for
code to appear, then follow these steps:
- Create a youtube icon named "youtube.gif" with width=23 pixels and height=22 pixels and copy it to "Themes\default\images\bbc\" folder and to "Themes\your_theme\images\bbc\" folder (if you have other theme).
- Modify the "Subs-Editor.php" file from "\Sources\" folder for Youtube icon to become visible in posting toolbar:
After the code:
array(
'image' => 'flash',
'code' => 'flash',
'before' => '[flash=200,200]',
'after' => '[/flash]',
'description' => $txt['flash']
),


Add the following code:
               array(
'image' => 'youtube',
'code' => 'youtube',
'before' => '[youtube]',
'after' => '[/youtube]',
'description' => $txt['youtube']
),


You can customize the code and put the youtube tag wherever you want into "enabled bbc tags" section and youtube icon position in the posting toolbar. You can also change the youtube window size.

And that's all, now you have the youtube video embedded into your forum! You can come to my new Maclio forum to see how this works in practice.

gary132

Thanks maclio whats your site addy.

maclio

You're  welcome. The website is maclio.com  ;)

Advertisement: