summaryrefslogtreecommitdiff
path: root/plugins/data.rss.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2006-03-22 10:24:20 +0000
committerMax Kremmel <xing@synapse.plus.com>2006-03-22 10:24:20 +0000
commite84e50f9f05d4d2060961af0b19b797b57963543 (patch)
tree64f822d873880fa278f5adb230395f551cd292ad /plugins/data.rss.php
parent933cae3c42dbaf1f497d4792ff01366b19c484be (diff)
downloadliberty-e84e50f9f05d4d2060961af0b19b797b57963543.tar.gz
liberty-e84e50f9f05d4d2060961af0b19b797b57963543.tar.bz2
liberty-e84e50f9f05d4d2060961af0b19b797b57963543.zip
dos2unix to avoid EOL problems on win
Diffstat (limited to 'plugins/data.rss.php')
-rw-r--r--plugins/data.rss.php152
1 files changed, 76 insertions, 76 deletions
diff --git a/plugins/data.rss.php b/plugins/data.rss.php
index 91ab555..b124dba 100644
--- a/plugins/data.rss.php
+++ b/plugins/data.rss.php
@@ -1,76 +1,76 @@
-<?php
-/**
- * @version $Revision: 1.4 $
- * @package liberty
- * @subpackage plugins_data
- */
-// +----------------------------------------------------------------------+
-// | Copyright (c) 2004, bitweaver.org
-// +----------------------------------------------------------------------+
-// | All Rights Reserved. See copyright.txt for details and a complete list of authors.
-// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
-// |
-// | For comments, please use phpdocu.sourceforge.net documentation standards!!!
-// | -> see http://phpdocu.sourceforge.net/
-// +----------------------------------------------------------------------+
-// | Author (TikiWiki): Oliver Hertel <ohertel@users.sourceforge.net>
-// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
-// | by: StarRider <starrrider@users.sourceforge.net>
-// +----------------------------------------------------------------------+
-// $Id: data.rss.php,v 1.4 2006/01/14 19:54:56 squareing Exp $
-
-/**
- * definitions
- */
-global $gLibertySystem;
-
-define( 'PLUGIN_GUID_RSS', 'datarss' );
-
-global $gLibertySystem;
-$pluginParams = array ( 'tag' => 'RSS',
- 'auto_activate' => TRUE,
- 'requires_pair' => FALSE,
- 'load_function' => 'rss_parse_data',
- 'title' => 'RSS Feed',
- 'help_page' => 'DataPluginRSS',
- 'description' => tra("Display RSS Feeds"),
- 'help_function' => 'rss_extended_help',
- 'syntax' => "{RSS id= max= }",
- 'plugin_type' => DATA_PLUGIN
- );
-$gLibertySystem->registerPlugin( PLUGIN_GUID_RSS, $pluginParams );
-$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_RSS );
-
-function rss_extended_help() {
- return 'NO HELP WRITTEN FOR {RSS}';
-}
-
-function rss_parse_data( $data, $params ) {
- $repl = '';
- if( @BitBase::verifyId( $params['id'] ) ) {
- global $rsslib;
- require_once( RSS_PKG_PATH.'rss_lib.php' );
-
- $max = !empty( $params['max'] ) ? $params['max'] : 99;
-
- $rssdata = $rsslib->get_rss_module_content( $params['id'] );
- $items = $rsslib->parse_rss_data( $rssdata, $params['id'] );
-
- $repl = '<ul class="rsslist">';
-
- for ($j = 1; $j < count($items) && $j < $max; $j++) {
- $repl .= '<li><a href="' . $items[$j]["link"] . '">' . $items[$j]["title"] . '</a>';
- if ($items[$j]["pubdate"] <> '') {
- $repl .= ' <small>('.$items[$j]["pubdate"].')</small>';
- }
- $repl .= '</li>';
- }
-
- $repl .= '</ul>';
- }else{
- $repl = '<b>rss can not be found, id must be a number</b>';
- }
- return $repl;
-}
-
-?>
+<?php
+/**
+ * @version $Revision: 1.5 $
+ * @package liberty
+ * @subpackage plugins_data
+ */
+// +----------------------------------------------------------------------+
+// | Copyright (c) 2004, bitweaver.org
+// +----------------------------------------------------------------------+
+// | All Rights Reserved. See copyright.txt for details and a complete list of authors.
+// | Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
+// |
+// | For comments, please use phpdocu.sourceforge.net documentation standards!!!
+// | -> see http://phpdocu.sourceforge.net/
+// +----------------------------------------------------------------------+
+// | Author (TikiWiki): Oliver Hertel <ohertel@users.sourceforge.net>
+// | Reworked for Bitweaver (& Undoubtedly Screwed-Up)
+// | by: StarRider <starrrider@users.sourceforge.net>
+// +----------------------------------------------------------------------+
+// $Id: data.rss.php,v 1.5 2006/03/22 10:24:20 squareing Exp $
+
+/**
+ * definitions
+ */
+global $gLibertySystem;
+
+define( 'PLUGIN_GUID_RSS', 'datarss' );
+
+global $gLibertySystem;
+$pluginParams = array ( 'tag' => 'RSS',
+ 'auto_activate' => TRUE,
+ 'requires_pair' => FALSE,
+ 'load_function' => 'rss_parse_data',
+ 'title' => 'RSS Feed',
+ 'help_page' => 'DataPluginRSS',
+ 'description' => tra("Display RSS Feeds"),
+ 'help_function' => 'rss_extended_help',
+ 'syntax' => "{RSS id= max= }",
+ 'plugin_type' => DATA_PLUGIN
+ );
+$gLibertySystem->registerPlugin( PLUGIN_GUID_RSS, $pluginParams );
+$gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_RSS );
+
+function rss_extended_help() {
+ return 'NO HELP WRITTEN FOR {RSS}';
+}
+
+function rss_parse_data( $data, $params ) {
+ $repl = '';
+ if( @BitBase::verifyId( $params['id'] ) ) {
+ global $rsslib;
+ require_once( RSS_PKG_PATH.'rss_lib.php' );
+
+ $max = !empty( $params['max'] ) ? $params['max'] : 99;
+
+ $rssdata = $rsslib->get_rss_module_content( $params['id'] );
+ $items = $rsslib->parse_rss_data( $rssdata, $params['id'] );
+
+ $repl = '<ul class="rsslist">';
+
+ for ($j = 1; $j < count($items) && $j < $max; $j++) {
+ $repl .= '<li><a href="' . $items[$j]["link"] . '">' . $items[$j]["title"] . '</a>';
+ if ($items[$j]["pubdate"] <> '') {
+ $repl .= ' <small>('.$items[$j]["pubdate"].')</small>';
+ }
+ $repl .= '</li>';
+ }
+
+ $repl .= '</ul>';
+ }else{
+ $repl = '<b>rss can not be found, id must be a number</b>';
+ }
+ return $repl;
+}
+
+?>