修改语言文件
BBS\templates\lang\zh-cn\dispbbs.lang.php
找到
,'tpl.str210' => '<b>个人贴子管理</b>:'
在其下面增加
,'tpl.str300' => '回复标题'
,'tpl.str300.1' => ' (回复时填写的标题,可为空)'
,'tpl.str301' => '上传附件'
语言文件修改完毕!!下面修改程序文件!!
BBS\templates\default\dispbbs.tpl.php
大约800行左右 查找
<form id="Dvform" name="Dvform" action="savepost.php?action=sre&method=fastreply&boardid={$TopicInfo['boardid']}&star={$GLOBALS['star']}&page={$GLOBALS['page']}{$fragment}"disabled_by_dv__onkeydown="ctlent();"disabled_by_dv__onsubmit="Dvbbs_CopyData('Body');" method="post">
在下面增加三行如下:
<input type="hidden" name="upfilerename" />
<input type="hidden" name="__upload_subdir" />
<input type="hidden" name="__upfileinfo" />
继续往下 7行,找到
<div class="th" style="margin-top : 20px;"><div style="float:left;"> {$lang['tpl.str182']}</div>{$gettitle}</div>
在下面增加几行 如下
<div id="dv_topic_1" class="postlary2" style="border-bottom:0px;display:none;">
<div class="postuserinfo" style="border-right: 1px solid #6E98C5;text-align:left;height:30px;line-height:30px;">
<b>{$lang['tpl.str300']}:</b>
</div>
<div class="postie" style="padding:0px;height:30px;text-align:left;background-color:#FFFFFF;"><input name="topic" id="topic" size="53" class="FormClass" value="" style="margin-top:3px;" /> {$lang['tpl.str300.1']}
</div>
</div>
<div id="dv_topic_2" class="postlary2" style="border-bottom:0px;display:none;">
<div class="postuserinfo" style="border-right: 1px solid #6E98C5;text-align:left;height:30px;line-height:30px;">
<b>{$lang['tpl.str301']}:</b>
</div>
<div class="postie" style="padding:0px;height:30px;text-align:left; "><iframe name="ad" frameborder="0" width="100%" height="28" scrolling="no" src="post_upload.php?boardid={$boardid}"></iframe>
</div>
</div>
然后继续向下找20多行左右,找到
<img src="images/post/icon_alipay.gif" alt="{$lang['tpl.str155']}" class="icoover"disabled_by_dv__onmouseover="this.className='icoovermouseover';"disabled_by_dv__onmouseout="this.className='icoover';"disabled_by_dv__onclick="Dvbbs_UserDialog('InsertAlipay');this.className='icoonclick';"/>
</div>
</div>
在两个</div>上面插入如下面红色代码!
<img src="images/post/icon_alipay.gif" alt="{$lang['tpl.str155']}" class="icoover"disabled_by_dv__onmouseover="this.className='icoovermouseover';"disabled_by_dv__onmouseout="this.className='icoover';"disabled_by_dv__onclick="Dvbbs_UserDialog('InsertAlipay');this.className='icoonclick';"/>
<div style="float:left;height:30px;line-height:30px;">
<input type="checkbox" id="dv_checkb1" name="dv_checkb1" style="margin:5px;"disabled_by_dv__onclick="if(this.checked){document.getElementById('dv_topic_1').style.display='';}else{document.getElementById('dv_topic_1').style.display='none';}" class="chkbox"><label for="dv_checkb1" style="cursor:hand">{$lang['tpl.str300']}</label></div>
<div style="float:left;height:30px;line-height:30px;">
<input type="checkbox" id="dv_checkb3" name="dv_checkb3" style="margin:5px;"disabled_by_dv__onclick="if(this.checked){document.getElementById('dv_topic_2').style.display='';}else{document.getElementById('dv_topic_2').style.display='none';}" class="chkbox"><label for="dv_checkb3" style="cursor:hand">{$lang['tpl.str301']}</label></div>
</div>
</div>
继续向下 找到
<form name="preview" action="preview.php?boardid={$TopicInfo['boardid']}" method="post" target="preview_page">
在其下面增加 (这是给上传图片预览用的)
<input type="hidden" name="upload_tmp_dir" value="">
<input type="hidden" name="uploadrepl" value="">
特别注意:论坛为了安全起见,把我发的代码里面的 onKeydown onsubmit onclick 等等前面都自动加上了 disabled_by_dv__,大家在查找代码的时候注意把 disabled_by_dv__ 删除......哎,论坛啥功能啊,安全不方便!
如果这样查看不方便,我提供TXT文本,大家可以查看文本说明!
点击浏览该文件
此主题相关图片如下:

