列出文章
|
頁: 1 2 [3] 4 5 ... 7
|
31
|
開發 / 模版設計 / Re: 該如何在顯示文章列表?
|
於: 十一月 11, 2006, 05:05:55 下午
|
謝謝 hsuzy 的提醒
但在我在 main.template 的第一行加了 {assign var="OnMainPage" value=1} 之後, 結果還是一樣 本以為是 template cache 的問題, 但我把 tmp 下的通通砍掉, 還是無法顯示出清單 ???
|
|
|
32
|
開發 / 模版設計 / Re: 該如何在顯示文章列表?
|
於: 十一月 10, 2006, 08:01:28 上午
|
謝謝 hsuzy 的回覆,
我在 post.template 加上了 $OnMainPage 的判斷, 結果不論是首頁或文章分類通通都一樣的顯示, 好像 $OnMainPage 抓不到或還怎樣
我的 code 如下
<!-- {$url->postTrackbackLink($post)} --> {if $OnMainPage} {assign var="postDate" value=$post->getDateObject()} {assign var="postOwner" value=$post->getUserInfo()} <DIV class=post> <H2 class=storytitle ><A class=aposted href="{$url->postPermalink($post)}">{$post->getTopic()}</A></H2> <DIV class=date>Published on {$locale->formatDate($postDate,"%H:%M, %m/%d,%Y")}</DIV> <DIV class=storycontent> <P>{$post->getText()}</P> </DIV><BR> <DIV class=feedback> <DIV class=meta>Posted under {foreach name=categories from=$post->getCategories() item=postcategory} <a href="{$url->categoryLink($postcategory)}">{$postcategory->getName()}</a> {if !$smarty.foreach.categories.last}, {/if} {/foreach} | <A href="{$url->postPermalink($post)}#comments">{$locale->tr("comment on this")} ({$post->getTotalComments()})</A> </DIV> </DIV> <DIV class=sep></DIV> </DIV>
{else}
{assign var="postDate" value=$post->getDateObject()} <p> <A class=aposted href="{$url->postPermalink($post)}">{$post->getTopic()}</A> ({$locale->formatDate($postDate,"%Y/%m/%d,%H:%M")})<br/> </p> {/if}
|
|
|
34
|
支援 / 安裝與設定 / 修改 locale_zh_TW.php 時發生的問題
|
於: 十一月 09, 2006, 08:17:07 上午
|
今天從 1.0.6 升級至 1.1 時, 想修改 summary.php 的 welcome 訊息 於是便以 notepad 修改 locale_zh_TW.php 但修改後 blog 的最頂端都會出現下列的錯誤訊息
Warning: Cannot modify header information - headers already sent by (output started at D:\... \blog\locale\locale_zh_TW.php:1) in D:\...\blog\class\view\view.class.php on line 323
Warning: Cannot modify header information - headers already sent by (output started at D:\... \blog\locale\locale_zh_TW.php:1) in D:\... \blog\class\view\view.class.php on line 175
請問需要重新啟動 apache嗎? 或是有其他解決的辦法?
謝謝
|
|
|
36
|
開發 / 模版設計 / Re: 該如何在顯示文章列表?
|
於: 十一月 09, 2006, 07:54:21 上午
|
我今天從 1.0.6 升級到 1.1 之後, 原有文章分類的顯示方式也都改變了 原本是文章列表的, 但現在則連內文都出現了
找「 $showAll 」也沒看到相關的文章,有人可以指點一下嗎?
謝謝
|
|
|
37
|
支援 / 安裝與設定 / Re: blog移機後發表新文章的錯誤訊息
|
於: 十月 11, 2006, 11:50:58 上午
|
如果以 utf-8 的編碼來看 err log 的話, 倒沒有亂碼的問題
02-10-2006 02:23:55 ERROR - The following query = INSERT INTO plog_bayesian_tokens (blog_id, token, spam_occurrences, nonspam_occurrences, prob) VALUES ('2', 'URL', '0', '1', '0.01') generated the following error message = Data too long for column 'token' at row 1
出現 token 的值太長,超過 plog_bayesian_tokens 裏 token 這毎欄位的長度, 但以此例來看, 'URL' 跟本沒有超過 token var(100) 的長度?
目前在新增10篇文章,但概有8成會有此問題
我只好暫時把 blog\class\dao 下的 bayesiantokens.class.php 中的 第 192行起的幾行先給 mark 起來 至少這樣不會再有此情形,且程式可以繼續下去, 才不會文章進去了,但 blog 首頁却沒出現
if (!$result) { throw(new Exception("BayesianTokens::updateOccurrencesFromTokensArray: Cannot update occurrences of token '$token'."));
die(); }
只是不曉得這樣改會不會有其他的影響就是了
|
|
|
38
|
支援 / 使用與操作 / Re: 文章發表的日期怪怪的
|
於: 十月 05, 2006, 08:31:38 下午
|
我現在比較清楚狀況了 LT 認為我的 server 所在時區為 GMT 所以在新增文章時, 右邊的日期及時間選項為 GMT 時間 如果我在網誌設定中 把 誌伺服器與您所在地的時間差 設為 +8 在編輯時,右邊的日期及時間選項還是 GMT 時間 但在發表之後, 系統會自動改為 GMT + 8 但問題來了, 為何我的 server 時區會是 GMT 呢? 在OS 中都是 中原標準時間呀 唉, 真不知是那裏出錯
|
|
|
39
|
支援 / 使用與操作 / Re: 文章發表的日期怪怪的
|
於: 十月 05, 2006, 03:01:16 下午
|
剛剛我在全域設定的地方把 default_time_offset 預設的網站伺服器時間差 為 +8 但是在開始編輯文章時, 文章日期仍是 比台北時間少了 8小時 我再至網誌設定, 也把預設的網站伺服器時間差 設為 +8 結果還是一樣?? 請問還有救嗎???
|
|
|
40
|
支援 / 使用與操作 / Re: 文章發表的日期怪怪的
|
於: 十月 05, 2006, 02:56:17 下午
|
謝謝 lss server 的時區是台北 我原先裝在 windows 2000 server 上的LT 是正常的 現在換到 windows 2003 server 才有此問題 真想不透是那裏出了問題,看來只好先在 default_time_offset 預設的網站伺服器時間差 設定為 +8 了
|
|
|
42
|
支援 / 使用與操作 / 文章發表的日期怪怪的
|
於: 十月 05, 2006, 10:37:06 上午
|
我最新安裝了 LT 1.0.6, 編輯文章時,文章的日期竟少了 8小時
例如我 11:26 點了"發表新文章" 後,右邊的文章日期為 03:26
見附圖
我確認過server的時間是 11:26 沒錯,server 在台北 查看全域及網站的設定,default_time_offset 預設的網站伺服器時間差 的值都是0 這應該是正確的吧
請問這會是那裏的問題呢?
謝謝
|
|
|
43
|
支援 / 安裝與設定 / Re: blog移機後發表新文章的錯誤訊息
|
於: 十月 04, 2006, 11:15:59 上午
|
我的 sql_error.log 內容見附件,
有一些訊息是 Data too long for column 'text' at row 1 是文章太長的關係嗎? 我沒有去變更過MySQL 的資料庫欄位呀
因錯誤訊息很長, 我附上檔案, 以方便各位查看
煩請幫忙看看,謝謝
ted
|
|
|
44
|
支援 / 安裝與設定 / blog移機後發表新文章的錯誤訊息
|
於: 十月 02, 2006, 01:36:07 下午
|
前幾天將在 A 機器上的 LT 1.0.6 移到 B機器上後,發現在發表文章後會出現下面的錯誤訊息
Fatal error: Uncaught exception 'Exception' with message 'BayesianTokens::updateOccurrencesFromTokensArray: Cannot update occurrences of token 'Redingè'.' in D:\AppServ\www\blog\class\dao\bayesiantokens.class.php:194 Stack trace: #0 D:\AppServ\www\blog\class\dao\bayesiantokens.class.php(164): BayesianTokens->updateOccurrencesFromTokensArray('1', Array, 0, 1, '0', 369) #1 D:\AppServ\www\blog\class\bayesian\bayesianfiltercore.class.php(87): BayesianTokens->incNonSpamOccurrencesFromTokensArray('1', Array, '0', 369) #2 D:\AppServ\www\blog\class\bayesian\bayesianfiltercore.class.php(108): BayesianFilterCore->train('1', '???????????????...', '<p>????????????...', '', '', '', false) #3 D:\AppServ\www\blog\class\action\admin\adminaddpostaction.class.php(122): BayesianFilterCore->trainWithArticle(Object(Article)) #4 D:\AppServ\www\blog\class\controller\controller.class.php(309): AdminAddPostAction->perform() #5 D:\AppServ\www\blog\admin.php(39): Controller->process(Array, 'op') #6 {main} thrown in D:\AppServ\www\blog\class\dao\bayesiantokens.class.php on line 194
查看後發現文章是在存成功,RSS reader也收的到此篇新文章 但 blog 首頁卻不會出現,但從文章分類或搜尋都可以找的到
當再次編輯此文章,再存檔;或者先存成草稿,然後再發表 就會正常,沒有錯誤
我移機的大致作法是:先在B 機器裝上一樣版本的 LT,然後把 A機器上的 plugin,template,及 mysql的 data檔案 copy 至B 機器
雖然A,B二台的 php 及 mysql, apache版本不同,但我都把my.ini 或 php.ini及 apache 的設定盡量調成一致
新的B機器 ----------------------------------------- Windows server 2003 Apache Web Server Version 2.2.2 PHP Script Language Version 5.1.4 MySQL Database Version 5.0.22
舊的 A機器 ------------------------------------- Windows 2000 server Apache Web Server Version 2.0.54 PHP Script Language Version 5.0.4 MySQL Database Version 4.1.12a
請問可能是那邊造成的問題,或者我copy 錯了什麼檔案?
謝謝
|
|
|
|
|
|