|
列出文章
|
頁: [1] 2
|
1
|
開發 / 外掛程式 / Re: LT1.1中如何修改topreadposts 插件
|
於: 十一月 28, 2006, 12:08:24 上午
|
不過又有新問題 去設定裡面修改顯示數量時發生錯誤 Fatal error: Only variables can be passed by reference in c:\appserv\www\lifetype\plugins\topreadposts\class\action\plugintopreadpostsupdateconfigaction.class.php on line 46 而這行是 $blogSettings = $this->blogInfo->getSettings(); 看不太懂錯在哪裡 @@
|
|
|
4
|
開發 / 外掛程式 / Re: LT1.1中如何修改topreadposts 插件
|
於: 十一月 13, 2006, 08:37:44 下午
|
我用了1.1的版本之後 仍然會出現 Fatal error: Undefined class name 'db' in c:\appserv\www\lifetype\plugins\topreadposts\plugintopreadposts.class.php on line 26 這一行是 $this->prefix = Db::getPrefix(); 可是我看recentcomment裡面也有類似的東西 但就不會出問題 topreadpost只要放進去plugin裡面就會出現上面的問題 請問該如何解決呢? 我的架站環境 http://stin.csie.org/lifetype/1Windows XP Sp1 AppServ 2.4.4a Apache Web Server Version 1.3.33 PHP Script Language Version 4.3.11 MySQL Database Version 4.0.24 phpMyAdmin Database Manager Version 2.5.7-pl1
|
|
|
7
|
測試 / LifeType 1.1 測試 / 關於Lifetype 1.1 的plugin問題
|
於: 八月 28, 2006, 07:10:32 上午
|
在升級的時候發生了問題 我有去看過相容性列表了 不過像是裡面說可以的articlereferer、recentcomments等等 我在plugin更新之後就會出現 Fatal error: Undefined class name 'db' in c:\appserv\www\lifetype\plugins\articlereferers\pluginarticlereferers.class.php on line 25 所以我覺得應該是我的問題 至於那一行是 $this->prefix = Db::getPrefix(); 除了這個跟db有關的還有 $result = $referers->_db->Execute( $query ); 不是很懂這是作什麼的 @@ 請問該朝哪個方向努力呢? 謝謝 http://stin.csie.org/lifetype/1
|
|
|
11
|
支援 / 安裝與設定 / Re: 文章無法顯示,出現fatal error
|
於: 七月 13, 2006, 09:48:46 下午
|
謝謝回應 不過我有試著把最多閱讀、最新文章那些通通移掉 結果還是差不多 所以才覺得應該不是那裡的程式碼出了問題 覺得有點像是mark所說的$post的問題 而這我不知道該怎麼找起 也附上sidebar-l.template <div id="avmenu"> <h2 class="hide">Menu:</h2>
<h3>關於我</h3> <ul> <img src="{$url->getTemplateFile("images/me.jpg")}" align="left" hspace="5"> <p> polaristin<br/> 綽號小p<br/> 1985/07/23<br /> Taipei, Taiwan<br /> <a href="http://stin.csie.org/lifetype/"><img src="{$url->getUrl("/imgs/PsLove.png")}" vspace="5" alt="P's & Love" /></a></p> <p>台南人,現於台北念書,明年即將考研究所的苦悶(?)大三生...</p> <center><a href="mailto:polaristin@gmail.com"><img vspace="3" src="http://services.nexodyne.com/email/icon/x7oHr%2BhGHHDU0A%3D%3D/YwkQ%2Bu4%3D/R01haWw%3D/0/image.png"></a></center> </ul>
<h3>{$locale->tr("search")}</h3> <center> <form method="post" action="{$url->getIndexUrl()}"> <input type="text" name="searchTerms" value="" size="20" /> <input type="hidden" name="op" value="Search" /> <input type="hidden" name="blogId" value="{$blog->getId()}"/> <input type="submit" name="Search" value="搜尋" /> </form> </center>
<h3>最新文章</h3> <ul> {foreach from=$recentposts item=recentpost} <li><a title="{$recentpost->getText()|truncate:100:"..."|strip_tags|escape}" href="{$url->postLink($recentpost)}">{$recentpost->getTopic()}</a> [{$recentpost->getNumReads()} 次]</li> {/foreach} </ul>
<!--Top Read Posts--> {if $topreadposts->isEnabled()} <h3>熱門文章</h3> <ul> {assign var=readposts value=$topreadposts->getTopReadPosts()} {if !empty($readposts) } {foreach from=$readposts item=readpost} <li><a href="{$url->postLink($readpost)}">{$readpost->getTopic()}</a> [{$readpost->getNumReads()} 次]</li> {/foreach} {/if} </ul> {/if}
{if $recentcomments->isEnabled()} <h3>最新迴響</h3> {assign var=comments value=$recentcomments->getRecentComments()} <ul> {foreach from=$comments item=comment} {assign var=commentpostid value=$comment->getArticleId()} {assign var=commentpost value=$recentcomments->getArticle($commentpostid)} <li> {if $comment->getUserUrl() != ""} <b><a href="{$comment->getUserUrl()}"}>{$comment->getUsername()}</a></b> {else} <b>{$comment->getUsername()}</b> {/if} :<a title="View comments by {$comment->getUsername()}" href="{$url->postPermalink($commentpost)}#{$comment->getId()}">{$comment->getText()|truncate:80:"..."|strip_tags}</a></li> {/foreach} </ul> {/if}
<!--categories 文章分類--> <h3>{$locale->tr("categories")}</h3> <ul> {foreach from=$articlecategories item=articleCategory} <li><a href="{$url->categoryRssLink($articleCategory)}"><img src="{$url->getUrl("/imgs/rss_logo_small.gif")}" style="border:0px;" alt="RSS 0.90" align="middle" /></a> <a href="{$url->categoryLink($articleCategory)}">{$articleCategory->getName()}</a> [{$articleCategory->getNumArticles()}]</li> {/foreach} </ul>
<h3>訂閱部落格</h3> <ul> <!-- <a class="nodecoration" title="Link to the RSS 0.90 feed." href="http://feeds.feedburner.com/PsLove/rss09"><img src="{$url->getUrl("/imgs/rss090_logo.gif")}" style="border:0px;" alt="RSS 0.90" /></a> <a class="nodecoration" title="Link to the RSS 1.0 feed." href="http://feeds.feedburner.com/PsLove/rss1"><img src="{$url->getUrl("/imgs/rss10_logo.gif")}" style="border:0px;" alt="RSS 1.0" /></a><br/> --> <a class="nodecoration" title="Link to the RSS 2.0 feed." href="http://feeds.feedburner.com/PsLove/rss2"><img src="{$url->getUrl("/imgs/rss20_logo.gif")}" style="border:0px;" alt="RSS 2.0" /></a> <a class="nodecoration" title="Link to the Atom 0.3 feed." href="http://feeds.feedburner.com/PsLove/atom"><img src="{$url->getUrl("/imgs/atom_logo.png")}" style="border:0px;" alt="Atom 0.3" /></a><br/> <a href="http://fusion.google.com/add?feedurl=http://feeds.feedburner.com/PsLove/rss2"><img src="{$url->getUrl("/imgs/add-to-google.jpg")}" alt="Google Reader or Homepage" border="0"></a> <a href="http://add.my.yahoo.com/rss?url=http://feeds.feedburner.com/PsLove/rss2"><img src="{$url->getUrl("/imgs/add-yahoo.jpg")}" border="0" alt="Add to My Yahoo!"></a><br> <a href="http://my.msn.com/addtomymsn.armx?id=rss&ut=http://feeds.feedburner.com/PsLove/rss2&ru=http://stin.csie.org/lifetype/"><img src="{$url->getUrl("/imgs/add-msn.gif")}" border="0"></a> <a href="http://www.feedster.com/myfeedster.php?action=addrss&rssurl=http://feeds.feedburner.com/PsLove/rss2&confirm=no"><img src="{$url->getUrl("/imgs/feedster.gif")}" alt="myFeedster" border="0" /></a><br> <a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http://feeds.feedburner.com/PsLove/rss2"><img src="http://www.newsgator.com/images/ngsub1.gif" alt="Subscribe in NewsGator Online" border="0"></a> <a href="http://www.bloglines.com/sub/http://feeds.feedburner.com/PsLove/rss2"><img src="{$url->getUrl("/imgs/add-bloglines.gif")}" alt="Subscribe with Bloglines" border="0" /></a><br> <a href="http://del.icio.us/post?url=http://stin.csie.org/lifetype/&title=P\'s & Love" target="_blank"><IMG alt="del.icio.us P\'s & Love" src="{$url->getUrl("/imgs/add-delicious.gif")}" border=0></a> <a href="http://www.furl.net/storeIt.jsp?u=http://stin.csie.org/lifetype/" target="_blank"><IMG alt="Furl P\'s & Love" src="{$url->getUrl("/imgs/furlit.gif")}" border=0></a><br /> <a href="http://feeds.feedburner.com/PsLove/rss2"><img src="http://feeds.feedburner.com/~fc/PsLove/rss2?bg=99CCFF&fg=444444&anim=1" height="26" width="88" style="border:0" alt="" /></a></ul>
<h3>貼紙連結</h3> <ul> <a href="http://www.mybloglog.com/members/memstats.php?mblID=2006022706273439" target="_blank"><img src="http://www.mybloglog.com/images/b3.gif" style="border:0px;" alt=" View My Public Stats on MyBlogLog.com " /></a> <a href="https://www.feedburner.net/fb/a/myfeeds" target="_blank"><img src="{$url->getUrl("/imgs/feedburner.gif")}" style="border:0px;" alt="RSS 1.0" /></a><br> <a href="http://del.icio.us/polaristin" target="_blank"><img src="{$url->getUrl("/imgs/delicious.png")}" border="0"></a> <a href="http://www.newsgator.com/ngs/subscriber/WebEd2.aspx" target="_blank"><img src="{$url->getUrl("/imgs/newsgator.gif")}" border="0"></a><br> <a href="http://blog.catseyes.com.tw/1" target="_blank"><img src="http://blog.catseyes.com.tw/imgs/blog-joskcat.png"></a> <a href="http://tomky.blogspot.com" target="_blank"><img src="http://homepage.ntu.edu.tw/~b92901007/tomky-blog.png"></a><br> <a href="http://blog.yam.com/lifeshot/archives/1372095.html" target="_blank"><img alt="我是台灣人" src="http://img156.imageshack.us/img156/5001/taiwanese0qb6rd.gif" width="80" height="15" border="0"></a> </ul>
<!--Statistics--> <h3>資料統計</h3> <ul> <li>文章總數:{$blog->getTotalPosts()}</li> <li>迴響總數:{$blog->getTotalComments()}</li> <li>引用總數:{$blog->getTotalTrackbacks()}</li> <li>閱讀總數:{$blog->getViewedTotal()}</li> <br> <!-- Site Meter --> <script type="text/javascript" src="http://s23.sitemeter.com/js/counter.js?site=s23polaristin"><br /> </script> <noscript> <a href="http://s23.sitemeter.com/stats.asp?site=s23polaristin" target="_blank"> <img src="http://s23.sitemeter.com/meter.asp?site=s23polaristin" alt="Site Meter" border="0"/></a><br /> </noscript> <!-- Copyright (c)2006 Site Meter --> <!-- Begin Users Online --> <!-- URL: http://www.twospots.com/ --> <table width="76" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="39"><a href="http://www.twospots.com/free-users-online-counter/" target="_blank"><img src="http://www.tscounter.com/images/users-online/users-online6.gif" width="39" height="21" border="0" alt="Number of online users in last 3 minutes"></a></td> <td width="37"><script type="text/javascript">document.write('<a href="http://www.twospots.com/free-users-online-counter/" target="_blank"><img src="http://www.tscounter.com/uow3c/?id=mNtlQYuP2XsKMD2+ayXHOQ==" width="37" height="21" border="0" alt="Number of online users in last 3 minutes"></ a>');</script><noscript> <a href="http://www.twospots.com/web-services/web-design/" style="style: none;"><img src="http://www.tscounter.com/uow3c/?id=mNtlQYuP2XsKMD2+ayXHOQ==" width="37" height="21" border="0" alt="website design"></a></noscript></td> </tr> </table> <!-- End Users Online --> </ul>
</div>
|
|
|
12
|
支援 / 安裝與設定 / Re: 文章無法顯示,出現fatal error
|
於: 七月 13, 2006, 06:02:06 下午
|
是指prettyrequestgenerator.class.php嗎? <?php
/** * @package net */
include_once( PLOG_CLASS_PATH."class/net/baserequestgenerator.class.php" );
/** * \ingroup Net * * Generates prettier but non-customizable requests. * * @see RequestGenerator * @see BaseRequestGenerator */ class PrettyRequestGenerator extends BaseRequestGenerator {
/** * Constructor. * * @param blogInfo A BlogInfo object */ function PrettyRequestGenerator( $blogInfo ) { $this->BaseRequestGenerator( $blogInfo );
}
/** * Returns the permalink for a post * * @param post The Article object * @return The link for the permalink */ function postPermalink( $post ) { $permaLink = $this->getBaseUrl()."/post/".$this->_blogInfo->getId()."/".$post->getId();
return $permaLink; }
/** * generates an archive link given a date. * * @param date A Timestamp object * @return A valid archive link */ function getArchiveLink( $date ) { $archiveLink = $this->getBaseUrl()."/archives"; if( $this->_blogInfo != null ) $archiveLink .= "/".$this->_blogInfo->getId(); $archiveLink .= "/$date";
return $archiveLink; }
/** * Returns the comment link for a post * * @param post The Article object * @return The correct string */ function postCommentLink( $post ) { $commentLink = $this->getBaseUrl()."/comment/".$this->_blogInfo->getId()."/".$post->getId();
return $commentLink; }
/** * Returns the link for the post * * @param post The Article object * @return The link for the post */ function postLink( $post ) {
$postLink = $this->postPermalink( $post );
return $postLink; }
/** * Returns the link for the post. This is kind of a dirty trick... :( This is only meant to be * used in the template that generates the rss feed for a blog. * * @param post The Article object * @return The link for the post */ function postRssLink( $post ) { $postLink = $this->postPermalink($post);
return $postLink; }
/** * Returns the link of a category. * * @param post The post from which we'll fetch the category and then generate the right link. * @return The url pointing to the page with only the posts belonging to that category. * @see Article * @see categoryLink */ function postCategoryLink( $post ) { throw( new Exception( "DEPRECATED!")); die(); }
/** * Returns the link but given a category. Does the same as postCategoryLink but this time we don't need * a post but an ArticleCategory object. * * @see postCategoryLink * @see ArticleCategory * @param An ArticleCategory object containing the information regarding the category. * @return A string with the correct url pointing to the page that will show only the posts that belong * to the given category. */ function categoryLink( $category ) { $categoryLink = $this->getBaseUrl()."/category/".$this->_blogInfo->getId()."/".$category->getId();
return $categoryLink; }
/** * Returns a link to only the articles of the user * * @param user The user whose posts we would like to see * @return A string containing the right url to only the posts of the user. * @see UserInfo * @see ArticleCategory */ function postUserLink( $user ) { $userLink = $this->getBaseUrl()."/user/".$this->_blogInfo->getId()."/".$user->getId();
return $userLink; }
/** * Returns the url of the host where the blog is running * * @return Returns the url where the blog is running. */ function blogLink( $blogInfo = null ) { $config =& Config::getConfig(); // if subdomains are enabled, there is no need to do much more here... if( $config->getValue( "subdomains_enabled" )) { $link = $this->getBaseUrl(); } else { // if not, we need some additional logic $disableApacheErrorHandler = $config->getValue( "disable_apache_error_handler" ); if( $disableApacheErrorHandler ) $path = "/blog/"; else $path = "/"; if( $blogInfo == null ) { if( $config->getValue( "pretty_urls_force_use_username" )) { $userInfo = $this->_blogInfo->getOwnerInfo(); $link = $this->getBaseUrl().$path.$userInfo->getUsername(); } else { $link = $this->getBaseUrl().$path.$this->_blogInfo->getId(); } } else { $link = $this->getBaseUrl().$path.$blogInfo->getId(); } }
return $link; }
/** * Returns the url where the rss feed is running * * @param blogInfo A BlogInfo object containing information about the blog. * @param profile The RSS profile we'd like to use. It defaults to none. * @return The url pointing to the rss feed of the journal. * @see BlogInfo */ function rssLink( $profile = "", $blogInfo = null ) { $rssBase = $this->getBaseUrl()."/rss/"; if( $profile != "" ) $rssBase .= $profile."/";
if( $blogInfo == null ) $rssLink = $rssBase.$this->_blogInfo->getId(); else $rssLink = $rssBase.$blogInfo->getId();
return $rssLink; }
/** * Returns the url for the rss feed of a category * * @param category The ArticleCategory object with information about the category * whose RSS feed we'd like to generate * @ram profile The profile we'd like to generate: RSS 0.90, RSS 1.0, RSS 2.0 * or XML. * @param blogInfo A BlogInfo object containing information about the blog. * @return The url pointing to the rss feed of the journal. * @see BlogInfo */ function categoryRssLink( $category, $profile = "", $blogInfo = null ) { $rssBase = $this->getBaseUrl()."/rss/";
if( $profile != "" ) $rssBase .= $profile."/";
if( $blogInfo == null ) $rssLink = $rssBase.$this->_blogInfo->getId(); else $rssLink = $rssBase.$blogInfo->getId();
$rssLink .= "/".$category->getId();
return $rssLink; }
/** * Returns the trackback link for a given post. * * @param post The post with the necessary information. * @return A string representing the rdf trackback link. */ function postTrackbackLink( $post ) { $rdfHeader = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">';
$trackbackLink = $this->getTrackbackUrl()."?id=".$post->getId(); $rdfBody = "<rdf:Description rdf:about=\"".$this->postLink($post)."\" dc:identifier=\"".$this->postLink($post)."\" dc:title=\"".$post->getTopic()."\" trackback:ping=\"".$trackbackLink."\"/>"; $rdfFooter = "</rdf:RDF>";
return $rdfHeader.$rdfBody.$rdfFooter; }
/** * Returns the url to reply to a given comment. * * @param post An Article object with information about the post * @param commen A UserComment object containing information about the post we'd like to reply to. * @return The right url to reply to this comment. * @see UserComment * @see Article */ function replyCommentLink( $post, $comment ) { $replyCommentLink = $this->getIndexUrl()."?op=Comment&articleId=".$post->getId()."&parentId=".$comment->getId()."&blogId=".$this->_blogInfo->getId();
return $replyCommentLink; }
/** * Returns the link to the page showing the trackback statistics for a given post. * * @param post The post with the information. * @return Returns a string with the valid link. */ function postTrackbackStatsLink( $post ) { $tbStatsLink = $this->getBaseUrl()."/trackbacks/".$this->_blogInfo->getId()."/".$post->getId();
return $tbStatsLink; }
/** * Returns the link to an album * * @param album The GalleryAlbum object. */ function albumLink( $album = null ) { if( $album == null ) $albumLink = $this->getBaseUrl()."/album/".$this->_blogInfo->getId()."/0"; else $albumLink = $this->getBaseUrl()."/album/".$this->_blogInfo->getId()."/".$album->getId();
return $albumLink; }
/** * Given an album, generates a link to its parent. Must be implemented by child classes to generate * a valid URL. * * @param album The album */ function parentAlbumLink( $album ) { $albumLink = $this->getBaseUrl()."/album/".$this->_blogInfo->getId()."/".$album->getParentId();
return $albumLink; }
/** * Given the name of a template file, generate the right link to it. Must be implemented by child * classes to generate a valid URL. * * @param template * @return A link to the given template file/static page */ function templatePage( $template ) { $templatePage = $this->getBaseUrl()."/static/".$this->_blogInfo->getId()."/".$template;
return $templatePage; }
/** * Returns the link to a resource * * @param album Generates the correct link to fetch a resource */ function resourceLink( $resource ) { $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId()); return $resourceLink = $this->getBaseUrl()."/resource/".$blogId."/".$resource->getId(); }
/** * Returns the link to a resource preview * * @param album Generates the correct link to fetch a resource preview */ function resourcePreviewLink( $resource ) { $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId()); return $resourceLink = $this->getBaseUrl()."/resserver.php?blogId=".$blogId."&resource=".rawurlencode($resource->getFileName())."&mode=preview"; } /** * Returns the link to a resource preview * * @param album Generates the correct link to fetch a resource preview */ function resourceMediumSizePreviewLink( $resource ) { $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId());
return $resourceLink = $this->getBaseUrl()."/resserver.php?blogId=".$blogId."&resource=".rawurlencode($resource->getFileName())."&mode=medium"; }
/** * Returns the link to a resource * * @param resource Generates the correct link to fetch a resource */ function resourceDownloadLink( $resource ) { $blogId = ($resource->getOwnerId() ? $resource->getOwnerId() : $this->_blogInfo->getId()); return $resourceLink = $this->getBaseUrl()."/get/".$blogId."/".rawurlencode($resource->getFileName()); }
/** * Returns a string representing the request * * @return A String object representing the request */ function getRequest() { throw( new Exception( "PrettyRequestGenerator::getRequest: function not implemented" )); die(); } } ?>
|
|
|
14
|
支援 / 安裝與設定 / [已解決]文章無法顯示,出現fatal error
|
於: 七月 13, 2006, 10:19:21 上午
|
今天發現首頁掛了 http://stin.csie.org/lifetype/卡在右方的最近文章等等的 好像是文章的地方出了問題 錯誤訊息是 Fatal error: Call to a member function on a non-object in c:\appserv\www\lifetype\class\net\prettyrequestgenerator.class.php on line 40 而去找出line 40是 $permaLink = $this->getBaseUrl()."/post/".$this->_blogInfo->getId()."/".$post->getId(); 還是不太能理解哪裡錯 煩請指點 @@ 謝謝 我的架站環境 Windows XP Sp1 AppServ 2.4.4a Apache Web Server Version 1.3.33 PHP Script Language Version 4.3.11 MySQL Database Version 4.0.24 phpMyAdmin Database Manager Version 2.5.7-pl1
|
|
|
|
|
|