Advertisement:

Author Topic: YouTube BBC Tag (XHTML Compliant)  (Read 210458 times)

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #380 on: July 18, 2007, 03:58:59 AM »
hi, mm, when it would be ready for the smf 1-1-3 version...

great mod, greetz for the developer(s)



Works just fine with all versions of SMF 1.1*.

Offline Farmacija

  • Full Member
  • ***
  • Posts: 611
  • Gender: Male
  • Farmacija forum www.farmaceuti.com
    • Pharmacy forum
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #381 on: July 18, 2007, 08:34:28 AM »
Marlon
i've got some errors in error log caused by this mod

and i in post.croatian.php file don't have 790 lines?

You have not added the mod's 'YouTube' text variable to Post.croatian.php.  My mod is working as intended for you, it's just that you never modified it to your language.
which  'YouTube' text variable  i should add?

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #382 on: July 18, 2007, 08:50:07 AM »
which  'YouTube' text variable  i should add?

It should be $['txt']YouTube = 'YouTube';

Offline Farmacija

  • Full Member
  • ***
  • Posts: 611
  • Gender: Male
  • Farmacija forum www.farmaceuti.com
    • Pharmacy forum
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #383 on: July 18, 2007, 07:26:25 PM »
incorrect!
shoul be $txt[youtube]='youtube' !

Offline Darren996

  • Semi-Newbie
  • *
  • Posts: 42
    • SedonaView.com
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #384 on: July 22, 2007, 01:35:14 PM »
Hi,

I installed the mod everything went fine.  Nothing worked however.  I had to manually change everything, then it worked fine.

I have installed other mods with pacman no problem.

Thanks,
Darren

Offline HansCheska

  • Newbie
  • *
  • Posts: 2
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #385 on: July 22, 2007, 01:54:39 PM »
At first it didn't work for me or I shall say it does not auomatically add the $txt[youtube]='youtube'

Below code works for me (atleast automatically) for SMF 1.1.3

@Marlon i've just modified your mod.

Code: [Select]
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>title_here</id>
<version>1.0</version>
<homepage>authors_homege_here</homepage>
<file name="$sourcedir/Subs.php">
<operation>
<search position="before"><![CDATA[
array(
'tag' => 'hr',
'type' => 'closed',
'content' => '<hr />',
'block_level' => true,
),
]]></search>
<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><!-- 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>',
            ),
]]></add>
</operation>
</file>
<file name="$themedir/Post.template.php">
        <operation>
                <search position="before"><![CDATA[
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
]]></search>
                        <add><![CDATA[
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),
]]></add>
                </operation>
        </file>
        <file name="$themedir/languages/Modifications.english.php">
                <operation>
                        <search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[

//YouTube BBCode
$txt['youtube'] = 'YouTube';
]]></add>
                </operation>
        </file>
</modification>

Offline desimatrix

  • Semi-Newbie
  • *
  • Posts: 18
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #386 on: July 27, 2007, 09:11:35 PM »
At first it didn't work for me or I shall say it does not auomatically add the $txt[youtube]='youtube'

Below code works for me (atleast automatically) for SMF 1.1.3

@Marlon i've just modified your mod.

Code: [Select]
<?xml version="1.0"?>
<!DOCTYPE modification SYSTEM "http://www.simplemachines.org/xml/modification">
<modification xmlns="http://www.simplemachines.org/xml/modification" xmlns:smf="http://www.simplemachines.org/">
<id>title_here</id>
<version>1.0</version>
<homepage>authors_homege_here</homepage>
<file name="$sourcedir/Subs.php">
<operation>
<search position="before"><![CDATA[
array(
'tag' => 'hr',
'type' => 'closed',
'content' => '<hr />',
'block_level' => true,
),
]]></search>
<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><!-- 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>',
            ),
]]></add>
</operation>
</file>
<file name="$themedir/Post.template.php">
        <operation>
                <search position="before"><![CDATA[
'flash' => array('code' => 'flash', 'before' => '[flash=200,200]', 'after' => '[/flash]', 'description' => $txt[433]),
]]></search>
                        <add><![CDATA[
'youtube' => array('code' => 'youtube', 'before' => '[youtube=425,350]', 'after' => '[/youtube]', 'description' => $txt['youtube']),
]]></add>
                </operation>
        </file>
        <file name="$themedir/languages/Modifications.english.php">
                <operation>
                        <search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[

//YouTube BBCode
$txt['youtube'] = 'YouTube';
]]></add>
                </operation>
        </file>
</modification>

