<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta name="KingCMS" content="Site:kingcms.com;Author:Sin.CS" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="UBB代码转换" />
<meta name="description" content="UBB代码转换" />
<title>UBB代码转换</title>
<style>
<!--
table { font: 12px Tahoma, Verdana; color: #000000 }
.tableborder { background: #D6E0EF; border: 1px solid #698CC3 }
.header { font: 11px Tahoma, Verdana; color: #FFFFFF; font-weight: bold; background-color: #698CC3 }
textarea { font: 11px Tahoma, Verdana; color: #000000; font-weight: normal; background-color: #F8F8F8 }
-->
</style>
</head>
<body>
<table cellSpacing="0" cellPadding="8" width="98%" align="center" bgColor="#ffffff" border="0" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; font-family: Tahoma, Verdana; color: #000000" id="table1">
<tr>
<td>
<SCRIPT language=JavaScript>
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
//-->
</SCRIPT>
<SCRIPT language=JavaScript1.2>
function delnull()
{
var str=document.getElementById('text').value;
str=str.replace(/([\s]*\r\n[\s]*){2,}/gm,"\r\n");
document.getElementById('text').value=str;
}
function refix()
{
var str=document.getElementById('text').value;
str=str.replace(/([\s]*\r\n[\s]*){2,}/gm,"\r\n\r\n");
document.getElementById('text').value=str;
}
function url()
{
var str=document.getElementById('text').value;
str=str.replace(/^[ ]*(http:\/\/|^mms:\/\/|rtsp:\/\/|pnm:\/\/|ftp:\/\/|mmst:\/\/|mmsu:\/\/)([^\r\n]*)$/igm,"[url]$1$2[/url]");
document.getElementById('text').value=str;
}
function addbr()
{
var str=document.getElementById('text').value;
str=str.replace(/\r\n/gm,"\r\n\r\n");
document.getElementById('text').value=str;
}
function html_trans(str) {
str = str.replace(/\r/g,"");
str = str.replace(/on(load|click|dbclick|mouseover|mousedown|mouseup)="[^"]+"/ig,"");
str = str.replace(/<script[^>]*?>([\w\W]*?)<\/script>/ig,"");
if(set.filtrate.checked)
{
str = str.replace(/[^<]*<([^>]*?)>[^<]*/ig,"<$1>");
tm=window.textfield.value;
if(tm.length<1){
var arr;
arr=str.match(/<img[^>]+src=[" ]?([^"]+)[" ]?[^>]*>/ig);
tm=arr[0].replace(/<img[^>]+src=[" ]?([^"]+)[" ]?[^>]*>/ig,"$1")+"\"";
i=tm.search(/\/[^\/]+"/ig);
tm=tm.substr(0,i);
window.textfield.value=tm+"/";
}
if(tm.substr(tm.length-1,1)!="/") tm+="/";
var strtm="<img[^>]+src=[\"]?("+tm+"[^\"]+)[\"]?[^>]*>";
var re = new RegExp(strtm,"ig");
str = str.replace(re,"\n[img]$1[/img]\n");
}
else
{
if(set.stext.checked) str = str.replace(/[^<]*<([^>]*?)>[^<]*/ig,"<$1>");
if(!set.linka.checked) str = str.replace(/<a[^>]+href=[" ]?([^"]+)[" ]?[^>]*>(.*?)<\/a>/ig,"[url=$1]$2[/url]");
if(!set.font_color.checked&&!set.stext.checked)
str = str.replace(/<font([^>]+)color=([^ >]+)([^>]*)>(.*?)<\/font>/ig,"[color=$2]<font$1$3>$4</font>[/color]");
if(!set.font_size.checked&&!set.stext.checked)
str = str.replace(/<font([^>]+)size=([^ >]+)([^>]*)>(.*?)<\/font>/ig,"[size=$2]<font$1$3>$4</font>[/size]");
if(!set.font_face.checked&&!set.stext.checked)
str = str.replace(/<font[^>]+face=([^ >]+)[^>]*>(.*?)<\/font>/ig,"[font=$1]$2[/font]");
if(!set.img.checked) str = str.replace(/<img[^>]+src=[" ]?([^"]+)[" ]?[^>]*>/ig,"\n[img]$1[/img]\n");
if(!set.odj.checked){
//return str;
str = str.replace(/<object[^>]*classid=[" ]?clsid:D27CDB6E\-AE6D\-11cf\-96B8\-444553540000[" ]?[^>]*>(.*?)<param[^>]+name=[" ]?movie[" ]?[^>]+value=[" ]?([^"]+)[" ]?[^>]*>/ig,"\n[swf]$2[/swf]\n");
str = str.replace(/<embed[^>]*type=["]?application\/x\-shockwave\-flash["]?[^>]*src=[" ]?([^"|^ ]+)[" ]?[^>]*>/ig,"\n[swf]$1[/swf]\n");
str = str.replace(/<embed[^>]*src=["]?([^"|^ ]+)["]?[^>]*type=["]?application\/x\-shockwave\-flash["]?[^>]*>/ig,"\n[swf]$1[/swf]\n");
str = str.replace(/<object[^>]*classid=[" ]?clsid:CFCDAA03\-8BE4\-11cf\-B84B\-0020AFBBCCFA[" ]?[^>]*>.*<param[^>]+name="src"[^>]+value="([^"]+)">/ig,"\n[rm]$1[/rm]\n");
}
if(!set.font_b.checked&&!set.stext.checked){
str = str.replace(/<([\/]?)b>/ig,"[$1b]");
str = str.replace(/<([\/]?)strong>/ig,"[$1b]");}
if(!set.font_u.checked&&!set.stext.checked)
str = str.replace(/<([\/]?)u>/ig,"[$1u]");
if(!set.font_i.checked&&!set.stext.checked)
str = str.replace(/<([\/]?)i>/ig,"[$1i]");
str = str.replace(/ /g," ");
str = str.replace(/&/g,"&");
str = str.replace(/"/g,"\"");
str = str.replace(/</g,"<");
str = str.replace(/>/g,">");
}
str = str.replace(/<br>/ig,"\n");
str = str.replace(/<p[^>]*?>/ig,"\n\n");
str = str.replace(/<[^>]*?>/g,"");
str = str.replace(/\[url=([^\]]+)\]\n(\[img\]\1\[\/img\])\n\[\/url\]/g,"$2");
str = str.replace(/\n+/g,"\n");
return str;
}
function copycode(obj){
obj.select();
objcopy=obj.createTextRange();
objcopy.execCommand("Copy");
}
function trans(){
var str = "";
rtf.focus();
rtf.document.body.innerHTML = "";
rtf.document.execCommand("paste");
str = rtf.document.body.innerHTML;
if(str.length == 0) {
alert("剪贴版不存在超文本数据!");
return "";
}
return html_trans(str);
}
function preview(){
var prewin=window.open("","","");
prewin.document.write(rtf.document.body.innerHTML);
}
function zhen(str)
{
strfound=str.replace(/\\/ig,"
\\\\");
strfound=strfound.replace(/\[/ig,"\\[");
strfound=strfound.replace(/\]/ig,"\\]");
strfound=strfound.replace(/\{/ig,"\\{");
strfound=strfound.replace(/\}/ig,"\\}");
strfound=strfound.replace(/\|/ig,"\\|");
strfound=strfound.replace(/\//ig,"
\\/");
strfound=strfound.replace(/\^/ig,"\\^");
strfound=strfound.replace(/\./ig,"\\.");
strfound=strfound.replace(/\*/ig,"\\*");
strfound=strfound.replace(/\?/ig,"\\?");
strfound=strfound.replace(/\+/ig,"\\+");
return strfound;
}
function replace_star()
{
var str=document.getElementById('text').value;
if(!reg.checked)
strfound=zhen(find_text.value);
else
strfound=find_text.value;
var re = new RegExp(strfound,"ig");
str=str.replace(re,replace_text.value);
document.getElementById('text').value=str;
}
</SCRIPT>
<table style="border-collapse: collapse; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; font-family: Tahoma, Verdana; color: #000000" height="459" cellSpacing="0" cellPadding="0" width="645" align="center" border="0" id="table2">
<tr>
<td align="middle" width="100%">
<table class="tableborder" cellSpacing="0" cellPadding="0" width="99%" align="center" border="0" id="table3">
<tr class="header">
<td align="left" width="85%" height="25"> UBB代码转换-超级转贴圣手</td>
</tr>
<tr>
<td align="middle" bgColor="#f8f8f8">
<div align="center">
<textarea class="textarea" onbeforepaste="if(document.getElementById('x_paste').checked){window.clipboardData.setData('text',trans());this.focus();}" id="text" style="width: 640px; height: 230px" cols="100" name="S1" rows="1"></textarea>
<iframe id="rtf" style="width: 0px; height: 0px" marginWidth="0" marginHeight="0" scrolling="no" src="about:blank" name="I1">
</iframe></div>
<table class="tableborder" cellSpacing="1" width="640" align="center" border="0" id="table4">
<tr class="header">
<td width="25%">
<div align="left"><input style="width: 130px; height: 40px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="document.getElementById('text').value += trans();" type="button" value="追加转换剪贴板数据" name="button">
</div>
</td>
<td width="25%">
<p align="center">
<input style="width: 130px; height: 40px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="copycode(window.text)" type="button" value="将代码复制到剪贴板">
</td>
<td width="21%">
<div align="center">
<input style="width: 100px; height: 20px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="preview()" type="button" value=" 预 览 帖 子 " name="preview">
</div>
<div align="center">
<input style="width: 100px; height: 20px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="document.getElementById('text').value=''" type="button" value="清 空 内 容">
</div>
</td>
<td width="29%">
<table cellSpacing="0" cellPadding="0" width="100%" border="0" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; font-family: Tahoma, Verdana; color: #000000" id="table5">
<tr align="middle">
<td>
<div align="center">
<input title style="width: 80px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="url()" type="button" value="分析超链接" name="Submit1" pop="自动分析所有超链接,并转换成超链接格式
注意:超链接必须单独在一行中!">
</div>
</td>
<td>
<div align="center">
<input title style="width: 80px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="delnull()" type="button" value="清除空行" name="Submit2" pop="紧凑格式,删除所有空行">
</div>
</td>
</tr>
<tr align="middle">
<td>
<div align="center">
<input title style="width: 80px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="refix()" type="button" value="清除多余" name="Submit3" pop="清除多余的空行,保持最一个空行">
</div>
</td>
<td>
<div align="center">
<input title style="width: 80px; font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" onclick="addbr()" type="button" value="增加空行" name="Submit4" pop="为每一行(包括空行)增加一空行">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<form name="set">
<table height="40" cellSpacing="0" cellPadding="0" width="650" border="0" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; font-family: Tahoma, Verdana; color: #000000" id="table6">
<tr>
<td title width="13%" height="20" pop="转换的结果中将不含有图片信息">
<label for="img">
<input id="img" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C1" value="ON">屏蔽图片</label></td>
<td title="转换的结果中将不含有链接信息" width="14%">
<label for="linka">
<input id="linka" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C2" value="ON">屏蔽超链接</label></td>
<td title="转换的结果中将不含音频、视频、FLASH等信息" width="14%">
<label for="odj">
<input id="odj" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C3" value="ON">屏蔽对象</label></td>
<td title width="14%" pop="转换的结果中将不含文本信息,同时字体属性将被自动屏蔽">
<label for="stext">
<input id="stext" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C4" value="ON">屏蔽文字</label></td>
<td title width="14%" pop="为了方便帖子的阅读,强制把图片用空行隔开">
<label for="filtrate">
<input id="filtrate" onclick="if(this.checked)window.base_url.style.display='block';else window.base_url.style.display='none';" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C5" value="ON">启用图片过滤</label></td>
<td title="屏蔽所有定字体相关的属性" width="14%">
<label for="font">
<input id="font" onclick="font_color.checked=this.checked;font_size.checked=this.checked;font_face.checked=this.checked;font_b.checked=this.checked;font_i.checked=this.checked;font_u.checked=this.checked;" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C6" value="ON">屏蔽字体属性</label></td>
</tr>
<tr>
<td title pop="转换的结果中将不含有字体颜色信息">
<label for="font_color">
<input id="font_color" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C7" value="ON">屏蔽字体颜色</label></td>
<td title="转换的结果中将不含有字体尺寸信息">
<label for="font_size">
<input id="font_size" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C8" value="ON">屏蔽字体尺寸</label></td>
<td title="转换的结果中将不含有字体类型信息">
<label for="font_face">
<input id="font_face" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C9" value="ON">屏蔽字体类型</label></td>
<td title="转换的结果中将不含有粗体信息">
<label for="font_b">
<input id="font_b" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C10" value="ON">屏蔽粗体</label></td>
<td title pop="转换的结果中将不含有斜体信息">
<label for="font_i">
<input id="font_i" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C11" value="ON">屏蔽斜体</label></td>
<td title="转换的结果中将不含有下划线信息">
<label for="font_u">
<input id="font_u" type="checkbox" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8" name="C12" value="ON">屏蔽下划线</label></td>
</tr>
</table>
</form>
<table class="tableborder" borderColor="#efefef" cellSpacing="1" cellPadding="2" width="640" align="center" border="0" id="table7">
<tr>
<td align="middle" width="82%">查找文字<input id="find_text" size="40" name="find_text" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8">
<input onclick="set.reset();find_text.value='';replace_text.value='';window.textfield.value='';" type="button" value="全恢复默认" name="Submit5" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8">
</td>
<td align="middle" width="18%" rowSpan="2">
<label for="reg">
<input id="reg" type="checkbox" CHECKED value="1" name="reg" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8">
使用正则语法</label> </td>
</tr>
<tr>
<td align="middle">替换文字<input id="replace_text" size="40" name="replace_text" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8">
<input onclick="replace_star()" type="button" value=" 开始替换 " name="Submit" style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 11px; font-family: Tahoma, Verdana; color: #000000; background-color: #F8F8F8"></td>
</tr>
</table> </td>
</tr>
<tr>
<td> <b>使用说明:</b><br>
1.在网页中拖动鼠标选中你想要的图片或文字,然后鼠标右键“复制(C)”或按Ctrl+C。<br>
2.进入该页面,直接按下“追加转换剪贴板数据”。<br>
3.复制文本筐中的数据,按下“将代码复制到剪贴板”。<br>
4.进入论坛发贴页面,鼠标右键“粘贴(P)”或按Ctrl+V将帖子内容复制到帖子内容筐。
</td>
</tr>
</table>
<SCRIPT>
rtf.document.designMode="On";
</SCRIPT>
</td>
</tr>
</table> </td>
</tr>
</table>
<div id="count"></div><script src="/dll/count.asp?artid=&topicid="></script>
</body>
</html>