[pLog-svn] r4205 - in plugins/branches/lifetype-1.1/stickyposts: .
class/action class/view
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Oct 29 16:07:26 GMT 2006
Author: oscar
Date: 2006-10-29 16:07:25 +0000 (Sun, 29 Oct 2006)
New Revision: 4205
Added:
plugins/branches/lifetype-1.1/stickyposts/readme-zh_CN.txt
Modified:
plugins/branches/lifetype-1.1/stickyposts/class/action/pluginstickypostsupdateconfigaction.class.php
plugins/branches/lifetype-1.1/stickyposts/class/view/pluginstickypostsconfigview.class.php
plugins/branches/lifetype-1.1/stickyposts/pluginstickyposts.class.php
plugins/branches/lifetype-1.1/stickyposts/readme-zh_TW.txt
plugins/branches/lifetype-1.1/stickyposts/readme.txt
Log:
updated the 'stickyposts' plugin
Modified: plugins/branches/lifetype-1.1/stickyposts/class/action/pluginstickypostsupdateconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/stickyposts/class/action/pluginstickypostsupdateconfigaction.class.php 2006-10-29 16:02:12 UTC (rev 4204)
+++ plugins/branches/lifetype-1.1/stickyposts/class/action/pluginstickypostsupdateconfigaction.class.php 2006-10-29 16:07:25 UTC (rev 4205)
@@ -77,7 +77,7 @@
// save the blogs settings
$blogs = new Blogs();
- if( !$blogs->updateBlog( $this->_blogInfo )) {
+ if( !$blogs->updateBlog( $this->_blogInfo)) {
$this->_view = new PluginStickyPostsConfigView( $this->_blogInfo );
$this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
$this->setCommonData();
Modified: plugins/branches/lifetype-1.1/stickyposts/class/view/pluginstickypostsconfigview.class.php
===================================================================
--- plugins/branches/lifetype-1.1/stickyposts/class/view/pluginstickypostsconfigview.class.php 2006-10-29 16:02:12 UTC (rev 4204)
+++ plugins/branches/lifetype-1.1/stickyposts/class/view/pluginstickypostsconfigview.class.php 2006-10-29 16:07:25 UTC (rev 4205)
@@ -23,10 +23,11 @@
$maxStickys = $blogSettings->getValue( "plugin_stickyposts_maxstickys" );
$maxAnnounces = $blogSettings->getValue( "plugin_stickyposts_maxAnnounces" );
if ($maxStickys == "") $maxStickys = 5;
- if ($maxAnnounce == "") $maxAnnounces = 5;
+ if ($maxAnnounces == "") $maxAnnounces = 5;
+ include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
//get all categories's id and name as an assoication array
- $categories = new articleCategories();
+ $categories = new ArticleCategories();
$blogId = $this->_blogInfo->getId();
$allCategories = $categories->getBlogCategories( $blogId );
$catNameId = array();
Modified: plugins/branches/lifetype-1.1/stickyposts/pluginstickyposts.class.php
===================================================================
--- plugins/branches/lifetype-1.1/stickyposts/pluginstickyposts.class.php 2006-10-29 16:02:12 UTC (rev 4204)
+++ plugins/branches/lifetype-1.1/stickyposts/pluginstickyposts.class.php 2006-10-29 16:07:25 UTC (rev 4205)
@@ -21,7 +21,7 @@
$this->PluginBase();
$this->id = "stickyposts";
- $this->author = "lss";
+ $this->author = "lss(1.0)/EagleKing(porting to 1.1)";
$this->desc = "This plugin offers features to get all articles from specific article cateogries as announcements and sticky articles.";
$this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "es_ES" );
Added: plugins/branches/lifetype-1.1/stickyposts/readme-zh_CN.txt
===================================================================
--- plugins/branches/lifetype-1.1/stickyposts/readme-zh_CN.txt 2006-10-29 16:02:12 UTC (rev 4204)
+++ plugins/branches/lifetype-1.1/stickyposts/readme-zh_CN.txt 2006-10-29 16:07:25 UTC (rev 4205)
@@ -0,0 +1,55 @@
+Ãû³Æ£º ÎÄÕÂÖö¥¼°¹«¸æ
+°æ±¾£º 1.1 ( Ö§³ÖLifeType 1.1.x)
+ÏÂÔØÁ¬½á£º http://sourceforge.net/projects/lifetype/ or http://www.pactofshadow.com/lifetype/2/articleperma/40.html
+³ÌʽÊÚȨ£º GPL
+×÷Õߣº lss(1.0) / EagleKing(porting to 1.1)
+
+ÓÃ;
+
+Ìá¹©ÍøÖ¾×öÎÄÕÂÖö¥¼°ÓÃÎÄÕÂ×öÎªÍøÕ¾¹«¸æ¡£
+
+É趨
+
+ºǫ́¹ÜÀí²¿·Ý£º
+
+ 1. Ê×ÏÈÇ뽨Á¢Á½¸öÎÄÕ·ÖÀà´æ·Å¹«¸æ¼°Öö¥ÎÄÕ¡£
+ 2. Äã¿ÉÒÔÔÚ ¸öÈËÍøÖ¾É趨 >> Öö¥¼°¹«¸æÎÄÕÂÉ趨 ½øÐи÷ÏîÉ趨¡£
+ 3. Ô¤ÉèµÄÖö¥ÎÄÕÂÊýÄ¿¼°¹«¸æÎÄÕÂÊýÄ¿ÊÇ 5 ƪÎÄÕ£¬Äã¿ÉÒÔÐ޸ijÉÄãÒªÏÔʾµÄÊýÄ¿¡£
+ 4. ÔÚÑ¡µ¥ÖÐÑ¡Ôñ´æ·ÅÖö¥ÎÄÕ¼°¹«¸æÎÄÕµķÖÀà¡£
+
+ÔÚÑù°æµµ°¸ÀÄã¿ÉÒÔʹÓãº
+
+ 1. $stickyposts->isEnabled() ¼ì²é plugin ÊÇ·ñÒѾÆôÓá£
+ 2. $stickyposts->getArticles( 'sticky' ) ´«»ØÖö¥ÎÄÕ嵀 article ÕóÁУ¬×î¶à´«»ØËùÉ趨µÄÖö¥ÎÄÕÂÊýÄ¿¡£
+ 3. $stickyposts->getArticles( 'announce' ) ´«»Ø¹«¸æÎÄÕ嵀 article ÕóÁУ¬×î¶à´«»ØËùÉ趨µÄ¹«¸æÎÄÕÂÊýÄ¿¡£
+ 4. $stickyposts->getArticles( 12 ) ´«»ØÖ¸¶¨ÎÄÕ·ÖÀà ID µÄËùÓÐÎÄÕ article ÕóÁС£±¾ÀýÖÐµÄ 12 ΪÎÄÕ·ÖÀà ID¡£
+ 5. $stickyposts->getCategory( 'sticky' ) ´«»ØÓÃÓÚÖö¥ÎÄÕ嵀 category Îï¼þ£¬¿ÉÓÃÀ´×ö³É¸ü¶àÖö¥ÎÄÕ³¬Á¬½á¡£
+ 6. $stickyposts->getCategory( 'announce' ) ´«»ØÓÃÓÚ¹«¸æÎÄÕ嵀 category Îï¼þ£¬¿ÉÓÃÀ´×ö³É¸ü¶à¹«¸æÎÄÕ³¬Á¬½á¡£
+ 7. $stickyposts->getCategory( 12 ) ´«»ØÖ¸¶¨ÎÄÕ·ÖÀà ID µÄ category Îï¼þ¡£
+
+ÆäÖÐ 'sticky' ºÍ 'announce' ÊÇ plugin µÄ±£Áô×Ö¡£
+
+Ñù°æµµ·¶Àý£º
+
+ÒÔĬÈ쵀 'standrad' Ñù°æÎªÀý×öÐ޸ġ£
+
+ÔÚ{if $category}<h2>{$locale->tr("category")}: {$category->getName()}</h2>{/if}
+ÏÂÃæÌí¼Ó
+
+{if empty($showAll) && $stickyposts->isEnabled()}
+ <h2>Sticky Posts</h2>
+ {assign var=stickys value=$stickyposts->getArticles('sticky')}
+ {foreach from=$stickys item=post}
+ <h3><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h3>
+ {/foreach}
+ {assign var=stickyCategory value=$stickyposts->getCategory('sticky')}
+ <h4><a href="{$url->categoryLink($stickyCategory)}">More Sticky...</a></h4>
+
+ <h2>Announce Posts</h2>
+ {assign var=stickys value=$stickyposts->getArticles('announce')}
+ {foreach from=$stickys item=post}
+ <h3><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h3>
+ {/foreach}
+ {assign var=announceCategory value=$stickyposts->getCategory('announce')}
+ <h4><a href="{$url->categoryLink($announceCategory)}">More Announce...</a></h4>
+{/if}
\ No newline at end of file
Property changes on: plugins/branches/lifetype-1.1/stickyposts/readme-zh_CN.txt
___________________________________________________________________
Name: svn:executable
+ *
Modified: plugins/branches/lifetype-1.1/stickyposts/readme-zh_TW.txt
===================================================================
--- plugins/branches/lifetype-1.1/stickyposts/readme-zh_TW.txt 2006-10-29 16:02:12 UTC (rev 4204)
+++ plugins/branches/lifetype-1.1/stickyposts/readme-zh_TW.txt 2006-10-29 16:07:25 UTC (rev 4205)
@@ -1,74 +1,55 @@
-PLog 1.0/Plugins/stickyposts
-From PLog ¤¤¤å¤å¥ópµe
+Ãû·Q£º ÎÄÕÂÖÃí¼°¹«¸æ
+°æ±¾£º 1.1 ( Ö§³ÖLifeType 1.1.x)
+ÏÂÝdßB½Y£º http://sourceforge.net/projects/lifetype/ or http://www.pactofshadow.com/lifetype/2/articleperma/40.html
+³ÌʽÊÚࣺ GPL
+×÷Õߣº lss(1.0) / EagleKing(porting to 1.1)
-¦WºÙ¡G ¤å³¹¸m³»¤Î¤½§i
-ª©¥»¡G 1.0
-¤U¸ü³sµ²¡G http://sourceforge.net/project/plog/xxx
-µ{¦¡±ÂÅv¡G GPL
-§@ªÌ¡G lss
+ÓÃ;
-¥Î³~
+Ìṩ¾WÖ¾×öÎÄÕÂÖÃí¼°ÓÃÎÄÕÂ×öé¾WÕ¾¹«¸æ¡£
-´£¨Ñºô»x°µ¤å³¹¸m³»¤Î¥Î¤å³¹°µ¬°ºô¯¸¤½§i¡C
+ÔO¶¨
-³]©w
+áą́¹ÜÀí²¿·Ý£º
-«á¥xºÞ²z³¡¥÷¡G
+ 1. Ê×ÏÈÕ½¨Á¢ÉÎÄÕ·Öî´æ·Å¹«¸æ¼°ÖÃíÎÄÕ¡£
+ 2. Äã¿ÉÒÔÔÚ È˾WÖ¾ÔO¶¨ >> ÖÃí¼°¹«¸æÎÄÕÂÔO¶¨ ßMÐи÷íÔO¶¨¡£
+ 3. îAÔOµÄÖÃíÎÄÕµĿ¼°¹«¸æÎÄÕµĿÊÇ 5 ƪÎÄÕ£¬Äã¿ÉÒÔÐ޸ijÉÄãÒªï@ʾµÄµÄ¿¡£
+ 4. ÔÚßxÎÖÐßxñ´æ·ÅÖÃíÎÄÕ¼°¹«¸æÎÄÕµķÖî¡£
- 1. º¥ý½Ð«Ø¥ß¨âӤ峹¤ÀÃþ¦s©ñ¤½§i¤Î¸m³»¤å³¹¡C
- 2. §A¥i¥H¦b Ó¤Hºô»x³]©w >> ¸m³»¤Î¤½§i¤å³¹³]©w ¶i¦æ¦U¶µ³]©w¡C
- 3. ¹w³]ªº¸m³»¤å³¹¼Æ¥Ø¤Î¤½§i¤å³¹¼Æ¥Ø¬O 5 ½g¤å³¹¡A§A¥i¥Hק令§AnÅã¥Üªº¼Æ¥Ø¡C
- 4. ¦b¿ï³æ¤¤¿ï¾Ü¦s©ñ¸m³»¤å³¹¤Î¤½§i¤å³¹ªº¤ÀÃþ¡C
+ÔÚÓ°æn°¸Ñe£¬Äã¿ÉÒÔʹÓãº
-¦b¼Ëª©Àɮ׸̡A§A¥i¥H¨Ï¥Î¡G
+ 1. $stickyposts->isEnabled() z²é plugin ÊÇ·ñÒѽ¢Óá£
+ 2. $stickyposts->getArticles( 'sticky' ) ÷»ØÖÃíÎÄÕ嵀 article êÁУ¬×î¶à÷»ØËùÔO¶¨µÄÖÃíÎÄÕµĿ¡£
+ 3. $stickyposts->getArticles( 'announce' ) ÷»Ø¹«¸æÎÄÕ嵀 article êÁУ¬×î¶à÷»ØËùÔO¶¨µÄ¹«¸æÎÄÕµĿ¡£
+ 4. $stickyposts->getArticles( 12 ) ÷»ØÖ¸¶¨ÎÄÕ·Öî ID µÄËùÓÐÎÄÕ article êÁС£±¾ÀýÖÐµÄ 12 éÎÄÕ·Öî ID¡£
+ 5. $stickyposts->getCategory( 'sticky' ) ÷»ØÓÃì¶ÖÃíÎÄÕ嵀 category Îï¼þ£¬¿ÉÓÃí×ö³É¸ü¶àÖÃíÎÄÕ³¬ßB½Y¡£
+ 6. $stickyposts->getCategory( 'announce' ) ÷»ØÓÃì¶¹«¸æÎÄÕ嵀 category Îï¼þ£¬¿ÉÓÃí×ö³É¸ü¶à¹«¸æÎÄÕ³¬ßB½Y¡£
+ 7. $stickyposts->getCategory( 12 ) ÷»ØÖ¸¶¨ÎÄÕ·Öî ID µÄ category Îï¼þ¡£
- 1. $stickyposts->isEnabled() Àˬd plugin ¬O§_¤w¸g±Ò¥Î¡C
- 2. $stickyposts->getArticles( 'sticky' ) ¶Ç¦^¸m³»¤å³¹ªº article °}¦C¡A³Ì¦h¶Ç¦^©Ò³]©wªº¸m³»¤å³¹¼Æ¥Ø¡C
- 3. $stickyposts->getArticles( 'announce' ) ¶Ç¦^¤½§i¤å³¹ªº article °}¦C¡A³Ì¦h¶Ç¦^©Ò³]©wªº¤½§i¤å³¹¼Æ¥Ø¡C
- 4. $stickyposts->getArticles( 12 ) ¶Ç¦^«ü©w¤å³¹¤ÀÃþ ID ªº©Ò¦³¤å³¹ article °}¦C¡C¥»¨Ò¤¤ªº 12 ¬°¤å³¹¤ÀÃþ ID¡C
- 5. $stickyposts->getCategory( 'sticky' ) ¶Ç¦^¥Î©ó¸m³»¤å³¹ªº category ª«¥ó¡A¥i¥Î¨Ó°µ¦¨§ó¦h¸m³»¤å³¹¶W³sµ²¡C
- 6. $stickyposts->getCategory( 'announce' ) ¶Ç¦^¥Î©ó¤½§i¤å³¹ªº category ª«¥ó¡A¥i¥Î¨Ó°µ¦¨§ó¦h¤½§i¤å³¹¶W³sµ²¡C
- 7. $stickyposts->getCategory( 12 ) ¶Ç¦^«ü©w¤å³¹¤ÀÃþ ID ªº category ª«¥ó¡C
+ÆäÖÐ 'sticky' ºÍ 'announce' ÊÇ plugin µÄ±£Áô×Ö¡£
-¨ä¤¤ 'sticky' ©M 'announce' ¬O plugin ªº«O¯d¦r¡C
+Ó°æn¹ Àý£º
-¼Ëª©Àɽd¨Ò¡G
+ÒÔĬÕJµÄ 'standrad' Ó°æéÀý×öÐ޸ġ£
-³o¬O¤@Ó«D±`²³æªº¼Ëª©Àɽd¨Ò¡A¥Î¨Ó®i¥Ü Sticky Posts Plugin ªº¥Îªk¡C¥¦¬O¥H 'blueish' ¼Ëª©¬°¨Ò°µ×§ï¡C
+ÔÚ{if $category}<h2>{$locale->tr("category")}: {$category->getName()}</h2>{/if}
+ÏÂÃæÌí¼Ó
-{include file="$blogtemplate/header.template"}
-<div id="content">
-{if $stickyposts->isEnabled()}
+{if empty($showAll) && $stickyposts->isEnabled()}
<h2>Sticky Posts</h2>
{assign var=stickys value=$stickyposts->getArticles('sticky')}
{foreach from=$stickys item=post}
- <h2 class="title"><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h2>
- {/foreach}
+ <h3><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h3>
+ {/foreach}
{assign var=stickyCategory value=$stickyposts->getCategory('sticky')}
- <h4><a href="{$url->categoryLink($stickyCategory)}">more sticky posts</a></h4>
+ <h4><a href="{$url->categoryLink($stickyCategory)}">More Sticky...</a></h4>
<h2>Announce Posts</h2>
{assign var=stickys value=$stickyposts->getArticles('announce')}
{foreach from=$stickys item=post}
- <h2 class="title"><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h2>
+ <h3><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h3>
{/foreach}
{assign var=announceCategory value=$stickyposts->getCategory('announce')}
- <h4><a href="{$url->categoryLink($announceCategory)}">more announce posts</a></h4>
-
- {foreach from=$posts item=post}
- {include file="$blogtemplate/post.template"}
- {/foreach}
-{/if}
-</div>
-{include file="$blogtemplate/panel.template"}
-{include file="$blogtemplate/footer.template"}
-
-
-ª`·N¨Æ¶µ
-
-¤W±ªº¼Ëª©Àɽd¨Ò¬O¤@Ó«Ü®tªº½d¨Ò¡A½Ð¼Ëª©°ª¤â»s§@¤S¦n¤Sº}«Gªº¼Ëª©¡A¨Ã½ÐÀH¤â±N³oÓ½d¨Ò´«±¼¡C
-
-
-¨ú¦Û"http://wiki.plogworld.org.tw/index.php/PLog_1.0/Plugins/stickyposts"
-
-¶±¤ÀÃþ: Plugins
\ No newline at end of file
+ <h4><a href="{$url->categoryLink($announceCategory)}">More Announce...</a></h4>
+{/if}
\ No newline at end of file
Modified: plugins/branches/lifetype-1.1/stickyposts/readme.txt
===================================================================
--- plugins/branches/lifetype-1.1/stickyposts/readme.txt 2006-10-29 16:02:12 UTC (rev 4204)
+++ plugins/branches/lifetype-1.1/stickyposts/readme.txt 2006-10-29 16:07:25 UTC (rev 4205)
@@ -1,8 +1,8 @@
Name: stickyposts
-Latest version: 1.0
-Download link: http://sourceforge.net/projects/lifetype/
+Latest version: 1.1 (for LifeType 1.1.x)
+Download link: http://sourceforge.net/projects/lifetype/ or http://www.pactofshadow.com/lifetype/2/articleperma/40.html
License: GPL
-Author: lss
+Author: lss / EagleKing(1.1 porting)
Description
@@ -31,39 +31,26 @@
Where the 'sticky' and 'announce' are plugin reverse string.
-Example: This is a very simple example for use stikcyposts plugin in template, Rewrite it as you like. This example modifies main.template of template 'blueish'.
-
-{include file="$blogtemplate/header.template"}
-<div id="content">
-{if $stickyposts->isEnabled()}
+Example:
+Modifies main.template of template 'standard'
+below
+{if $category}<h2>{$locale->tr("category")}: {$category->getName()}</h2>{/if}
+add
+{if empty($showAll) && $stickyposts->isEnabled()}
<h2>Sticky Posts</h2>
{assign var=stickys value=$stickyposts->getArticles('sticky')}
{foreach from=$stickys item=post}
- <h2 class="title"><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h2>
- {/foreach}
+ <h3><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h3>
+ {/foreach}
{assign var=stickyCategory value=$stickyposts->getCategory('sticky')}
- <h4><a href="{$url->categoryLink($stickyCategory)}">more sticky posts</a></h4>
+ <h4><a href="{$url->categoryLink($stickyCategory)}">More Sticky...</a></h4>
<h2>Announce Posts</h2>
{assign var=stickys value=$stickyposts->getArticles('announce')}
{foreach from=$stickys item=post}
- <h2 class="title"><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h2>
+ <h3><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a></h3>
{/foreach}
{assign var=announceCategory value=$stickyposts->getCategory('announce')}
- <h4><a href="{$url->categoryLink($announceCategory)}">more announce posts</a></h4>
-
- {foreach from=$posts item=post}
- {include file="$blogtemplate/post.template"}
- {/foreach}
-{/if}
-</div>
-{include file="$blogtemplate/panel.template"}
-{include file="$blogtemplate/footer.template"}
+ <h4><a href="{$url->categoryLink($announceCategory)}">More Announce...</a></h4>
+{/if}
-Notes
-
-May someone kindly make an good example of template. I make a very bad one.
-
-Retrieved from "http://wiki.lifetype.net/index.php/PLog_1.0/Plugins/stickyposts"
-
-Categories: Plugins
More information about the pLog-svn
mailing list