[pLog-svn] r5281 - in plugins/branches/lifetype-1.2/unported/recenttrackbacks: . class/action class/view locale templates
mark at devel.lifetype.net
mark at devel.lifetype.net
Fri Apr 6 15:15:28 EDT 2007
Author: mark
Date: 2007-04-06 15:15:28 -0400 (Fri, 06 Apr 2007)
New Revision: 5281
Added:
plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksrssaction.class.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksrssview.class.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/rss20.template
Modified:
plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksconfigaction.class.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_CN.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_TW.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/pluginrecenttrackbacks.class.php
plugins/branches/lifetype-1.2/unported/recenttrackbacks/readme.txt
plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/recenttrackbacks.template
Log:
Ported recent trackbacks to LifeType 1.2
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksconfigaction.class.php 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksconfigaction.class.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -2,7 +2,7 @@
lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
- lt_include( PLOG_CLASS_PATH."plugins/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php" );
+ lt_include( PLOG_CLASS_PATH."plugins/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php" );
/**
* shows a form with the current configuration
Added: plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksrssaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksrssaction.class.php (rev 0)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksrssaction.class.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -0,0 +1,23 @@
+<?php
+
+ lt_include( PLOG_CLASS_PATH."class/action/blogaction.class.php" );
+ lt_include( PLOG_CLASS_PATH."plugins/recenttrackbacks/class/view/pluginrecenttrackbacksrssview.class.php" );
+
+ class PluginRecentTrackbacksRssAction extends BlogAction
+ {
+
+ function PluginRecentTrackbacksRssAction( $actionInfo, $request )
+ {
+ $this->BlogAction( $actionInfo, $request );
+ }
+
+ function perform()
+ {
+ $this->_view = new PluginRecentTrackbacksRssView( $this->_blogInfo );
+
+ $this->setCommonData();
+
+ return true;
+ }
+ }
+?>
\ No newline at end of file
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/action/pluginrecenttrackbacksupdateconfigaction.class.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -2,7 +2,8 @@
lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
lt_include( PLOG_CLASS_PATH."class/view/admin/adminplugintemplatedview.class.php" );
- lt_include( PLOG_CLASS_PATH."plugins/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+ lt_include( PLOG_CLASS_PATH."plugins/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php" );
/**
* updates the plugin configuration
@@ -22,12 +23,13 @@
$this->_pluginEnabled = $this->_request->getValue( "pluginEnabled" );
$this->_pluginEnabled = ($this->_pluginEnabled != "" );
$this->_maxTrackbacks = $this->_request->getValue( "maxTrackbacks" );
- if( $this->_maxTrackbacks <= 0 || !ctype_digit($this->_maxTrackbacks) ) {
+ $val = new IntegerValidator();
+ if( !$val->validate( $this->_maxTrackbacks ) ) {
$this->_view = new PluginRecentTrackbacksConfigView( $this->_blogInfo );
$this->_view->setErrorMessage( $this->_locale->tr("recenttrackbacks_error_maxtrackbacks"));
$this->setCommonData();
- return false;
+ return false;
}
return true;
@@ -48,20 +50,20 @@
$this->_view->setErrorMessage( $this->_locale->tr("error_updating_settings"));
$this->setCommonData();
- return false;
+ return false;
}
// if everything went ok...
$this->_blogInfo->setSettings( $blogSettings );
$this->_session->setValue( "blogInfo", $this->_blogInfo );
$this->saveSession();
-
+
$this->_view = new PluginRecentTrackbacksConfigView( $this->_blogInfo );
$this->_view->setSuccessMessage( $this->_locale->tr("recenttrackbacks_settings_saved_ok"));
$this->setCommonData();
// clear the cache
- CacheControl::resetBlogCache( $this->_blogInfo->getId());
+ CacheControl::resetBlogCache( $this->_blogInfo->getId());
return true;
}
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksconfigview.class.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -19,11 +19,11 @@
$blogSettings = $this->_blogInfo->getSettings();
$pluginEnabled = $blogSettings->getValue( "plugin_recenttrackbacks_enabled" );
$maxTrackbacks = $blogSettings->getValue( "plugin_recenttrackbacks_maxtrackbacks" );
- if ($maxTrackbacks == "") $maxTrackbacks = 10;
+ if ($maxTrackbacks == "") $maxTrackbacks = DEFAULT_ITEMS_PER_PAGE;
// create a view and export the settings to the template
$this->setValue( "pluginEnabled", $pluginEnabled );
- $this->setValue( "maxTrackbacks", $maxTrackbacks );
+ $this->setValue( "maxTrackbacks", $maxTrackbacks );
parent::render();
}
Added: plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksrssview.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksrssview.class.php (rev 0)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/class/view/pluginrecenttrackbacksrssview.class.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -0,0 +1,33 @@
+<?php
+
+ lt_include( PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php" );
+ lt_include( PLOG_CLASS_PATH."class/dao/trackbacks.class.php" );
+
+ class PluginRecentTrackbacksRssView extends PluginTemplatedView
+ {
+ function PluginRecentTrackbacksRssView($blogInfo){
+ $this->PluginTemplatedView( $blogInfo, "recenttrackbacks", "rss20" );
+ }
+
+ function render(){
+ $blogSettings = $this->_blogInfo->getSettings();
+ $pluginEnabled = $blogSettings->getValue( "plugin_recenttrackbacks_enabled" );
+ $maxTrackbacks = $blogSettings->getValue( "plugin_recenttrackbacks_maxtrackbacks" );
+ if($maxTrackbacks == "")
+ $maxTrackbacks = DEFAULT_ITEMS_PER_PAGE;
+
+ $blogTrackbacks = array();
+ $articleTrackbacks = new Trackbacks();
+ $blogTrackbacks = $articleTrackbacks->getBlogTrackbacks( $this->_blogInfo->getId(),
+ COMMENT_STATUS_NONSPAM,
+ "",
+ 1,
+ $maxTrackbacks );
+
+ $this->setValue("trackbacks", $blogTrackbacks);
+ $this->setContentType( 'text/xml' );
+ parent::render();
+ }
+
+ }
+?>
\ No newline at end of file
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_CN.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_CN.php 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_CN.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -5,13 +5,13 @@
$messages["view_trackback_by"] = "æ¥ç %s çå¼ç¨";
$messages["recenttrackbacks_maxtrackbacks"] = "æè¿å¼ç¨æ¾ç¤ºæ°é";
-$messages["recenttrackbacks_plugin_enabled"] = "å¯ç¨æä»¶";
-$messages["recenttrackbacks_plugin"] = "æè¿å¼ç¨æä»¶";
+$messages["recenttrackbacks_plugin_enabled"] = "å¯å¨å¤æç¨å¼";
+$messages["recenttrackbacks_plugin"] = "æè¿å¼ç¨å¤æç¨å¼";
$messages["recenttrackbacks_settings_saved_ok"] = "æè¿å¼ç¨è®¾ç½®å¨åæåã";
-$messages["recenttrackbacks_error_maxtrackbacks"] = "æè¿å¼ç¨æ¾ç¤ºæ°éå¿
é¡»è¦å¤§äº0!";
+$messages["recenttrackbacks_error_maxtrackbacks"] = "æè¿å¼ç¨æ¾ç¤ºæ°éå¿
é¡»è¦å¤§äº 0ã";
$messages["label_configuration"] = "设置";
-$messages["label_enable"] = "å¯ç¨";
+$messages["label_enable"] = "å¯å¨";
$messages["label_maxtrackbacks"] = "æ¾ç¤ºæ°ç®";
-?>
+?>
\ No newline at end of file
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_TW.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_TW.php 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/locale/locale_zh_TW.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -9,7 +9,7 @@
$messages["recenttrackbacks_plugin"] = "æè¿å¼ç¨å¤æç¨å¼";
$messages["recenttrackbacks_settings_saved_ok"] = "æè¿å¼ç¨è¨å®å²åæåã";
-$messages["recenttrackbacks_error_maxtrackbacks"] = "æè¿å¼ç¨é¡¯ç¤ºæ¸éå¿
é è¦ > 0!";
+$messages["recenttrackbacks_error_maxtrackbacks"] = "æè¿å¼ç¨é¡¯ç¤ºæ¸éå¿
é è¦å¤§æ¼ 0ã";
$messages["label_configuration"] = "è¨å®";
$messages["label_enable"] = "åå";
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/pluginrecenttrackbacks.class.php
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/pluginrecenttrackbacks.class.php 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/pluginrecenttrackbacks.class.php 2007-04-06 19:15:28 UTC (rev 5281)
@@ -1,50 +1,50 @@
<?php
lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
- lt_include( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
- lt_include( PLOG_CLASS_PATH."class/dao/trackbacks.class.php" );
/**
- * Plugin that offers features to return a recent trackbacks from the current blog
+ * Plugin that offers features to return a recent article trackbacks from the current blog
*/
class PluginRecentTrackbacks extends PluginBase
{
- var $prefix;
var $pluginEnabled;
var $maxTrackbacks;
-
- function PluginRecentTrackbacks()
+
+ function PluginRecentTrackbacks($source = "")
{
- $this->PluginBase();
-
+ $this->PluginBase($source);
$this->id = "recenttrackbacks";
- $this->author = "Mark Wu";
- $this->desc = "This plugin offers the most recently article trackbacks.";
+ $this->version = "20070407";
- $this->prefix = Db::getPrefix();
-
+ $this->author = "Mark Wu";
+ $this->desc = "This plugin offers the most recently posted article trackbacks.";
$this->locales = Array( "en_UK" , "zh_TW" , "zh_CN", "es_ES" );
-
- $this->init();
-
+
+ if( $source == "admin" )
+ $this->initAdmin();
+ else
+ $this->init();
}
- function init()
- {
+ function initAdmin(){
$this->registerAdminAction( "recenttrackbacks", "PluginRecentTrackbacksConfigAction" );
- $this->registerAdminAction( "updateRecentTrackbacksConfig", "PluginRecentTrackbacksUpdateConfigAction" );
-
+ $this->registerAdminAction( "updateRecentTrackbacksConfig",
+ "PluginRecentTrackbacksUpdateConfigAction" );
$menu =& Menu::getMenu();
- if( !$menu->entryExists( "/menu/controlCenter/manageRecentPlugins" ))
+ if( !$menu->entryExists( "/menu/controlCenter/manageRecentPlugins" ))
$this->addMenuEntry( "/menu/controlCenter", "manageRecentPlugins", "", "", true, false );
$this->addMenuEntry( "/menu/controlCenter/manageRecentPlugins", "RecentTrackbacks", "?op=recenttrackbacks", "" );
}
+ function init(){
+ $this->registerBlogAction( "recenttrackbacksrss", "PluginRecentTrackbacksRssAction" );
+ }
+
function register()
{
$blogSettings = $this->blogInfo->getSettings();
$this->pluginEnabled = $blogSettings->getValue( "plugin_recenttrackbacks_enabled" );
- $this->maxTrackbacks = $blogSettings->getValue( "plugin_recenttrackbacks_maxtrackbacks" );
+ $this->maxTrackbacks = $blogSettings->getValue( "plugin_recenttrackbacks_maxtrackbacks", DEFAULT_ITEMS_PER_PAGE );
}
function isEnabled()
@@ -55,68 +55,52 @@
/**
* Returns the recent trackbacks object of current blog
*/
- function getRecentTrackbacks($maxTrackbacks = 0, $based = 'BLOG')
+ function getRecentTrackbacks()
{
- $trackbacks = new Trackbacks();
+ lt_include( PLOG_CLASS_PATH."class/dao/trackbacks.class.php" );
+
$blogId = $this->blogInfo->getId();
-
- if ($based == 'BLOG') {
- $query = "SELECT ".$this->prefix."trackbacks.* FROM ".$this->prefix."trackbacks, ".$this->prefix."articles";
- $query .= " WHERE ".$this->prefix."trackbacks.article_id = ".$this->prefix."articles.id AND ".$this->prefix."articles.blog_id = ".$blogId." AND ".$this->prefix."articles.status = 1";
- $query .= " ORDER BY ".$this->prefix."trackbacks.date DESC";
- } elseif ($based == 'SITE') {
- $query = "SELECT ".$this->prefix."trackbacks.* FROM ".$this->prefix."trackbacks, ".$this->prefix."articles";
- $query .= " WHERE ".$this->prefix."trackbacks.article_id = ".$this->prefix."articles.id AND ".$this->prefix."articles.status = 1";
- $query .= " ORDER BY ".$this->prefix."trackbacks.date DESC";
- } else {
- return false;
- }
+ $articleTrackbacks = new Trackbacks();
+ $trackbacks = $articleTrackbacks->getBlogTrackbacks( $blogId, COMMENT_STATUS_NONSPAM, "", 1, $this->maxTrackbacks );
- if( $maxTrackbacks > 0 )
- {
- $query .= " LIMIT " . $maxTrackbacks;
- } else {
- $query .= " LIMIT " . $this->maxTrackbacks;
- }
-
- $result = $trackbacks->_db->Execute( $query );
-
- if( !$result )
- return false;
-
- $recenttrackbacks = Array();
- while( $row = $result->FetchRow()) {
- array_push( $recenttrackbacks, $trackbacks->_fillTrackbackInformation($row));
- }
-
- return $recenttrackbacks;
+ return( $trackbacks );
}
-
+
+ /**
+ * Returns an article given an id
+ * This is needed here because we need to get various
+ * articles, not just the most recent, etc. that are generally
+ * available to the templates.
+ */
function getArticle( $artId )
{
+ lt_include( PLOG_CLASS_PATH."class/dao/articles.class.php" );
$articles = new Articles();
- $blogId = $this->blogInfo->getId();
-
- $query = "SELECT * FROM ".$this->prefix."articles WHERE id = ".$artId;
+ return $articles->getArticle($artId);
+ }
- $query .= " AND blog_id = ".$blogId;
+ function getRssFeedUrl(){
+ lt_include( PLOG_CLASS_PATH."class/net/rawrequestgenerator.class.php" );
- $query .= ";";
+ $rg = new RawRequestGenerator($this->blogInfo);
+ $rg->addParameter( "op", "recenttrackbacksrss" );
+ $rg->addParameter( "blogId", $this->blogInfo->getId());
- // we send the query and then fetch the first array with the result
- $result = $articles->_db->Execute( $query );
+ $feedUrl = $rg->getIndexUrl().$rg->getRequest();
+ return $feedUrl;
+ }
- if( $result == false )
- return false;
-
- if ( $result->RecordCount() == 0)
- return false;
-
- $row = $result->FetchRow( $result );
-
- $article = $articles->_fillArticleInformation( $row );
-
- return $article;
+ function getPluginConfigurationKeys(){
+ lt_include(PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php");
+ return (Array(
+ Array("name" => "plugin_recenttrackbacks_enabled",
+ "type" => "boolean"),
+ Array("name" => "plugin_recenttrackbacks_maxtrackbacks",
+ "validator" => new IntegerValidator(),
+ "type" => "integer", "allowEmpty" => true ),
+ )
+ );
}
+
}
?>
\ No newline at end of file
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/readme.txt
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/readme.txt 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/readme.txt 2007-04-06 19:15:28 UTC (rev 5281)
@@ -1,20 +1,18 @@
Plugin: Recent Trackbacks
Author: Mark Wu
-Release Date: 2005/01/23
-Version: 1.0
+Release Date: 2007/04/06
+Version: 20070406
-This plugin offers the most recently article trackbacks. Usage as follow:
+This plugin offers the most recently article trackbacks (for regular
+templates and an RSS feed). Usage as follow:
You can use:
1. $recenttrackbacks->isEnabled() to check the plugin is enabled or not.
-2. $recenttrackbacks->getRecentTrackbacks( $maxTrackbacks , $based ) to get the recent trackbacks.
+2. $recenttrackbacks->getRecentTrackbacks() to get the recent trackbacks.
+3. $recenttrackbacks->getRssFeedUrl() to get the URL to the recent trackbacks feed for the current blog
-Where:
-1. $maxTrackbacks is the the max trackbacks you want to show. Default is 10.
-2. $based is return the site-wide or blog-wide trackbacks. "BLOG" means blog-wide, and "SITE" means site-wide. Default is "BLOG".
-
Example:
-Add the following code to footer.template or header.template:
+Add the following code to your template file:
{if $recenttrackbacks->isEnabled()}
<h2>Recent Trackbacks</h2>
{assign var=trackbacks value=$recenttrackbacks->getRecentTrackbacks()}
@@ -22,7 +20,7 @@
{foreach from=$trackbacks item=trackback}
{assign var=trackbackpostid value=$trackback->getArticleId()}
{assign var=trackbackpost value=$recenttrackbacks->getArticle($trackbackpostid)}
-<li><a title="View trackbacks by {$trackback->getBlogName()}" href="{$trackback->getUrl()}"><b>{$trackback->getBlogName()}¡G</b>{$trackback->getTitle()}</a></li>
+<li><a title="View trackbacks by {$trackback->getBlogName()}" href="{$trackback->getUrl()}"><b>{$trackback->getBlogName()}:</b>{$trackback->getTitle()}</a></li>
{/foreach}
-</ul>
-{/if}
+</ul>
+{/if}
\ No newline at end of file
Modified: plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/recenttrackbacks.template
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/recenttrackbacks.template 2007-04-06 18:53:20 UTC (rev 5280)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/recenttrackbacks.template 2007-04-06 19:15:28 UTC (rev 5281)
@@ -8,25 +8,36 @@
<div class="field">
<label for="pluginEnabled">{$locale->tr("label_enable")}</label>
<span class="required"></span>
- <div class="formHelp">
- <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if} value="1" />{$locale->tr("recenttrackbacks_plugin_enabled")}
+ <div class="formHelp">
+ <input class="checkbox" type="checkbox" name="pluginEnabled"
+ id="pluginEnabled" {if $pluginEnabled} checked="checked" {/if}
+ {user_cannot_override
+ key=plugin_recenttrackbacks_enabled}disabled="disabled"
+ {/user_cannot_override}
+ value="1"
+ />{$locale->tr("recenttrackbacks_plugin_enabled")}
</div>
+
</div>
-
+
<div class="field">
<label for="maxTrackbacks">{$locale->tr("label_maxtrackbacks")}</label>
<span class="required">*</span>
<div class="formHelp">{$locale->tr("recenttrackbacks_maxtrackbacks")}</div>
- <input class="text" type="text" name="maxTrackbacks" id="maxTrackbacks" value="{$maxTrackbacks}" width="10" />
+ <input class="text" type="text" name="maxTrackbacks" id="maxTrackbacks"
+ {user_cannot_override
+ key=plugin_recenttrackbacks_maxtrackbacks}readonly="readonly"
+ {/user_cannot_override}
+ value="{$maxTrackbacks}" width="10" />
</div>
</fieldset>
-
- <div class="buttons">
+
+ <div class="buttons">
<input type="hidden" name="op" value="updateRecentTrackbacksConfig" />
- <input type="reset" name="{$locale->tr("reset")}" />
+ <input type="reset" name="{$locale->tr("reset")}" />
<input type="submit" name="{$locale->tr("update_settings")}" value="{$locale->tr("update")}" />
- </div>
+ </div>
</form>
{include file="$admintemplatepath/footernavigation.template"}
-{include file="$admintemplatepath/footer.template"}
\ No newline at end of file
+{include file="$admintemplatepath/footer.template"}
Added: plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/rss20.template
===================================================================
--- plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/rss20.template (rev 0)
+++ plugins/branches/lifetype-1.2/unported/recenttrackbacks/templates/rss20.template 2007-04-06 19:15:28 UTC (rev 5281)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="{$locale->getCharset()}"?>
+<?xml-stylesheet href="{$url->getUrl("/styles/rss.css")}" type="text/css"?>
+<rss version="2.0"
+ xmlns:content="http://purl.org/rss/1.0/modules/content/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+>
+ <channel>
+ <title>Trackbacks on {$blog->getBlog()|escape}</title>
+ <link>{$url->blogLink()}</link>
+ <description>{$blog->getAbout()|escape}</description>
+ <pubDate>{$locale->formatDateAsRFC822($now)}</pubDate>
+ <generator>http://www.lifetype.net</generator>
+ {foreach from=$trackbacks item=trackback}
+ {assign var="TrackbacksRssPost" value=$trackback->getArticle()}
+ <item>
+ <title>
+ {if $trackback->getTitle() != ""}
+ {$trackback->getTitle()|escape}
+ {else}
+ Trackback on {$TrackbacksRssPost->getTopic()|escape}
+ {/if}
+ </title>
+ <description>
+ {if $trackback->getExcerpt() != ""}
+ {$trackback->getExcerpt()|escape}
+ {else}
+ No trackback
+ {/if}
+ </description>
+ <link>{$trackback->getUrl()}</link>
+ <trackbacks>{$url->postTrackbackStatsLink($TrackbacksRssPost)}</trackbacks>
+ <guid>{$url->postTrackbackStatsLink($TrackbacksRssPost)}#{$trackback->getId()}</guid>
+ <dc:creator>{$trackback->getBlogname()|escape}</dc:creator>
+ {foreach from=$TrackbacksRssPost->getCategories() item=category}
+ <category>{$category->getName()|escape}</category>
+ {/foreach}
+ {assign var="trackbackDate" value=$trackback->getDateObject()}
+ <pubDate>{$locale->formatDateAsRFC822($trackbackDate, $blog)}</pubDate>
+ <source url="{$url->rssLink("rss20")}">{$blog->getBlog()|escape}</source>
+ </item>
+ {/foreach}
+ </channel>
+</rss>
More information about the pLog-svn
mailing list