<?php
/*********************************************
CPG Dragonfly™ CMS
********************************************
Copyright © 2004-2005 by CPG-Nuke Dev Team
http://dragonflycms.org
Dragonfly is released under the terms and conditions
of the GNU GPL version 2 or any later version
$Source: /cvs/html/language/english/bbcode.php,v $
$Revision: 9.10 $
$Author: nanocaiordo $
$Date: 2006/05/14 01:02:44 $
Encoding test: n-array summation ∑ latin ae w/ acute ǽ
*******************************************************/
if (!defined('CPG_NUKE')) { exit; }
global $smilies_close, $smilies_more, $smilies_desc, $color_desc, $font_desc, $bbcode_common;
$smilies_close = 'Close Window';
$smilies_more = 'More smilies';
$smilies_desc = array(
'Exclamation' => 'Exclamation',
'Question' => 'Question',
'Very Happy' => 'Very Happy',
'Smile' => 'Smile',
'Sad' => 'Sad',
'Surprised' => 'Surprised',
'Shocked' => 'Shocked',
'Confused' => 'Confused',
'Cool' => 'Cool',
'Laughing' => 'Laughing',
'Mad' => 'Mad',
'Razz' => 'Razz',
'Embarassed' => 'Embarassed',
'Crying or Very sad' => 'Crying or Very sad',
'Evil or Very Mad' => 'Evil or Very Mad',
'Twisted Evil' => 'Twisted Evil',
'Rolling Eyes' => 'Rolling Eyes',
'Wink' => 'Wink',
'Idea' => 'Idea',
'Arrow' => 'Arrow',
'Neutral' => 'Neutral',
'Mr. Green' => 'Mr. Green',
);
$color_desc = array(
'color' => 'Font color',
'Default' => 'Default',
'Dark Red' => 'Dark Red',
'Red' => 'Red',
'Orange' => 'Orange',
'Brown' => 'Brown',
'Yellow' => 'Yellow',
'Green' => 'Green',
'Olive' => 'Olive',
'Cyan' => 'Cyan',
'Blue' => 'Blue',
'Dark Blue' => 'Dark Blue',
'Indigo' => 'Indigo',
'Violet' => 'Violet',
'White' => 'White',
'Black' => 'Black',
);
$font_desc = array(
'size' => 'Font size',
'Tiny' => 'Tiny',
'Small' => 'Small',
'Normal' => 'Normal',
'Large' => 'Large',
'Huge' => 'Huge'
);
function BBCwmi(form, field, type) {
if (type == 'img') { var URL = prompt("Please enter image URL","http://");
} else if (type == 'youtube') { var URL = prompt("Please enter Youtube Video URL","http://youtube.com/watch\?v=");
} else if (type == 'gvideo') { var URL = prompt("Please enter gVideo URL","http://");
} else if (type == 'myvideo') { var URL = prompt("Please enter myVideo URL","http://");
} else { var URL = prompt("Enter the Email Address",""); }
if (URL == null) { return null; }
if (!URL) { return alert("Error : You didn't write the Address"); }
BBCwrite(form, field, '', "["+type+"]"+URL+"[/"+type+"]", true);
return null;
}
# [myvideo] and [/myvideo] code..
$patterns[] = "#\[myvideo\]http://(?:www\.)?myvideo.de/watch/(.*?)\[/myvideo\]#is";
$replacements[] = '
<!-- BEGIN myvideo -->
<object type="application/x-shockwave-flash" style="width:425px; height:350px" data="http://www.myvideo.de/movie/\\1">
<param name="movie" value="http://www.myvideo.de/movie/\\1" />
</object><br />
<!-- END myvideo -->';
# [youtube] and [/youtube] code..
$patterns[] = "#\[youtube\]http://(?:[A-Za-z]{2,3}\.)?youtube.com/watch\?v=([0-9A-Za-z-_]{11})[^[]*\[/youtube\]#is";
$replacements[] = '
<!-- BEGIN youtube -->
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/\\1.swf"></param>
<embed src="http://www.youtube.com/v/\\1.swf" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object><br />
<!-- END youtube -->';
# .youtube] auto code..
/*$patterns[] = "#\http://(?:\S+\.swf\b|\S+?youtube\S+)";
$replacements[] = '
<!-- BEGIN autoyoutube -->
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/\\1.swf"></param>
<embed src="http://www.youtube.com/v/\\1.swf" type="application/x-shockwave-flash" width="425" height="350"></embed>
</object>
<!-- END autoyoutube -->';
*/
# [gvideo] and [/gvideo] code..
$patterns[] = "#\[gvideo\]http://(?:www\.)?video\.google\.([A-Za-z]*)/videoplay\?docid=([0-9\-]*.\&*)[^[]*\[/gvideo\]#is";
$replacements[] = '
<!-- BEGIN gVideo -->
<embed id="VideoPlayback" src="http://video.google.com/googleplayer.swf?docid=\\2" style="width:425px;height:350px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash"> </embed>
<!-- END gVideo --><br />';
<img alt="'.$bbcode_common['youtube'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'youtube\')" onclick="BBCwmi(\''.$form.'\',\''.$field.'\',\'youtube\')" name="youtube" src="'.$bbbttns_path.'youtube.gif" />
<img alt="'.$bbcode_common['gvideo'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'gvideo\')" onclick="BBCwmi(\''.$form.'\',\''.$field.'\',\'gvideo\')" name="gvideo" src="'.$bbbttns_path.'gvideo.gif" />
<img alt="'.$bbcode_common['myvideo'][0].'" class="bbcbutton" onmouseover="helpline(\''.$form.'\',\''.$field.'\',\'myvideo\')" onclick="BBCwmi(\''.$form.'\',\''.$field.'\',\'myvideo\') name="myvideo" src="'.$bbbttns_path.'myvideo.gif" />
var gvideo_help="'. $bbcode_common['gvideo'][0].' '.$bbcode_common['gvideo'][1].'";
var myvideo_help="'. $bbcode_common['myvideo'][0].' '.$bbcode_common['myvideo'][1].'";
var youtube_help="'. $bbcode_common['youtube'][0].' '.$bbcode_common['youtube'][1].'";
'myvideo' => array('Myvideo URL:','[myvideo]file URL[/myvideo]'),
'gvideo' => array('Google Video URL:','[gvideo]file URL[/gvideo]'),
'youtube' => array('Youtube URL:','[youtube]http://youtube.com/watch/?v=000[/youtube]'),
Alle Zeitangaben sind in GMT + 1 Stunden