TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 103
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 97
  • Total: 97

Youtube mod and tp error

Started by mrdr, September 10, 2007, 02:29:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrdr

i've got this error in error log
8: Use of undefined constant YouTube - assumed 'YouTube'
Datoteka: /home/farmaceu/public_html/forum/Themes/default/languages/TPortal.croatian.php (eval?)
Linija: 3

where is the problem? :-\

IchBin

The problem is with youtube, which doesn't have anything to do with TinyPortal.

Svaha

Quote from: mrdr on September 10, 2007, 02:29:47 AM
i've got this error in error log
8: Use of undefined constant YouTube - assumed 'YouTube'
Datoteka: /home/farmaceu/public_html/forum/Themes/default/languages/TPortal.croatian.php (eval?)
Linija: 3

where is the problem? :-\

Did you apply the changes as mentioned in the readme file of the mod?

For instance :
QuoteLanguage 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.

mrdr


Svaha

Well, I don't have this error report, I did the modifications by hand because 'automatic' doesn't work on my testsite.
I used this mod :
<?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>Gant:YouTube BBC Tag (XHTML Compliant)</id>
<version>1.2</version>
<homepage>http://www.BleachEatingFreaks.com/</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="end"></search>
                        <add><![CDATA[
$txt['youtube'] = 'YouTube';
]]></add>
                </operation>
        </file>
</modification>

This website is proudly hosted on Crocweb Cloud Website Hosting.