歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 29, 2024, 09:38:22 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
  列出文章
頁: [1]
1  開發 / 模版設計 / Re: 最活躍的網誌問題仍是沒有解決 於: 二月 04, 2006, 08:26:31 上午
真的感謝MARK,根據消息回傳,果然是少了那一個+,謝謝所有人的辛苦,可是為什麼會造成這種情況呢?
2  站務 / 站務公告 / Re: 歡迎 hlps9999 加入版主群 於: 一月 22, 2006, 03:27:50 下午
我也是收到阿欣老師幫忙過的人,加油呀,要在繁忙的教學中仍有空處理這樣的事,真是佩服
3  開發 / 模版設計 / Re: 最活躍的網誌問題仍是沒有解決 於: 一月 22, 2006, 03:25:44 下午
不好意思,目前正在放假中,而且MARK所說的一些資料要上傳的部分我亦不懂,因為我不是主要架站人,而且我有改過的部分我都複製回去了,問題是我還沒更改時就已經這樣了,我會連絡他來試試看,謝謝了。
4  開發 / 模版設計 / Re: 最活躍的網誌問題仍是沒有解決 於: 一月 20, 2006, 10:49:36 上午
請幫我看一下SQL_error.log的資料
19-01-2006 17:15:44 ERROR - The following query =
SELECT COUNT(*) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date)   1)) ) as rank, b.*
                       FROM plog_articles AS a
                       INNER JOIN plog_blogs AS b
                           ON b.id=a.blog_id AND b.status=1 WHERE a.date >= 20060112171544 AND a.date <= 20060119171544
                       GROUP BY a.blog_id ORDER BY rank DESC  LIMIT 0,30
generated the following error message =
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1)) ) as rank, b.*
                       FROM plog_articles AS a
              ' at line 1
5  開發 / 模版設計 / Re: 最活躍的網誌問題仍是沒有解決 於: 一月 19, 2006, 08:35:04 下午
還是不行,也用了您所提供的檔案。雖然沒解決,還是感謝您。
6  開發 / 模版設計 / Re: 最活躍的網誌問題仍是沒有解決 於: 一月 19, 2006, 05:16:17 下午
bibicall 您的回覆真是快,可是照您所說的刪掉那一行,這個摘要會變成空白一片,而且把剛刪掉的那一行貼回去還不行,要複製一個全新的檔案才會再度出現,真是傷腦筋。還有沒有其他方法。麻煩您了。
7  開發 / 模版設計 / Re: 最活躍的網誌問題仍是沒有解決 於: 一月 19, 2006, 04:21:59 下午
我已經遵照大家所說的將檔案復原了,可是最活躍網誌還是沒有出現,我也清除了 ./tmp/summary ,雖然之前我有更改過/class/summary/dao/summarystats.class.php,可是我是依照論壇中別人所提供的增加最新發表的文章,如下
修改 ./class/summary/dao/summarystats.class.php

找到(從後面開始找比較快,約296行開始)
while( ($row = $result->FetchRow()) && ($i < $maxPosts) ) {
        //    if (!in_array($row["blog_id"], $blogs))
        //     {
        //           $blogs[] = $row["blog_id"];
                   array_push( $posts, $articles->_fillArticleInformation($row) );
       //            $i++;
       //      }
        }
將上面綠色的那5行刪除掉或在前面加上 // 註解,這樣就可以了。
總之,我改回原來的,最活躍的網誌仍是沒有出現。真是傷腦筋。
8  開發 / 模版設計 / 最活躍的網誌問題仍是沒有解決 於: 一月 18, 2006, 07:45:50 下午
我已經從新的一個summary中從新修改,並且兩邊互相對照,仍是沒有結果。網址是http://140.111.107.2/blog/summary.php
我看全新的summary最活躍的網誌後面都會有一個RSS,可是這一個有缺失的summary後面並沒有,是不是在其他地方出了問題呢,我已經找了論壇裡面的好多文章,還是不知為什麼會這樣,請大家協助解決吧。
附上原始檔如下
{include file="summary/header.template" selected="index"}

<div id="column-left">
    <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>


     <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}
   </ul>

   <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>


</div>

<div id="maincolumn">
        {include file="summary/recent.template"}
</div>
<div id="column-right">
<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>   



    <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}   

    </h4>
    {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}


</div>
{include file="summary/footer.template"}
9  開發 / 模版設計 / Re: summary中(最活躍網誌)不見了,請高手們協助解決。 於: 一月 12, 2006, 07:48:47 下午
你的原始碼有修改過
新建立的網誌那一段原始碼應該是不小心被你刪掉了
建議你將原來沒修改過的模版倒回去
再重新修改一遍
注意不要刪除summary_newest_blogs那一大塊程式碼
這樣應該就能達到你要的效果

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

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

10  開發 / 模版設計 / summary中(最活躍網誌)不見了,請高手們協助解決。 於: 一月 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
其中畫面中顯示的(最活躍網誌)底下應該是最(新建立的網誌)中的內容,也就是最新網誌的內容不見了。請各位高手幫幫忙。謝謝。
頁: [1]