1 頁 (共 1 頁)

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

發表於 : 2003-06-11 22:48
動機不明
修改首頁版面管理員的顯示方式

前言:不曉得有沒有人已經有這方面的研究並發表了.... ^^||| (所以不敢用原創當主題....)
以下將以 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 : (借用 和平天使 的圖來用 ^^ )
圖檔

---------
相關請至 外掛問題區 討論 :)

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

發表於 : 2003-07-26 06:42
動感超人
之前動機大大發表了一篇調整首頁版面管理員的顯示方式
可以將版面管理員的顯示方式改為下拉式選單的方式。

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

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


開啟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]);
儲存所有檔案,完工

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

發表於 : 2003-07-27 04:23
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>
完成~