把你的dpmain/module/bbscms/objfunc/bbcode.php的内容换成
复制内容到剪贴板
代码:
<?php
/*
You can add your own BBCode in this file, according to the pattern expression.
There are 3 types of BBCode that can be added here, each of them has searcharray and replacearray:
imgcode for multimedia BBCodes,
bbcode_regexp for normal BBCodes,
bbcode_str for basic BBCodes (Not recommended to modify).
*/
$searcharray['imgcode']=array(
"/\[img\]\s*([^\[]+?)\s*\[\/img\]/ies",
"/\[img=(\d{1,3})[x|\,](\d{1,3})\]\s*([^\[]+?)\s*\[\/img\]/ies",
"/\[swf\]\s*([^\[]+?)\s*\[\/swf\]/ies",
"/\[swf=(\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/swf\]/ies",
"/\[flash\]\s*([^\[]+?)\s*\[\/flash\]/ies",
"/\[flash=(\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/flash\]/ies",
"/\[wmv\]\s*(.+?)\s*\[\/wmv\]/ies",
"/\[wmv=(\d+?)[x|\,](\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/wmv\]/ies",
"/\[mp3\]\s*(.+?)\s*\[\/mp3\]/ies",
"/\[rm\]\s*(.+?)\s*\[\/rm\]/ies",
"/\[rm=(\d+?)[x|\,](\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/rm\]/ies",
"/\[flash=(\d+?)[x|\,](\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/flash\]/ies",
);
$replacearray['imgcode']=array(
"bbcodeurl('\\1', '<img src=\"%s\" border=\"0\" onload=\"if(this.width>510) {this.resized=true; this.width=510; this.alt=\'".$l_mod_fore['viewfullsizepic']."\';}\" onmouseover=\"if(this.resized) this.style.cursor=\'hand\';\" onclick=\"if(this.resized) {window.open(this.src);}\">')",
"bbcodeurl('\\3', '<img width=\"\\1\" height=\"\\2\" src=\"%s\" border=\"0\" onload=\"if(this.width>510) {this.resized=true; this.width=510; this.alt=\'".$l_mod_fore['viewfullsizepic']."\';}\" onmouseover=\"if(this.resized) this.style.cursor=\'hand\';\" onclick=\"if(this.resized) {window.open(this.src);}\">')",
"bbcodeurl('\\1', '<embed width=\"360\" height=\"300\" src=\"%s\" type=\"application/x-shockwave-flash\"></embed>
')",
"bbcodeurl('\\3', '<embed width=\"\\1\" height=\"\\2\" src=\"%s\" type=\"application/x-shockwave-flash\"></embed>
')",
"bbcodeurl('\\1', '<embed width=\"360\" height=\"300\" src=\"%s\" type=\"application/x-shockwave-flash\"></embed>
')",
"bbcodeurl('\\3', '<embed width=\"\\1\" height=\"\\2\" src=\"%s\" type=\"application/x-shockwave-flash\"></embed>
')",
"bbcodeurl('\\1', '
<object align=\"middle\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" class=\"OBJECT\" id=\"MediaPlayer\" width=\"360\" height=\"300\" ><PARAM NAME=\"AutoStart\" VALUE=\"3\" ><param name=\"enableContextMenu\" value=\"0\"><param name=\"ShowStatusBar\" value=\"-1\"><param name=\"Filename\" value=\"%s\"><embed type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" flename=\"mp\" src=\"%s\" width=\"360\" height=\"300\"></embed></object>')",
"bbcodeurl('\\4', '
<object align=\"middle\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" class=\"OBJECT\" id=\"MediaPlayer\" width=\"\\1\" height=\"\\2\" ><PARAM NAME=\"AutoStart\" VALUE=\"\\3\" ><param name=\"ShowStatusBar\" value=\"-1\"><param name=\"enableContextMenu\" value=\"0\"><param name=\"Filename\" value=\"%s\"><embed type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" width=\"\\1\" height=\"\\2\"></embed></object>')",
"bbcodeurl('\\1', '<object align=\"middle\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" class=\"OBJECT\" id=\"MediaPlayer\" width=\"480\" height=\"68\" ><PARAM NAME=\"AutoStart\" VALUE=\"3\" ><param name=\"enableContextMenu\" value=\"0\"><param name=\"ShowStatusBar\" value=\"-1\"><param name=\"Filename\" value=\"%s\"><embed type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" flename=\"mp\" src=\"%s\" width=\"480\" height=\"68\"></embed></object>')",
"bbcodeurl('\\1', '
<object classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" id=\"rmplayer\" width=\"360\" height=\"300\" viewastext><param name=\"Autostart\" value=\"3\"><param name=\"CONTROLS\" value=\"ImageWindow\"><param name=\"enableContextMenu\" value=\"0\"><param name=\"CONSOLE\" value=\"_master\"><param name=\"LOOP\" value=\"-1\"><param name=\"CENTER\" value=\"0\"></object>
<object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width=360 VIEWASTEXT><param name=\"_ExtentX\" value=\"18256\"><param name=\"_ExtentY\" value=\"794\"><param name=\"Autostart\" value=\"3\"><param name=\"LOOP\" value=\"0\"><param name=\"CENTER\" value=\"0\"><param name=\"BACKGROUNDCOLOR\" value=\"#000000\"><param name=\"SRC\" value=\"%s\"></object>')",
"bbcodeurl('\\4', '
<object width=\"\\1\" height=\"\\2\" classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" id=\"rmplayer\" viewastext><param name=\"Autostart\" value=\"\\3\"><param name=\"CONTROLS\" value=\"ImageWindow\"><param name=\"enableContextMenu\" value=\"0\"><param name=\"CONSOLE\" value=\"_master\"><param name=\"LOOP\" value=\"-1\"><param name=\"CENTER\" value=\"0\"></object>
<object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width=\"\\1\" VIEWASTEXT><param name=\"_ExtentX\" value=\"18256\"><param name=\"_ExtentY\" value=\"794\"><param name=\"Autostart\" value=\"\\3\"><param name=\"LOOP\" value=\"-1\"><param name=\"CENTER\" value=\"0\"><param name=\"SRC\" value=\"%s\"></object>')",
"bbcodeurl('\\4', '<embed width=\"\\1\" height=\"\\2\" src=\"%s\" type=\"application/x-shockwave-flash\"></embed>
')",
);
$searcharray['bbcode_regexp']=array(
"/\s*\[quote\][\n\r]*(.+?)[\n\r]*\[\/quote\]\s*/is",
"/\s*\[code\](.+?)\[\/code\]\s*/is",
"/(\[box=(#[0-9A-F]{6}|[a-z]+)\])[\n\r]*(.+?)[\n\r]*(\[\/box\])/is",
"/\[url\]\s*(www.|https?:\/\/|ftp:\/\/|gopher:\/\/|news:\/\/|telnet:\/\/|rtsp:\/\/|mms:\/\/){1}([^\[\"']+?)\s*\[\/url\]/ie",
"/\[url=www.([^\[\"']+?)\](.+?)\[\/url\]/is",
"/\[url=(https?|ftp|gopher|news|telnet|rtsp|mms){1}:\/\/([^\[\"']+?)\](.+?)\[\/url\]/is",
"/\[email\]\s*([A-Za-z0-9\-_.]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\s*\[\/email\]/i",
"/\[email=([A-Za-z0-9\-_.]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\](.+?)\[\/email\]/is",
"/\[color=([#0-9a-zA-Z]{3,10})\]/i",
"/\[size=([\-0-9]{1,2})\]/i",
"/\[font=([^\[]+?)\]/i",
"/\[align=(left|right|center)\]/i",
"/\[center\]/i",
"/\[backcolor=([#0-9a-z]{1,10})\](.*?)\[\/backcolor\]/is",
"/\[glow=(\d+)\,([0-9a-zA-Z]+?)\,(\d+)\](.+?)\[\/glow\]/is",
"/\[float=(left|right)\]/i",
"/\[size=(\d+(\.\d+)?(px|pt|in|cm|mm|pc|em|ex|%)+?)\]/i",
);
$replacearray['bbcode_regexp']=array(
"
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>  ".$l_mod_fore['quote'].":</td></tr><tr><td><table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"10\" class=\"BoxBorder\"><tr><td width=\"100%\" class=\"BoxBackground\" style=\"word-break:break-all\">\\1</td></tr></table></td></tr></table>
",
"
<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>  ".$l_mod_fore['code']."  <a href=\"javascript:;\" onclick=\"var rng=document.body.createTextRange(); rng.moveToElementText(this); rng.scrollIntoView(); rng.select(); rng.execCommand(\"Copy\"); rng.collapse(false);\">[Copy]</a>:</td></tr><tr><td><table border=\"0\" width=\"100%\" cellspacing=\"1\" cellpadding=\"10\" class=\"BoxBorder\"><tr><td width=\"100%\" class=\"BoxBackground\" style=\"word-break:break-all\">\\1</td></tr></table></td></tr></table>
",
"<blockquote style=\"background-color: \\2 ;\">\\3</blockquote>",
"cuturl('\\1\\2')",
"<a href=\"http://www.\\1\" target=\"_blank\">\\2</a>",
"<a href=\"\\1://\\2\" target=\"_blank\">\\3</a>",
"<a href=\"mailto:\\1@\\2\">\\1@\\2</a>",
"<a href=\"mailto:\\1@\\2\">\\3</a>",
"<font color=\"\\1\">",
"<font size=\"\\1\">",
"<font face=\"\\1\">",
"<p align=\"\\1\">",
"<p align=\"center\">",
"<span style=\"background-color:\\1\">\\2</span>",
"<div style=\"width:\\1px;filter:glow(color=\\2,strength=\\3);\">\\4</div>",
"<span style=\"float: \\1;\">",
"<font style=\"font-size: \\1\">",
);
$searcharray['bbcode_str']=array('[/color]','[/size]','[/font]','[/align]','[b]','[/b]','[i]','[/i]','[u]','[/u]','[list]','[list=1]','[list=a]','[list=A]','[*]','[/list]','[/center]','[hr]','[indent]','[/indent]','[/float]');
$replacearray['bbcode_str']=array('</font>','</font>','</font>','</p>','<b>','</b>','<i>','</i>','<u>','</u>','<ul>','<oltype="1">','<oltype="a">','<oltype="A">','<li>','</ul></ol>','</p>','<hr />','<blockquote>','</blockquote>','</span>');
?>