列印

個人信息自動下拉顯示版主管轄區 FOR 6.0/6.1

個人信息自動下拉顯示版主管轄區 FOR 6.0/6.1

原帖:http://www.discuz.net/thread-912158-1-1.html

分類信息 - Discuz!插件發佈
插件名稱個人信息自動下拉顯示版主管轄區 FOR 6.0/6.1
適用版本Discuz!6.1
語言編碼GBK
插件作者肯得基
版權所屬肯得基
支持網站http://bbs.our-ic.com
插件簡介        在帖內個人信息欄中如果發/回帖人在擔任某分區或某版塊的版主,將會自動顯示管轄區域,當鼠標指向「管轄區」將下拉顯示具體版塊。(經測試6.0/6.1修改方法相同,都適用)




1.在 viewthread.php 找
複製內容到剪貼簿
代碼:
include template('viewthread');
上加
複製內容到剪貼簿
代碼:
//===========管轄區 6.0/6.1=========
        $query = $db->query("SELECT f.fid, f.name, f.type, ff.fid, ff.moderators FROM {$tablepre}forums f
                LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid WHERE f.type = 'group'");
        while($admintemp = $db->fetch_array($query)) {
                $temp = split("\t", $admintemp['moderators']);
                foreach($temp as $tempname) {
                        $tempname = trim($tempname);
                        if($tempname != "") {
                                $adminarray[$tempname] .= "<tr><td class=\"popupmenu_option\"><a href=\"index.php?gid=".$admintemp['fid']."\" target=\"_blank\">".$admintemp['name']."</a></td></tr>";
                        }
                }
        }

        $query = $db->query("SELECT f.fid, f.name, f.type, ff.fid, ff.moderators FROM {$tablepre}forums f
                LEFT JOIN {$tablepre}forumfields ff ON ff.fid=f.fid WHERE f.type = 'forum' OR type ='sub'");
        while($admintemp = $db->fetch_array($query)) {
                $temp = split("\t", $admintemp['moderators']);
                foreach($temp as $tempname) {
                        $tempname = trim($tempname);
                        if($tempname != "") {
                                $adminarray[$tempname] .= "<tr><td class=\"popupmenu_option\"><a href=\"forumdisplay.php?fid=".$admintemp['fid']."\" target=\"_blank\">".$admintemp['name']."</a></td></tr>";
                        }
                }
        }        
//===========管轄區 6.0/6.1=========
2.在 viewthread 模板

找 (可以根據自己需要靈活改變位置)
複製內容到剪貼簿
代碼:
<p><em>$post[authortitle]</em></p>
下加
複製內容到剪貼簿
代碼:
<!------管轄區 6.0/6.1------->
<!--{if !empty($adminarray[$post[username]])}-->
                        <p><span id="mod_{$post[pid]}" class="dropmenu" onmouseover="showMenu(this.id)"><b>管轄區</b></span></p>
                        <ul class="popupmenu_popup" id="mod_{$post[pid]}_menu" style="display: none">
                        <table cellpadding="4" cellspacing="0" border="0">
                        $adminarray[$post[username]]
                        </table></ul>
                <!--{/if}-->
<!------管轄區 6.0/6.1------->
======== 修改完畢 ======



Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

支持!找時間用看看

連這插件都有!頗實用的!
可以即時知道管理的區塊是位於哪裡

找時間測試看看囉
謝謝分享

Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

是否有BIG5的???
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP

引用:
原帖由 allen1126 於 2008-6-14 11:08 PM 發表
是否有BIG5的???
這個應該無關編碼... 而這個就是 Big-5 的!
Linux0911 Forum © 2004-2009 All Rights Reserved.

TOP



論壇聲明
  • 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
    如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
    請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!
最佳瀏覽解析度:不低於 1024 (最佳 1280 以上).(支援 IE 7, Mozilla Firefox, Safari, Chrome)
The Best Surfing Resolution: No Lower than 1024 (Best: above 1280).(IE 7, Mozilla Firefox, Safari, Chrome Supported)