dz 6.0小修改:自动排版。
修改的文件:
viewthread.htm:帖子阅读页面模板,用于快速发帖时的自动排版。
post_newthread.htm:发新帖模板
post_newreply.htm:发新回复模板
post_editpost.htm:帖子编辑模板。
方法为:分别在以上四个模板页面(常用的也就这几个了)查找如下代码(每个文件可能不太一样,但ID基本上都是subject):
<input type="text" name="subject" id="subject" size="45" value="$subject" tabindex="3" />
在下面添加:
<input style="width: 120px; height: 24px;color:#FF3300;font-weight:bold;" type="button" value="帖子内容自动排版" name="body" title="系统自动排版"class=button onClick="javascript:format()">
<SCRIPT language=JavaScript type=text/JavaScript>
function format()
{
var body = "\n"+document.getElementById("posteditor_textarea").value;
body = body.replace(/ | /ig,"");
body = body.replace(/\r\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n/ig,"\n\n ");
body = body.replace("\n\n","");
body = body.replace(/\ /g,"");
body = body.replace(/\/g,"");
body = body.replace(/,/g,",");
body = body.replace(/;/g,";");
body = body.replace(/\?/g,"?");
document.getElementById("posteditor_textarea").value=body;
}
</script>
修改的文件:
viewthread.htm:帖子阅读页面模板,用于快速发帖时的自动排版。
post_newthread.htm:发新帖模板
post_newreply.htm:发新回复模板
post_editpost.htm:帖子编辑模板。
方法为:分别在以上四个模板页面(常用的也就这几个了)查找如下代码(每个文件可能不太一样,但ID基本上都是subject):
<input type="text" name="subject" id="subject" size="45" value="$subject" tabindex="3" />
在下面添加:
<input style="width: 120px; height: 24px;color:#FF3300;font-weight:bold;" type="button" value="帖子内容自动排版" name="body" title="系统自动排版"class=button onClick="javascript:format()">
<SCRIPT language=JavaScript type=text/JavaScript>
function format()
{
var body = "\n"+document.getElementById("posteditor_textarea").value;
body = body.replace(/ | /ig,"");
body = body.replace(/\r\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n\n/ig,"\n");
body = body.replace(/\n/ig,"\n\n ");
body = body.replace("\n\n","");
body = body.replace(/\ /g,"");
body = body.replace(/\/g,"");
body = body.replace(/,/g,",");
body = body.replace(/;/g,";");
body = body.replace(/\?/g,"?");
document.getElementById("posteditor_textarea").value=body;
}
</script>
主题列表显示头像(超简单
dz6.0数据自动备份







