[補充]版面管理員顯示方式+個人資料連結

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
動機不明
喝咖啡的綠皮猴
喝咖啡的綠皮猴
文章: 1179
註冊時間: 2002-03-06 20:37
來自: GOP (重啟)

[修改]調整首頁版面管理員的顯示方式

文章 動機不明 »

修改首頁版面管理員的顯示方式

前言:不曉得有沒有人已經有這方面的研究並發表了.... ^^||| (所以不敢用原創當主題....)
以下將以 subSliver 為例


修改檔案: index_body.tpl & index.php

說明:
版面管理員的變數是 {catrow.forumrow.MODERATORS}
版面管理員的字串是 {catrow.forumrow.L_MODERATOR}

最簡單的修改就是變顏色....

改成

代碼: 選擇全部

<font color="#D8BAB7"> {catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</font>
然後再隨便搬個位置,就會有不一樣的效果了!!

(好像太簡單了點 XD ),那好吧,接下來要講的才是重點....

開啟 index.php

搜尋

代碼: 選擇全部

$moderator_list = implode(', ', $forum_moderators[$forum_id]);
改為\r

代碼: 選擇全部

$moderator_list = implode('</option><option>', $forum_moderators[$forum_id]);

開啟 index_body.tpl

搜尋

代碼: 選擇全部

<th class="thCornerR" nowrap="nowrap"> {L_LASTPOST} </th>
改為\r

代碼: 選擇全部

	<th class="thTop" nowrap="nowrap"> {L_LASTPOST} </th>
	<th class="thCornerR" nowrap="nowrap"> {L_MODERATOR} </th>
找這一段\r

代碼: 選擇全部

  <!-- BEGIN catrow -->
  <tr> 
	<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
	<td class="rowpic" colspan="3" align="right"> </td>
  </tr>
改為 (改不改無所謂,個人喜好而已)

代碼: 選擇全部

  <!-- BEGIN catrow -->
  <tr> 
	<td class="catLeft" colspan="[color=red]4[/color]" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>
	<td class="rowpic" colspan="[color=red]2[/color]" align="right"> </td>
  </tr>
尋找這一段\r

代碼: 選擇全部

	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
後面加上(選單式)

代碼: 選擇全部

	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall"><select><option>{catrow.forumrow.MODERATORS}</option></select></span></td>

或者改成這樣 (一樣是選單式)

代碼: 選擇全部

	<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall"><select><option>{catrow.forumrow.L_MODERATOR}</option><option>------------</option><option>{catrow.forumrow.MODERATORS}</option></select></span></td>
DEMO : (借用 和平天使 的圖來用 ^^ )
圖檔

---------
相關請至 外掛問題區 討論 :)
非官方外掛問題區公告: [必看]請配合發問格式及明確主題發問(2006 02/24更新)
七點要求:
1. 發問前先搜尋,確定沒有重複後再發表
2. 主題要明確
3. 依照發問格式
4. 禁連續推文
5. 請盡量減少使用地方性語言
6. 解決問題後請修改第一篇主題,並感謝曾經幫過你的前輩們 ^^
7. 請不要將檔案內容完整貼出喔! 只要提供問題行及上下各五行就可以了
動感超人
竹貓忠實會員
竹貓忠實會員
文章: 485
註冊時間: 2003-02-09 14:06

[補充]版面管理員顯示方式+個人資料連結

文章 動感超人 »

之前動機大大發表了一篇調整首頁版面管理員的顯示方式
可以將版面管理員的顯示方式改為下拉式選單的方式。

但是,用過的朋友有沒有發現到:用滑鼠點選一位版主,不會連到該版主的個人資料
小弟研究了一個晚上,寫出這篇修改補充文章分享給大家。

執行以下步驟前請先使用調整首頁版面管理員的顯示方式


開啟templates/subsilver/index_body.tpl

尋找\r

代碼: 選擇全部

<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall"><select><option>{catrow.forumrow.L_MODERATOR}</option><option>------------</option><option>{catrow.forumrow.MODERATORS}</option></select></span></td>
改成

代碼: 選擇全部

<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"><form name=form><select name=site size=1 onChange="formHandler(this.form);this.selectedIndex=0"><option value="" selected>{catrow.forumrow.L_MODERATOR}</option><option value="">------------{catrow.forumrow.MODERATORS}</option></select></form></td>


開啟templates/subsilver/overall_header.tpl

尋找\r

代碼: 選擇全部

<head>
後面加上

代碼: 選擇全部

<script language="JavaScript">

<!-- Begin
function formHandler(form) {
var URL = form.site.options[form.site.selectedIndex].value;
popup = window.open(URL);
}
//  End -->
</script>


開啟index.php

尋找\r

代碼: 選擇全部

$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
改成

代碼: 選擇全部

$forum_moderators[$row['forum_id']][] = '<option value="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'];
尋找\r

代碼: 選擇全部

$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'] . '</a>';
改成

代碼: 選擇全部

$forum_moderators[$row['forum_id']][] = '<option value="' . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row['group_id']) . '">' . $row['group_name'];
最後再找到\r

代碼: 選擇全部

$moderator_list = implode('</option><option>', $forum_moderators[$forum_id]);
改成

代碼: 選擇全部

$moderator_list = implode('', $forum_moderators[$forum_id]);
儲存所有檔案,完工
無限期蒸發中
頭像
H.T.Demon
竹貓忠實會員
竹貓忠實會員
文章: 368
註冊時間: 2002-09-26 00:24
聯繫:

[推薦]版管+個人資料連結 方便瀏覽版

文章 H.T.Demon »

抱歉...整個主題實在不知道要怎麼取才好^^"
如果MOD版能讓一般會員回覆會省版面點(個人的小小建議)

感謝動感超人的教學\r
使我知道要從哪裡找^^"
語法是從 http://www.yesphp.net/forum/ 尋得

這個改法能讓觀看版主資料不會又跳出一個視窗:mrgreen:


開啟templates/subsilver/index_body.tpl
尋找

代碼: 選擇全部

<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"><span class="gensmall"><select><option>{catrow.forumrow.L_MODERATOR}</option><option>------------</option><option>{catrow.forumrow.MODERATORS}</option></select></span></td> 
改成

代碼: 選擇全部

<td class="row2" align="left" valign="middle" height="50" nowrap="nowrap"><form name=form><SELECT NAME="newLoc" onChange="jumpPage(this.form.newLoc)" maxlength="20"><option value="" selected>{catrow.forumrow.L_MODERATOR}</option><option value="">------------</option><option value="">{catrow.forumrow.MODERATORS}</option></select></form></td>

開啟templates/subsilver/overall_header.tpl
尋找

代碼: 選擇全部

<head> 
後面加上

代碼: 選擇全部

<script language="JavaScript"> 

<!--
function jumpPage(newLoc) {
newPage = newLoc.options[newLoc.selectedIndex].value
if (newPage != "") { window.location.href = newPage }
}
// -->
</script>
完成~
主題已鎖定

回到「非官方認證外掛」