歡迎光臨, 訪客. 請先 登入註冊一個帳號.
三月 28, 2024, 03:22:08 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  外掛程式  |  在Cityslicker模版中,加入文章置頂plug-in的方法。 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 在Cityslicker模版中,加入文章置頂plug-in的方法。  (閱讀 7516 次)
quintin
新手見習
*
文章: 14


檢視個人資料 個人網站
« 於: 三月 10, 2006, 02:11:37 下午 »

之前我是使用Dabu模版,然後要用這個文章置頂外掛時,lss幫了很多忙。這次我想把模版換成cityslickr這一個,但是去看了main.template後,不知道該怎麼處理,因為我不懂這些語言怎麼安插進去.....這次還可能需要前輩的幫忙了,萬分的感謝....我把模版的內容貼在下面:

{include file="$blogtemplate/header.template"}
{include file="$blogtemplate/links.template"}
<!-- Loop Start -->
{if $showAll}
{if $showAll == 1 && $category}
<h1>{$locale->tr("posts")}: {$category->getName()}</h1>
{/if}
{foreach from=$posts item=post}

<!-- showing only the topic of the post, in case we have too many! -->
{assign var="postDate" value=$post->getDateObject()}

<p>{$locale->formatDate($postDate,"%Y.%B%d")} <a style="word-break:break-all" href="{$url->postPermalink($post)}">{$post->getTopic()}</a></p>
{/foreach}

{else}
{assign var="counter" value=1}
{foreach from=$posts item=post}
{include file="$blogtemplate/post.template"}
{assign var="counter" value="`$counter+1`"}
{/foreach}
{/if}
{include file="$blogtemplate/footer.template"}

已記錄
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #1 於: 三月 10, 2006, 06:10:17 下午 »

Cityslicker 模版的 main.template 差異不大啊?!

應該不難吧!比照你在 Dabu 模版的做法就行啦!

試不出來,再貼出來看看吧!

lss
已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
quintin
新手見習
*
文章: 14


檢視個人資料 個人網站
« 回覆文章 #2 於: 三月 17, 2006, 03:52:19 下午 »

雖然我看不懂語法,不過再我嘗試幾次後,所算把置頂文章的效果弄了出來,就在這邊把怎麼弄順便POST出來,雖然好像真的沒有什麼技術可言,不過希望可以當作是小貢獻~~謝謝lss的鼓勵阿~~

{include file="$blogtemplate/header.template"}
{include file="$blogtemplate/links.template"}
   <!-- Loop Start -->


****就是在這邊把lss的置頂文章語法插入即可****

   {if $showAll}
      {if $showAll == 1 && $category}
         <h1>{$locale->tr("posts")}: {$category->getName()}</h1>
      {/if}
      {foreach from=$posts item=post}

         <!-- showing only the topic of the post, in case we have too many! -->
         {assign var="postDate" value=$post->getDateObject()}
         
         <p>{$locale->formatDate($postDate,"%Y.%B%d")}?€<a style="word-break:break-all" href="{$url->postPermalink($post)}">{$post->getTopic()}</a></p>
      {/foreach}

   {else}
   {assign var="counter" value=1}
      {foreach from=$posts item=post}
         {include file="$blogtemplate/post.template"}
         {assign var="counter" value="`$counter+1`"}
      {/foreach}
   {/if}
{include file="$blogtemplate/footer.template"}
已記錄
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #3 於: 三月 17, 2006, 05:45:56 下午 »

hi quintin:

 (Y)好樣的 很棒 繼續加油啊! 微笑

lss
« 最後編輯時間: 三月 17, 2006, 08:59:21 下午 由 lss » 已記錄

沒找過 常見問題集或不知道 如何在 LifeType 中文開發論壇發問的人,恕不回答問題
頁: [1]
LifeType 中文開發論壇  |  開發  |  外掛程式  |  在Cityslicker模版中,加入文章置頂plug-in的方法。 « 上篇主題 下篇主題 »
    前往: