歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 29, 2024, 09:55:49 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  支援  |  使用與操作  |  迴響的編號問題 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 迴響的編號問題  (閱讀 7202 次)
sunkit
初級會員
**
文章: 79


檢視個人資料
« 於: 八月 11, 2005, 03:27:09 下午 »

在plog1.0.1中是否內置了迴響編號?

我試過將迴響排列改做"新的在前",編號照樣是1234上至下排,即是與日期排序逆轉了.

是template還是core的問題?

thx!

附上頁面例子http://hkplogadmin.hkplog.com/post/268
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #1 於: 八月 11, 2005, 04:01:51 下午 »

引用自: sunkit
在plog1.0.1中是否內置了迴響編號?

我試過將迴響排列改做"新的在前",編號照樣是1234上至下排,即是與日期排序逆轉了.

是template還是core的問題?

thx!

附上頁面例子http://hkplogadmin.hkplog.com/post/268


這是模版的問題!這個編號並非迴響的真正編號,而是迴響顯示出來在頁面的順序。在模版中,他的現有寫法應該是

程式碼:
 {$smarty.foreach.comment.iteration}


你可以改成

程式碼:
{$smarty.foreach.comment.total-$smarty.foreach.comment.iteration+1}


Mark
已記錄

sunkit
初級會員
**
文章: 79


檢視個人資料
« 回覆文章 #2 於: 八月 12, 2005, 10:24:41 上午 »

mark,
template中我找不到你所說的code,應該是postandcomments.template中嘛.
some comment code如下
程式碼:
{* show comments *}
<h3 id="comments">{$post->getTotalComments()} Comments on "{$post->getTopic()}"</h3>
<ol class="commentlist">
{foreach name=comment from=$comments item=comment}
<li class="alt" id="comment-{$comment->getId()}">
{$locale->tr("posted_by")}
{if $comment->getUserUrl() != ""}
<cite><a href="{$comment->getUserUrl()}"}>{$comment->getUsername()}</a></cite>
{else}
<cite>{$comment->getUsername()}</cite>
{/if}
<a name="{$comment->getId()}"></a>
{$comment->getTopic()} [<a href="{$url->postPermalink($post)}#NewComment"> {$locale->tr("reply")} </a>]<br />
<small class="commentmetadata">{assign var=commentDate value=$comment->getDateObject()} {$locale->formatDate($commentDate, "%d/%m/%Y, %H:%M")}</small>
<p>{$comment->getText()}</p>
</li>
{/foreach}
</ol>


這個
程式碼:
<ol></ol>
是甚麼作用,就是用它作編號?

另外,編輯文章中如要使用bbcode, ie沒有插件,那裡找icon tag呢?

thx!
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #3 於: 八月 15, 2005, 12:43:14 下午 »

他竟然用 OL 來作編號,呵呵!那你只好自行修改,

1. 把 OL 改成 UL
2. 把要編號的地方加上 {$smarty.foreach.comment.iteration}
3. 如果要反向,則加上 {$smarty.foreach.comment.total-$smarty.foreach.comment.iteration+1}

Mark
已記錄

頁: [1]
LifeType 中文開發論壇  |  支援  |  使用與操作  |  迴響的編號問題 « 上篇主題 下篇主題 »
    前往: