森林之原
五月 24, 2012, 01:29:07 am *
歡迎光臨, 訪客. 請先 登入註冊一個帳號.

請輸入帳號, 密碼以及預計登入時間
新聞: CPG 1.4.3 繁體中文完成,請到 CPG 的版面下載。
 
   首頁   說明 搜尋 日曆 登入 註冊  
頁: [1]   向下
  寄送主題  |  列印  
作者 主題: 水平線區分頂置主題  (閱讀 4977 次)
0 會員 以及 2 訪客 正在閱讀本篇主題.
landry
訪客
« 於: 五月 17, 2005, 10:29:39 pm »

小弟試作了一個水平線區分頂置主題的佈景mod,可用於SMF1.0.3的default佈景,提供大家參考。
兩個檔案
package-info.xml 及 puttopline.mod
完成後打包壓縮成 puttopline.zip (不要包含資料夾)

package-info.xml
程式碼:
<?xml version="1.0"?>
<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This is a simplified package manifest for SMF packages.

ATTENTION: If you are trying to install this manually, you should try
the package manager.  If it will not work for you, please take a look
at the following for information on this format:
http://mods.simplemachines.org/docs/manual-install.php

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
<id>test:PutTopLine</id>
<name>水平線區分頂置主題</name>
<type>modification</type>
<version>1.0</version>
<install>
<readme type="inline">水平線區分頂置主題

注意: 若以下檔案及資料夾為可寫入,此模組將能正確地安裝! 安裝前請將以下檔案設定適當權限及備份.
1. 修改 ./Themes/default/MessageIndex.template.php
</readme>
<modification type="file" format="boardmod">puttopline.mod</modification>
</install>
<uninstall>
<readme type="inline">這將移除--水平線區分頂置主題--這個模組
</readme>

<modification type="file" format="boardmod" reverse="true">puttopline.mod</modification>
</uninstall>
</package-info>

 puttopline.mod
程式碼:
<id>
test:PutTopLine
</id>

<version>
1.0
</version>

<mod info>
水平線區分頂置主題
</mod info>

<author>
test
</author>

<homepage>
http://www.mysite.com
</homepage>

<edit file>
$themedir/MessageIndex.template.php
</edit file>
<search>
foreach ($context['topics'] as $topic)
{
</search>

<add after>
if (isset($previousTopicClass) && strpos($previousTopicClass, 'sticky') !== false && !$topic['is_sticky'])
echo '
<tr class="titlebg" style="font-size: 1ex;">
<td colspan="2"></td>
<td colspan="7" height="8"></td>
</tr>';
$previousTopicClass = $topic['class'];
</add after>
向版主檢舉   已記錄
Andrew::
魔,羯
*
離線 離線

文章: 217



個人網站
« 回覆文章 #1 於: 五月 17, 2005, 10:47:29 pm »

多謝提供你的外掛, 這裡可以讓你上傳zip檔, 有空的話打包一下吧. smiley01_042
向版主檢舉   已記錄

poiison
初學者
*
離線 離線

文章: 3


« 回覆文章 #2 於: 六月 11, 2005, 07:47:36 am »

我代壓~  但是語系我已轉到 UTF-8

[附件已被管理員刪除]
向版主檢舉   已記錄
頁: [1]   向上
  寄送主題  |  列印  
 
前往:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006, Simple Machines LLC Valid XHTML 1.0! Valid CSS!