[pLog-svn] r4500 - in plugins/trunk: . feedreader feedreader/class feedreader/class/action feedreader/class/class feedreader/imgs feedreader/imgs/imgs feedreader/locale feedreader/locale/locale feedreader/templates feedreader/templates/templates unported

oscar at devel.lifetype.net oscar at devel.lifetype.net
Thu Jan 4 22:47:06 GMT 2007


Author: oscar
Date: 2007-01-04 22:47:06 +0000 (Thu, 04 Jan 2007)
New Revision: 4500

Added:
   plugins/trunk/feedreader/
   plugins/trunk/feedreader/class/action/readfeedaction.class.php
   plugins/trunk/feedreader/class/class/
   plugins/trunk/feedreader/imgs/imgs/
   plugins/trunk/feedreader/locale/locale/
   plugins/trunk/feedreader/pluginfeedreader.class.php
   plugins/trunk/feedreader/templates/templates/
Removed:
   plugins/trunk/feedreader/class/action/readfeedaction.class.php
   plugins/trunk/feedreader/class/class/action/
   plugins/trunk/feedreader/class/class/dao/
   plugins/trunk/feedreader/class/class/view/
   plugins/trunk/feedreader/class/class/xml/
   plugins/trunk/feedreader/imgs/imgs/clip.gif
   plugins/trunk/feedreader/imgs/imgs/down.gif
   plugins/trunk/feedreader/imgs/imgs/left.gif
   plugins/trunk/feedreader/locale/locale/locale_en_UK.php
   plugins/trunk/feedreader/locale/locale/locale_es_ES.php
   plugins/trunk/feedreader/locale/locale/locale_zh_CN.php
   plugins/trunk/feedreader/locale/locale/locale_zh_TW.php
   plugins/trunk/feedreader/pluginfeedreader.class.php
   plugins/trunk/feedreader/templates/templates/feed.template
   plugins/trunk/feedreader/templates/templates/feedlist.template
   plugins/trunk/unported/feedreader/
Log:
plugin ported, moved back to the main folder


Copied: plugins/trunk/feedreader (from rev 4492, plugins/trunk/unported/feedreader)

