歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 29, 2024, 04:32:42 下午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  模版設計  |  summary中(最活躍網誌)不見了,請高手們協助解決。 « 上篇主題 下篇主題 »
頁: [1]
作者 主題: summary中(最活躍網誌)不見了,請高手們協助解決。  (閱讀 8595 次)
nokia
新手見習
*
文章: 10


檢視個人資料
« 於: 一月 09, 2006, 08:08:13 下午 »

附上原始碼
{include file="summary/header.template" selected="index"}

<div id="column-left">
            <h4>{$locale->tr("summary_most_read_articles")}
      {if $readestBlogs}
        <a href="{$url->getRssUrl()}?summary=1&type=mostread">
          <img src="{$url->getUrl("/imgs/rss_logo_small.gif")}"
          alt="RSS" /></a>      
      {/if}
     </h4>
    {foreach name=readest from=$readestBlogs item=post}
       {if $smarty.foreach.readest.first}
         <ul class="itemList">
       {/if}
       {assign var="blog" value=$post->getBlogInfo()}
       {assign var="url" value=$blog->getBlogRequestGenerator()}      
        <li class="item">
            <a href="{$url->postPermalink($post)}">{$post->getTopic()|strip_tags}</a> ({$post->getNumReads()})<br />
        </li>
       {if $smarty.foreach.readest.last}
         </ul>
       {/if}
    {/foreach}
   
    <h4>{$locale->tr("summary_most_commented_articles")}
    {if $commentedPosts}
      <a href="{$url->getRssUrl()}?summary=1&type=mostcommented">
        <img src="{$url->getUrl("/imgs/rss_logo_small.gif")}"
         alt="RSS" /></a>
    {/if}   
    {foreach name=commented from=$commentedPosts item=post}
       {if $smarty.foreach.commented.first}
         <ul class="itemList">
       {/if}
       {assign var="blog" value=$post->getBlogInfo()}
       {assign var="url" value=$blog->getBlogRequestGenerator()}   
        <li class="item">      
            <a href="{$url->postPermalink($post)}">{$post->getTopic()|strip_tags}</a> ({$post->getTotalComments()})<br />
        </li>
       {if $smarty.foreach.commented.last}
         </ul>
       {/if}
    {/foreach}
   </h4>

    <h4>{$locale->tr("summary_most_active_blogs")}
    {if $activeBlogs}
      <a href="{$url->getRssUrl()}?summary=1&type=mostactiveblogs">
        <img src="{$url->getUrl("/imgs/rss_logo_small.gif")}"
         alt="RSS" /></a>   
    {/if}
     </h4>
    <ul class="itemList">
    {foreach from=$activeBlogs item=blog}
       {assign var="url" value=$blog->getBlogRequestGenerator()}
        <li class="item"><a href="{$url->blogLink()}">{$blog->getBlog()|strip_tags}</a></li>
    {/foreach}
    </ul>
    <ul class="itemList">
    {foreach from=$recentBlogs item=blog}
        {assign var="url" value=$blog->getBlogRequestGenerator()}
   {** remove this if you're having problems with blogs in encondings other than iso-8859-1 **}   
        <li class="item"><a href="{$url->blogLink()}">{$blog->getBlog()|strip_tags}</a></li>
    {/foreach}
    </ul>   

       
    <form id="loginForm" method="post" action="admin.php">
    <fieldset class="inputField">
        <h4>{$locale->tr("login")}</h4>
        <div class="field">
            <label for="userName">{$locale->tr("username")}</label>
            <input type="text" tabindex="10" name="userName" id="userName" value="" maxlength="50" />
        </div>
        <div class="field">
            <label for="userPassword">{$locale->tr("password")}</label>
            <input type="password" tabindex="11" name="userPassword" id="userPassword" maxlength="50" />
        </div>
        <input type="submit" class="button" name="Login" value="{$locale->tr("login")}" tabindex="12" />
        <input type="hidden" name="op" value="Login" />
      <br/>
       <a href="?op=resetPasswordForm">{$locale->tr("password_forgotten")}</a>      
    </fieldset>
    </form>

<form id="searchForm" method="post" action="{$smarty.server.PHP_SELF}">
    <fieldset class="inputField">
        <h4>{$locale->tr("summary_search_blogs")}</h4>
        <div class="field">
            <label for="searchTerms">{$locale->tr("search_terms")}</label><br />
            <input type="text" tabindex="20" name="searchTerms" id="searchTerms" value="" />
        </div>
        <input type="hidden" name="op" value="summarySearch" />           
        <input type="submit" class="button" name="summarySearch" value="{$locale->tr("search")}" tabindex="21" />
    </fieldset>
    </form>

</div>

<div id="maincolumn">
        {include file="summary/recent.template"}
</div>
{include file="summary/footer.template"}
不知道要修改哪裡才能恢復正常,網址是http://140.111.107.2/blog/summary.php
其中畫面中顯示的(最活躍網誌)底下應該是最(新建立的網誌)中的內容,也就是最新網誌的內容不見了。請各位高手幫幫忙。謝謝。
« 最後編輯時間: 一月 12, 2006, 07:50:00 下午 由 nokia » 已記錄
bibicall
LifeType 中文發展團隊
超級會員
*****
文章: 640


我是豬老大


檢視個人資料 個人網站
« 回覆文章 #1 於: 一月 09, 2006, 08:32:50 下午 »

你的原始碼有修改過
新建立的網誌那一段原始碼應該是不小心被你刪掉了
建議你將原來沒修改過的模版倒回去
再重新修改一遍
注意不要刪除summary_newest_blogs那一大塊程式碼
這樣應該就能達到你要的效果

又,預設的摘要模版為三欄式
你若要修改為兩欄式
記得修該CSS的欄寬,
要不然你右邊的欄位會空空的

另外,請lSS或是mark將本文轉到「使用與操作」
本文與核心補強無關
已記錄

我的虛擬主機基本資料如下
Operating system: Linux
Apache version: 1.3.37
PHP version: 4.4.4
MySQL version: 4.1.21-standard
lss
我不是被~拉~~出來的,不要叫我大大!
總版主
超級會員
*****
文章: 1511



檢視個人資料 個人網站
« 回覆文章 #2 於: 一月 09, 2006, 09:01:43 下午 »

hi nokia:

你的最活躍網誌的相關樣版代碼還在,但是已經改的亂七八糟了。請你依 bibicall 版主的建議用原始的樣版再重頭改起,應該比除錯還快。

另外,這是 summary 頁面的樣版修改,我搬到模版設計區去了。

lss
已記錄

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


檢視個人資料
« 回覆文章 #3 於: 一月 12, 2006, 07:48:47 下午 »

你的原始碼有修改過
新建立的網誌那一段原始碼應該是不小心被你刪掉了
建議你將原來沒修改過的模版倒回去
再重新修改一遍
注意不要刪除summary_newest_blogs那一大塊程式碼
這樣應該就能達到你要的效果

又,預設的摘要模版為三欄式
你若要修改為兩欄式
記得修該CSS的欄寬,
要不然你右邊的欄位會空空的

另外,請lSS或是mark將本文轉到「使用與操作」
本文與核心補強無關

已記錄
頁: [1]
LifeType 中文開發論壇  |  開發  |  模版設計  |  summary中(最活躍網誌)不見了,請高手們協助解決。 « 上篇主題 下篇主題 »
    前往: