Customizing SMF > Modifications and Packages
Ohara YouTube Embed
Suki:
Found the issue, open your Sources/OharaYTEmbedphp file, find:
'disabled_content' => '$1', and after that add:
'block_level' => true,
'test' => '(http://(?:www\.)?youtu(?:be\.com/watch\?v=|\.be/)(\w*)(&(amp;)?[\w\?=]*)?)[/youtube]'
it should be like this:
--- Code: --- $codes[] = array(
'tag' => 'youtube',
'type' => 'unparsed_content',
'content' => '$1',
'validate' => create_function('&$tag, &$data, $disabled', '
global $txt;
if (empty($data))
$data = $txt[\'OYTE_unvalid_link\'];
else
{
$data = trim(strtr($data, array(\'<br />\' => \'\')));
$data = OYTE_Main($data);
}
'),
'disabled_content' => '$1',
'block_level' => true,
'test' => '(http://(?:www\.)?youtu(?:be\.com/watch\?v=|\.be/)(\w*)(&(amp;)?[\w\?=]*)?)[/youtube]'
);
--- End code ---
That should fix the standalone tag.
I'll update the mod with the fix later tonight.
Suki:
New version 1.0.1:
Changelog
1.0.1 - Dic 28, 2011,
-Fix the youtube redirect page error if you use the initial tag alone: [youtube]
1.0 - Sep 25, 2011,
-Initial Release
To update just uninstall the olf verison and install the new one via the Package Manager.
MaXiForum.cz:
Hi,
what is the difference between this?
http://custom.simplemachines.org/mods/index.php?mod=936
:)
Suki:
this one:
written for 2.0.x
Uses hooks, less file edits
Does support the short youtube urls
The other one is marked as "deprecated" and I needed a simple mod for embed youtube videos so I built it.
Joomlamz:
Yes nice work
when Update puty portuguese files
thank you
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version