补充:
如果想让大家点击后系统能记住显示状态,就需要增加记录cookies,请设置完毕上面的按照下面继续设置:
找到
function LoadMagicEmot(MMID,MagicID,topicid){
var cookiesstr=readCookie('mofaface_'+ topicid);
if (cookiesstr ==null){
createCookie('mofaface_'+ topicid,MagicID,30)
DispMagicEmot(MMID,MagicID,350,500)
}
}
</script>
,在</script>上一行增加
function LoadMagicEmot(MMID,MagicID,topicid){
var cookiesstr=readCookie('mofaface_'+ topicid);
if (cookiesstr ==null){
createCookie('mofaface_'+ topicid,MagicID,30)
DispMagicEmot(MMID,MagicID,350,500)
}
}
function Set_Cookie(name,value)
{
var Days = 365;
var exp = new Date();
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}
function get_Cookie(name)
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return null;
}
</script>
然后继续找到
<div style="float:left;height:30px;line-height:30px;">
<input type="checkbox" id="dv_checkb1" name="dv_checkb1" style="margin:5px;"disabled_by_dv__onclick="if(this.checked){document.getElementById('dv_topic_1').style.display='';}else{document.getElementById('dv_topic_1').style.display='none';}" class="chkbox"><label for="dv_checkb1" style="cursor:hand">{$lang['tpl.str300']}</label></div>
<div style="float:left;height:30px;line-height:30px;">
<input type="checkbox" id="dv_checkb3" name="dv_checkb3" style="margin:5px;"disabled_by_dv__onclick="if(this.checked){document.getElementById('dv_topic_2').style.display='';}else{document.getElementById('dv_topic_2').style.display='none';}" class="chkbox"><label for="dv_checkb3" style="cursor:hand">{$lang['tpl.str301']}</label></div>
改为
<div style="float:left;height:30px;line-height:30px;">
<input type="checkbox" id="dv_checkb1" name="dv_checkb1" style="margin:5px;"disabled_by_dv__onclick="if(this.checked){document.getElementById('dv_topic_1').style.display='';Set_Cookie('retitle','1');}else{document.getElementById('dv_topic_1').style.display='none';Set_Cookie('retitle','0');}" class="chkbox"><label for="dv_checkb1" style="cursor:hand">{$lang['tpl.str300']}</label></div>
<div style="float:left;height:30px;line-height:30px;">
<input type="checkbox" id="dv_checkb3" name="dv_checkb3" style="margin:5px;" checkeddisabled_by_dv__onclick="if(this.checked){document.getElementById('dv_topic_2').style.display='';Set_Cookie('reupload','1');}else{document.getElementById('dv_topic_2').style.display='none';Set_Cookie('reupload','0');}" class="chkbox"><label for="dv_checkb3" style="cursor:hand">{$lang['tpl.str301']}</label></div>
然后继续找到
<script language="Javascript" type="text/javascript">
var Dvbbs_bIsIE5=document.all;
var Dvbbs_Mode = 3;
if (Dvbbs_bIsIE5)
{var IframeID=frames["Dvbbs_Composition"];}
else
{
var IframeID=document.getElementById("Dvbbs_Composition").contentWindow;
}
function Gopreview()
{
document.preview.theBody.value=IframeID.document.body.innerHTML;
var popupWin = window.open('', 'preview_page', 'scrollbars=yes,width=750,height=450');
document.preview.submit()
}
Dvbbs_InitDocument('Body','gb2312');
</script>
改为
<script language="Javascript" type="text/javascript">
var Dvbbs_bIsIE5=document.all;
var Dvbbs_Mode = 3;
if (Dvbbs_bIsIE5)
{var IframeID=frames["Dvbbs_Composition"];}
else
{
var IframeID=document.getElementById("Dvbbs_Composition").contentWindow;
}
function Gopreview()
{
document.preview.theBody.value=IframeID.document.body.innerHTML;
var popupWin = window.open('', 'preview_page', 'scrollbars=yes,width=750,height=450');
document.preview.submit()
}
Dvbbs_InitDocument('Body','gb2312');
if(get_Cookie("retitle")=="1"){document.getElementById('dv_topic_1').style.display='';document.getElementById('dv_checkb1').checked=true;}
if(get_Cookie("reupload")=="1"){document.getElementById('dv_topic_2').style.display='';document.getElementById('dv_checkb3').checked=true;}
</script>
OK了!!!
大家可以下载文件查看!!!
再次补充:
修改完毕,上传文件可能会有JS脚本错误,请打开 BBS\templates\default\dispbbs.tpl.php 找到
<input style="margin:3px;" type="reset" name="Clear" value="{$lang['tpl.str185']}"disabled_by_dv__onclick="ClearReset()" class="button"/>
改为
<input style="margin:3px;" type="reset" name="Submit2" value="{$lang['tpl.str185']}"disabled_by_dv__onclick="ClearReset()" class="button"/>
即可!!!
话外音:
同样,又在帖子列表下面增加快速发布主题:如下:
此主题相关图片如下:

[此帖子已经被作者于2007-08-09 21:56:36编辑过]