what to do with this code.. where does it go..?
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 VegasBoxers

  • Semi-Newbie
  • *
  • Posts: 67
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #387 on: July 28, 2007, 05:58:55 PM »
Nice mod!&nbsp; My site and theme is heavily customized, so the installer didn't do didley for me.&nbsp; But I manually moded the 3 files and put the youtube.gif file in the correct place, and it works great!

I always hated the idea of asking visitors to leave my site to view a video.&nbsp; Nice Mod!&nbsp; I love it!

VB

Offline Farmacija

  • Full Member
  • ***
  • Posts: 611
  • Gender: Male
  • Farmacija forum www.farmaceuti.com
    • Pharmacy forum
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #388 on: July 30, 2007, 11:41:27 AM »
new error from error log
Quote
8: Use of undefined constant YouTube - assumed 'YouTube'
Datoteka: /home/farmaceu/public_html/forum/Themes/default/languages/PersonalMessage.croatian.php (eval?)
Linija: 3
Quote
8: Undefined index: youtube
Datoteka: /home/farmaceu/public_html/forum/Themes/default/Post.template.php (eval?)
Linija: 790

Offline Haguen

  • Semi-Newbie
  • *
  • Posts: 24
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #389 on: July 30, 2007, 01:56:05 PM »
I installed correctly but it doesn't work. Because?
it is just the place where should appear the video, but doesn't appear
« Last Edit: July 30, 2007, 02:01:48 PM by Haguen »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #390 on: July 30, 2007, 02:03:45 PM »
You need to provide a little more detail...

you installed correctly:
How do you know that you installed correctly?

it doesn't work:
HOW does it not work? Does it not show the youtube button on the post form?   Does it show the button, but nothing happens when you click it? Does it load the code, but no video is displayed?

Are you running this on the SMF default theme? If not, did you bother to read any of the previous pages of this thread (or any other mod thread) that indicate that you will have to manually install portions of this (or nearly any other mod) if you are not using the default theme?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Haguen

  • Semi-Newbie
  • *
  • Posts: 24
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #391 on: July 30, 2007, 02:13:56 PM »
I use the theme default and the standard language&nbsp; &nbsp;
&nbsp; &nbsp;
It happens like this: the option in the post appears normal and the tags also but the video doesn't appear, it is just his space in the post.

version 1.1.3
« Last Edit: July 30, 2007, 02:21:01 PM by Haguen »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #392 on: July 30, 2007, 02:37:46 PM »
and what are you posting between the youtube tags?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Haguen

  • Semi-Newbie
  • *
  • Posts: 24
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #393 on: July 30, 2007, 05:05:40 PM »
like this:
[youtube=425,350]http://www.youtube.com/watch?v=A1c1G24GWDg[/youtube]

Offline kolt

  • Semi-Newbie
  • *
  • Posts: 42
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #394 on: July 30, 2007, 05:39:10 PM »
Hello I, install the cartele youtube inside my host include all "package-info" "yt_bbcxhtml_1.0" e "youtube.gif" inside of   /themes/default

after i remove "youtube.gif" and I put it in  /Themes

after I modify the code in post.template.php

but does't work, I don't see nothing

Any one can help me please.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #395 on: July 30, 2007, 05:50:30 PM »
like this:
[youtube=425,350]http://www.youtube.com/watch?v=A1c1G24GWDg[/youtube]

and *THAT* is your problem.
it needs to be:
[youtube=425,350]htA1c1G24GWDg[/youtube]
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline kolt

  • Semi-Newbie
  • *
  • Posts: 42
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #396 on: July 30, 2007, 06:12:52 PM »
Some one can help me please..

Offline Daniel Marquard

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
    • Tristition
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #397 on: July 31, 2007, 02:27:34 AM »
Hello I, install the cartele youtube inside my host include all "package-info" "yt_bbcxhtml_1.0" e "youtube.gif" inside of   /themes/default

after i remove "youtube.gif" and I put it in  /Themes

after I modify the code in post.template.php

but does't work, I don't see nothing

Any one can help me please.

Check the page's source code.  It just may be a problem on your end.

Offline Haguen

  • Semi-Newbie
  • *
  • Posts: 24
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #398 on: July 31, 2007, 07:25:16 AM »
like this:
[youtube=425,350]http://www.youtube.com/watch?v=A1c1G24GWDg[/youtube]

and *THAT* is your problem.
it needs to be:
[youtube=425,350]htA1c1G24GWDg[/youtube]
thanks

Offline cru

  • Jr. Member
  • **
  • Posts: 215
  • Gender: Male
  • Pinoy Ako!
Re: YouTube BBC Tag (XHTML Compliant)
« Reply #399 on: August 02, 2007, 11:35:03 AM »
this worked great on my 1.1.3! thanks!