Deleted: plugins/trunk/feedreader/class/action/readfeedaction.class.php
===================================================================
--- plugins/trunk/unported/feedreader/class/action/readfeedaction.class.php	2007-01-04 19:48:01 UTC (rev 4492)
+++ plugins/trunk/feedreader/class/action/readfeedaction.class.php	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,78 +0,0 @@
-<?php
-
-	include_once( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
-	include_once( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
-	include_once( PLOG_CLASS_PATH."class/xml/rssparser/rssparser.class.php" );
-	include_once( PLOG_CLASS_PATH."plugins/feedreader/class/dao/feedreaderdata.class.php" );	
-	include_once( PLOG_CLASS_PATH."plugins/feedreader/class/view/feedlistview.class.php" );		
-	include_once( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
-	
-	class ReadFeedAction extends AdminAction
-	{
-	
-		var $_feedId;
-	
-		function ReadFeedAction(  $actionInfo, $request )
-		{
-			$this->AdminAction( $actionInfo, $request );			
-		
-			$this->registerFieldValidator( "feedId", new IntegerValidator());
-			$view = new AdminPluginTemplatedView( $this->_blogInfo, "feedreader", "feedlist" );
-			$view->setErrorMessage( $this->_locale->tr("error_invalid_feed_id" ));
-			$this->setValidationErrorView( $view );
-		}
-		
-		function perform()
-		{
-			// get the feed id
-			$this->_feedId = $this->_request->getValue( "feedId" );		
-		
-			// load the feed
-			$feeds = new FeedReaderData();
-			$feed = $feeds->getFeed( $this->_feedId );
-			
-			// and check if it is correct
-			if( !$feed ) {
-				$this->_view = new FeedListView( $this->_blogInfo );
-				$this->_view->setErrorMessage( $this->_locale->tr("error_loading_feed" ));
-				$this->setCommonData();
-				return false;			
-			}
-			
-			// also, make sure it has a link to an rss feed
-			$link = $feed->getMyLink();
-			if( $link->getRssFeed() == "" ) {
-				$this->_view = new FeedListView( $this->_blogInfo );
-				$this->_view->setErrorMessage( $this->_locale->tr("error_loading_feed" ));
-				$this->setCommonData();
-				return false;			
-			}
-			
-			// update the date when this feed was last read
-			$feeds->updateFeedLastReadDate( $feed );
-			
-			// if everything went fine, we can now try to parse the feed
-			$config =& Config::getConfig();
-			$tmpDir = $config->getValue( "temp_folder" );
-			define( "MAGPIE_CACHE_ON", true );
-			define( "MAGPIE_CACHE_DIR", $tmpDir );
-			define( "MAGPIE_CACHE_AGE", 3600 );
-			define( "MAGPIE_DEBUG", 0 );
-			
-			$rssParser = new RssParser();
-			if( !$rssParser->parse( $link->getRssFeed())) {
-				$this->_view = new FeedListView( $this->_blogInfo );
-				$this->_view->setErrorMessage( $this->_locale->tr("error_loading_feed" ));
-				$this->setCommonData();
-				return false;
-			}
-			
-			$this->_view = new AdminPluginTemplatedView( $this->_blogInfo, "feedreader", "feed" );
-			$this->_view->setValue( "rss", $rssParser );
-			$this->_view->setValue( "feed", $link );
-			$this->setCommonData();
-			
-			return true;
-		}
-	}
-?>
\ No newline at end of file

Copied: plugins/trunk/feedreader/class/action/readfeedaction.class.php (from rev 4499, plugins/trunk/unported/feedreader/class/action/readfeedaction.class.php)

Copied: plugins/trunk/feedreader/class/class (from rev 4499, plugins/trunk/unported/feedreader/class)

Copied: plugins/trunk/feedreader/imgs/imgs (from rev 4499, plugins/trunk/unported/feedreader/imgs)

Deleted: plugins/trunk/feedreader/imgs/imgs/clip.gif
===================================================================
(Binary files differ)

Deleted: plugins/trunk/feedreader/imgs/imgs/down.gif
===================================================================
(Binary files differ)

Deleted: plugins/trunk/feedreader/imgs/imgs/left.gif
===================================================================
(Binary files differ)

Copied: plugins/trunk/feedreader/locale/locale (from rev 4499, plugins/trunk/unported/feedreader/locale)

Deleted: plugins/trunk/feedreader/locale/locale/locale_en_UK.php
===================================================================
--- plugins/trunk/unported/feedreader/locale/locale_en_UK.php	2007-01-04 22:42:15 UTC (rev 4499)
+++ plugins/trunk/feedreader/locale/locale/locale_en_UK.php	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,12 +0,0 @@
-<?php
-$messages["feedReader"] = "Feed Reader";
-$messages["feed"] = "Feed";
-$messages["site"] = "Site";
-$messages["error_invalid_feed_id"] = "Incorrect feed identifier.";
-$messages["error_loading_feed"] = "There was an error loading data about the feed.";
-$messages["error_fetching_feed"] = "There was an error fetching the feed.";
-$messages["error_feed_has_no_rss_feed_defined"] = "The feed you selected does not have a link to an RSS/Atom feed defined.";
-$messages["read"] = "Read";
-$messages["never_read"] = "Never read";
-$messages["last_read"] = "Last Read";
-?>
\ No newline at end of file

Deleted: plugins/trunk/feedreader/locale/locale/locale_es_ES.php
===================================================================
--- plugins/trunk/unported/feedreader/locale/locale_es_ES.php	2007-01-04 22:42:15 UTC (rev 4499)
+++ plugins/trunk/feedreader/locale/locale/locale_es_ES.php	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,17 +0,0 @@
-<?php
-
-// Translation by Andres Bianciotto plog at a-b.com.ar
-// Date 09/Apr/2005
-// Please check if $messages["read"] is correctly applied
-
-$messages["feedReader"] = "Lector de Feeds";
-$messages["feed"] = "Feed";
-$messages["site"] = "Sitio";
-$messages["error_invalid_feed_id"] = "Identificador de feed incorrecto.";
-$messages["error_loading_feed"] = "Hubo un error cargando los datos desde la fuente.";
-$messages["error_fetching_feed"] = "Hubo un error conect&aacute;ndose a la fuente de datos.";
-$messages["error_feed_has_no_rss_feed_defined"] = "La fuente de datos seleccionada no tiene un link RSS/Atom asociado.";
-$messages["read"] = "Leer"; //It could be "Le&iacute;do"
-$messages["never_read"] = "Nunca le&iacute;do";
-$messages["last_read"] = "&Uacute;ltimo le&iacute;do";
-?>
\ No newline at end of file

Deleted: plugins/trunk/feedreader/locale/locale/locale_zh_CN.php
===================================================================
--- plugins/trunk/unported/feedreader/locale/locale_zh_CN.php	2007-01-04 22:42:15 UTC (rev 4499)
+++ plugins/trunk/feedreader/locale/locale/locale_zh_CN.php	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,12 +0,0 @@
-<?php
-$messages["feedReader"] = "新闻阅读器";
-$messages["feed"] = "新闻";
-$messages["site"] = "站点地址";
-$messages["error_invalid_feed_id"] = "无效新闻代号。";
-$messages["error_loading_feed"] = "当载入新闻时发生错误。";
-$messages["error_fetching_feed"] = "当读取新闻时发生错误。";
-$messages["error_feed_has_no_rss_feed_defined"] = "您所选择的新闻并未提供任何RSS/Atom的站点地址链接。";
-$messages["read"] = "阅读";
-$messages["never_read"] = "从未读过";
-$messages["last_read"] = "最后阅读时间";
-?>
\ No newline at end of file

Deleted: plugins/trunk/feedreader/locale/locale/locale_zh_TW.php
===================================================================
--- plugins/trunk/unported/feedreader/locale/locale_zh_TW.php	2007-01-04 22:42:15 UTC (rev 4499)
+++ plugins/trunk/feedreader/locale/locale/locale_zh_TW.php	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,12 +0,0 @@
-<?php
-$messages["feedReader"] = "新聞閱讀器";
-$messages["feed"] = "新聞";
-$messages["site"] = "網址";
-$messages["error_invalid_feed_id"] = "錯誤新聞代號。";
-$messages["error_loading_feed"] = "當載入新聞時發生錯誤。";
-$messages["error_fetching_feed"] = "當讀取新聞時發生錯誤。";
-$messages["error_feed_has_no_rss_feed_defined"] = "您所選擇的新聞並未提供任何 RSS/Atom 的網址連結。";
-$messages["read"] = "閱讀";
-$messages["never_read"] = "從未讀過";
-$messages["last_read"] = "最後閱讀時間";
-?>
\ No newline at end of file

Deleted: plugins/trunk/feedreader/pluginfeedreader.class.php
===================================================================
--- plugins/trunk/unported/feedreader/pluginfeedreader.class.php	2007-01-04 19:48:01 UTC (rev 4492)
+++ plugins/trunk/feedreader/pluginfeedreader.class.php	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,29 +0,0 @@
-<?php
-
-	include_once( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-	
-	class PluginFeedReader extends PluginBase 
-	{
-		function PluginFeedReader()
-		{
-			$this->PluginBase();
-			
-			$this->id = "feedreader";
-			$this->desc = "RSS/Atom feed reader integrated into LifeType's admin interface";
-			$this->author = "The LifeType Project";
-			$this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "es_ES" );
-			
-			// register our actions
-			$this->registerAdminAction( "feedReader", "FeedReaderAction" );
-			$this->registerAdminAction( "readFeed", "ReadFeedAction" );
-			
-			// register a new menu entry
-			$this->addMenuEntry( "/menu/Manage/manageLinks",      // menu path
-			                     "feedReader",   // menu id
-								 "?op=feedReader",
-								 "feedReader",
-								 true, 
-								 false );
-		}
-	}
-?>
\ No newline at end of file

Copied: plugins/trunk/feedreader/pluginfeedreader.class.php (from rev 4499, plugins/trunk/unported/feedreader/pluginfeedreader.class.php)

Copied: plugins/trunk/feedreader/templates/templates (from rev 4499, plugins/trunk/unported/feedreader/templates)

Deleted: plugins/trunk/feedreader/templates/templates/feed.template
===================================================================
--- plugins/trunk/unported/feedreader/templates/feed.template	2007-01-04 22:42:15 UTC (rev 4499)
+++ plugins/trunk/feedreader/templates/templates/feed.template	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,57 +0,0 @@
-{include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=feedReader title=$locale->tr("feedReader")}
-<script type="text/javascript">
-{literal}
-function toggleArticle(articleId)
-{
-    // get the item from the DOM
-    rssItem = document.getElementById( articleId );
-    
-    // if nothing found, let's get out of here
-    if( !rssItem )
-        return false;
-        
-    // get the icon
-    icon = document.getElementById( 'img_'+articleId );        
-        
-    // toggle the whole thing
-    if( rssItem.style.display == 'block' ) {
-        rssItem.style.display = 'none';
-        icon.src = "plugins/feedreader/imgs/left.gif";
-    }
-    else {
-        rssItem.style.display = 'block';
-        icon.src = "plugins/feedreader/imgs/down.gif";        
-    }
-    
-    return true;
-}
-{/literal}
-</script>
-<div id="feed" style="margin-left: 15px; margin-right: 15px">
-{assign var=channel value=$rss->getChannel()}
-<h4>&raquo; {$channel->getTitle()}</h4>
-{if $channel->getDescription()}
-  <p>{$channel->getDescription()}</p>
-{/if}  
-<ul style="list-style: none;">
-{foreach from=$rss->getItems() item=rssItem}
-  <li>
-    <a onClick="javascript:toggleArticle('{$rssItem->getUniqueId()}');"><img id="img_{$rssItem->getUniqueId()}" src="plugins/feedreader/imgs/left.gif" alt="+" /></a>&nbsp;
-    {if $rssItem->hasEnclosures()}
-     <img src="plugins/feedreader/imgs/clip.gif" alt="RSS Enclosure" />
-    {/if}
-    <a href="{$rssItem->getLink()}">{$rssItem->getTitle()}</a><br/>
-    <div style="display:none;padding-bottom: 5px;" id="{$rssItem->getUniqueId()}">
-     <span style="font-size:small;color:red">
-      {foreach from=$rssItem->getEnclosures() item=rssEnc}
-       <a href="{$rssEnc->getUrl()}">{$rssEnc->getUrl()}</a> ({$rssEnc->getLength()})<br/>
-      {/foreach}
-     </span>
-     {$rssItem->getDescription()}
-    </div>
-  </li>
-{/foreach}
-</ul>
-{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Deleted: plugins/trunk/feedreader/templates/templates/feedlist.template
===================================================================
--- plugins/trunk/unported/feedreader/templates/feedlist.template	2007-01-04 22:42:15 UTC (rev 4499)
+++ plugins/trunk/feedreader/templates/templates/feedlist.template	2007-01-04 22:47:06 UTC (rev 4500)
@@ -1,68 +0,0 @@
-{include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=feedReader title=$locale->tr("feedReader")}
-<div id="list_nav_bar">
-<div id="list_nav_select">
-<form id="viewLinks" action="admin.php" method="post">
- <fieldset>
-  <legend>{$locale->tr("show_by")}</legend>
-   <div class="list_nav_option">
-    <label for="showCategory">{$locale->tr("category")}</label>
-	<br />
-	 <select name="showCategory" id="showCategory">
-      <option value="0">{$locale->tr("category_all")}</option>
-      {foreach from=$linkscategories item=category}
-      <option value="{$category->getId()}" {if $currentcategory == $category->getId()} selected="selected" {/if}>{$category->getName()}</option>
-      {/foreach}
-    </select>
-   </div>
-   <div class="list_nav_option">
-    <br />
-    <input type="hidden" name="op" value="feedReader">
-    <input type="submit" name="Show" value="{$locale->tr("show")}">
-   </div>
-  </fieldset> 
- </form> 
- </div>
- <br style="clear:both">
- </div>
-<div id="list">
- {if $viewIsSuccess}
-  {include file="$admintemplatepath/successmessage.template" message=$viewSuccessMessage}<br/>
- {/if}
- {if $viewIsError}
-  {include file="$admintemplatepath/errormessage.template" message=$viewErrorMessage}<br/>
- {/if}
-<table class="info">
- <thead>
-  <tr>
-   <th style="width:20px;">{$locale->tr("read")}</th>
-   <th style="width:570px;">{$locale->tr("name")}</th>
-   <th style="widht:185px";>{$locale->tr("last_read")}</th>
-  </tr>
- </thead>
- <tbody>
- {foreach from=$feeds item=feed}
-   {assign var=link value=$feed->getMyLink()}
-   {if $link->getRssFeed() != ""}
-    <td><a href="?op=readFeed&amp;feedId={$link->getId()}"><img src="imgs/rss_logo_small.gif" style="border:0px;" alt="Read" /></td>
-    {else}
-     <td>&nbsp;</td>
-    {/if}
-    <td class="col_highlighted">
-     <a href="{$link->getUrl()}" title="{$link->getDescription()}">{$link->getName()}</a><br/>
-    </td>
-    <td>
-     {assign var=lastRead value=$feed->getLastRead()}
-     {if $lastRead == ""}
-      <i>{$locale->tr("never_read")}</i>
-     {else} 
-      {$locale->formatDate($lastRead)}
-     {/if} 
-    </td>
-   </tr>
- {/foreach}
-</tbody>
-</table>
-</div>
-{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file



More information about the pLog-svn mailing list