<?php
// Myvideo Video Plugin
$plugins->add_hook("parse_message", "myvideo");
function myvideo_info()
{
return array(
"name" => "MyVideo BBCode",
"description" => "Bindet Videos von MyVideo ein",
"website" => "http://www.profi-webmaster.com",
"author" => "Flo",
"authorsite" => "http://www.profi-webmaster.com",
"version" => "1.0",
);
}
function myvideo_activate()
{
}
function myvideo_deactivate()
{
}
function myvideo($message)
{
return preg_replace('#\[myvideo\](.*?)\[/myvideo\]#i', "<table border=\"1\" bordercolor = \"blue\" cellspacing=\"0\" cellpadding=\"0\" >
<tr>
<td class=\"thead\" align=\"center\"><strong><a href = \"$1\" title = \"Dieses Video bei MyVideo ansehen\" target = \"_new\">MyVideo</a></stong></td>
</tr>
<tr>
<td>
<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" width=\"470\" height=\"406\"><param name=\"movie\" value=\"http://www.myvideo.de/movie/$1\"></param><embed src=\"http://www.myvideo.de/movie/$1\" width=\"470\" height=\"406\" type=\"application/x-shockwave-flash\"></embed></object>
</td>
</tr>
</table>", $message);
}
// Feststellen, dass Benutzer angemeldet ist
if($mybb->user['uid'] != '4') {
// Code umwandeln
}
?>