News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

A Friendly YouTube BBC XHMTL1.2

Started by GantMan, April 14, 2007, 10:49:46 PM

Previous topic - Next topic

Fryz

Quote from: Chris369 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 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

#21
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:
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?

Matthew Schenker

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!

mark7144

#23
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.

Quote from: gilipter 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!
Open: Sources/Subs.php

Find: 'tag' => 'youtube',

Delete that array section and then simply replace with:

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>',
),


Quote from: Matthew Schenker on July 05, 2007, 11:52:07 AM
One question: does this eat up a lot of bandwidth? Or is it using the YouTube bandwidth?
Nope, just YouTube.

TriniTek

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';

Matthew Schenker

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!

desimatrix

Quote from: Chris369 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 [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.

TrueSatan

Check your Modifications.english.php in your themes language directory and ensure that:

?>

...appears once only and at the end of the file on a line of its own...edit accordingly to make this so if needed.

tonzi

Quote from: TrueSatan on July 16, 2007, 09:52:42 PM
Check your Modifications.english.php in your themes language directory and ensure that:

?>

...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

tonzi

damn i tried uninstalling this but $txt['youtube'] = 'YouTube';  remained on  my forum now its meesed help!!!

TrueSatan

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

?>

...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.

tonzi

but whenever i get rid of ?>
and placed it after $txt['youtube'] = 'YouTube';
i get a template parse error.

TrueSatan

#32
Please note I didn't say "get rid of". You need to follow the directions I gave above exactly. I said:

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

?>

...shown once only and at the end of the file on a line of its own...edit to make this so.


tonzi

yah works fine now. what i did is to get rid of this instead.
$txt['youtube'] = 'YouTube';"

TrueSatan

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:

?>

desimatrix

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.

Chantal Matar

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.   :)


Ozz13

#37
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:',%20'after'%20=>%20' [nonactive]', 'description' => $txt[433]),


Following that code, add:

Code:

         'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),

itsacoaster

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?

Advertisement: