1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
| 1. / 2. / ...
//an die entsprechenden stellen in /system/core/abcode.php einfügen
// video img relativ am anfang zu finden, einfach unter die vorhandenen blöcke setzen
// sind alle ähnlich aufgebaut
$img = cs_html_img($coop . 'video' . $ext,0,0,0,'video');
$var .= cs_abcode_button($name, 'video', '[video]', '[/video]', $img);
// funktion mit zu den anderen setzen
function cs_abcode_video($matches) {
if ($matches[0] == '[/video]' || empty($matches[1]) ) $return = '';
else {
$link = $matches[1];
// link umwandeln um auto url parse zu verhindern
$link = preg_replace("/http/", ":-http_replace-:",$link);
$link = preg_replace("/www/", ":-www_replace-:",$link);
$page = parse_url($matches[1]);//get page name
switch ($page['host']){ //seiten url auswerten
case 'www.youtube.com':
$link = preg_replace("/watch\?v\=/", "v/",$link); // Video ID aus link holen
$obj = '<object width="425" height="353"> <param name="movie" value="'.$link.'"> </param><param name="wmode" value="transparent"> </param> <embed src="'. $link .'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="353"> </embed> </object>'; // und in Stream link einsetzen
break;
case 'www.myvideo.de':
$link = preg_replace("/watch/", "movie/",$link);
$obj = '<object width="425" height="353"> <param name="movie" value="'.$link.'"> </param><param name="wmode" value="transparent"> </param> <embed src="'. $link .'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="353"> </embed> </object>';
break;
case 'www.unf-unf.de':
$link = preg_replace("/.html/",".flv",$link);
$link = preg_replace("/video/","video/clips",$link);
$obj = '<object width="425" height="350"><param name="movie" value=":-http_replace-:://:-www_replace-:.unf-unf.de/video/flvplayer.swf?file='.$link.'"> </param> <param name="wmode" value="transparent" ></param> <embed src=":-http_replace-:://:-www_replace-:.unf-unf.de/video/flvplayer.swf?file='.$link.'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"> </embed> </object>';
break;
case 'video.gmx.net':
$link = preg_replace("/watch/","movie",$link);
$obj = "<object style='width:470px;height:406px;' type='application/x-shockwave-flash' data='".$link."'> <param name='movie' value='".$link."'/> <param name='FlashVars' value='DESTSERVER=:-http_replace-:://video.gmx.net&LINKTEXT=GMX+Video'/> </object>";
break;
case 'videos.streetfire.net':
preg_match("/\:\-http_replace\-\:\:\/\/videos\.streetfire\.net\/video\/(.*?)\.htm/",$link,$erg);
$link = $erg[1];
$obj = '<object id="MediaPlayer1" height="422" width="500" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase=":-http_replace-:://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject"><param name="URL" value=":-http_replace-:://videos.streetfire.net/playlistbuilder/buildasx.ashx?fileid='.$link.'&t=3424b742-d9f4-4c82-95bb-999d00efaa5d"><param name="showcontrols" value="true"><param name="stretchtofit" value="true"><embed height="422" width="500" src=":-http_replace-:://videos.streetfire.net/playlistbuilder/buildasx.ashx?fileid='.$link.'&t=3424b742-d9f4-4c82-95bb-999d00efaa5d" showcontrols="true" stretchtofit="true" pluginspage=":-kibo:://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer1" autostart=0 type="application/x-mplayer2"></embed></object>';
break;
default:$obj = 'Diese Seite wird nicht unterstützt';break;
}
$return = $obj . '<br />' . 'Video Stream by: <a href="http://' .$page['host']. '" > ' . $page['host']. ' </a> <br /> Video Link: ' . $matches[1] .' <br />'; // Video + Fusnoten
}
return $return;
}
// call
$replace = preg_replace_callback("=\[video\](.*?)\[/video\]=si","cs_abcode_video",$replace);
//nach dem autoparse call einfügen um url wieder zusammenzusetzen für anzeige
// Video link decode
$replace = preg_replace("/:-http_replace-:/", "http",$replace);
$replace = preg_replace("/:-www_replace-:/", "www",$replace);
// video link decode ende |