貼內回覆 樓主留言 斑竹提示 For Discuz!6.0
http://www.discuz.net/thread-741824-1-1.html
ALTER TABLE `cdb_posts` ADD `onereply` CHAR( 80 ) NOT NULL ;
ALTER TABLE `cdb_posts` ADD `onereplyu` VARCHAR( 15 ) NOT NULL ;
ALTER TABLE `cdb_posts` ADD `onereplyt` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
將壓縮包內的onereply.htm模板傳到templates\default目錄。
編輯css.htm
查找notice li, 後加.onereply li 查找.wrap { width: {MAINTABLEWIDTH}; text-align: left; margin: 0 auto; }下加.onereply{ font-size: {MSGFONTSIZE}; border: 1px solid {NOTICEBORDER};background: {NOTICEBG} url(images/common/back.gif) no-repeat 0.5em0.7em; padding: 0.5em 1em 0.3em 2em; margin-bottom: {BOXSPACE}; color:{NOTICETEXT}; }
查找elseif($action == 'removerate' && $pid) {前加elseif($action == 'oreply') {
$query = $db->query("SELECT pid FROM {$tablepre}posts WHERE pid='$pid' and onereplyt<>0 limit 1");
if(!$onereply = $db->fetch_array($query)) {
if(!submitcheck('oreplysubmit')) {
include template('onereply');
}else{
$neworeply=trim($neworeply);
if($neworeply!=''){
$db->query("UPDATE {$tablepre}postsSET onereply='$neworeply', onereplyu='$discuz_user', onereplyt ='$timestamp' WHERE pid='$pid'");
!$inajax ? showmessage('post_onereply_succeed',"thread" class="t_tag">viewthread.php?tid=$tid&page=$page#pid$pid") : showmessage('ajax_post_onereply_succeed');
}else showmessage('post_onereply_error');
}
} else {
showmessage('post_onereply_disabled', dreferer());
}
}
查找$post['dateline'] = gmdate("$dateformat $timeformat", $post['dateline'] + $timeoffset * 3600);後加$post['onereplyt']= $post['onereplyt'] ? gmdate("$dateformat $timeformat", $post['onereplyt'] + $timeoffset * 3600) : '';
查找<div id="postmessage_$post[pid]" class="t_msgfont">$post[message]</div> 後加<!--{if $post[onereplyt]}-->
<div class="onereply" style="width:90%"><em>$post[onereplyt]</em> <ahref="space.php?action=viewpro&username=$post[onereplyu]"target="_blank">$post[onereplyu]</a> {lang reply}:$post[onereply] </div><!--{/if}-->查找<ahref="misc.php?action=rate&tid=$tid&pid=$post[pid]&page=$page"id="ajax_rate_$post[pid]" >{lang rate}</a>
<!--{/if}-->後加 <!--{if $discuz_uid == $thread['authorid'] || $forum['ismoderator'] }-->
<ahref="misc.php?action=oreply&tid=$tid&pid=$post[pid]&page=$page"id="ajax_oreply_$post[pid]" >{lang post_onereply}</a>
<!--{/if}-->- 4.4 語言包文件templates.lang.php 在默認模板下 用UE或者其他工具編輯,最好不要用記事本,以免出錯。
查找'post_tag' => '標籤(TAG)', 下面加'post_onereply' => '貼內回覆',
'post_onereply_me' => '我的回覆',
'post_onereply_su' => '發表貼內回覆',
'post_onereply_mo' => '請輸入你的回覆內容,建議不超過32個漢字。', - 4.5 語言包文件messages.lang.php 在默認模板下 用UE或者其他工具編輯,最好不要用記事本,以免出錯。
查找'ajax_thread_report_succeed' => '您的意見已經報告給版主和管理員。', 下面加'post_onereply_succeed' => '您的回覆已經保存到此貼內,現在將轉入主題頁面。',
'ajax_post_onereply_succeed' => '您的回覆已經提交,刷新即可瀏覽。',
'post_onereply_disabled' => '此貼已經有了貼內回覆,無法重複回覆。',
'post_onereply_error' => '您沒有填寫回覆內容,無法提交。', |