summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2005-10-23 14:41:54 +0000
committerMax Kremmel <xing@synapse.plus.com>2005-10-23 14:41:54 +0000
commitba0af314e3198172127e5e8c0f00a5cd5a758592 (patch)
tree6da5084a55ccec4987611bff32148ccaad2dcfa3 /index.php
parent7e5f14c9a98e9cb0c3214555b14e1581703f2e18 (diff)
downloadrss-ba0af314e3198172127e5e8c0f00a5cd5a758592.tar.gz
rss-ba0af314e3198172127e5e8c0f00a5cd5a758592.tar.bz2
rss-ba0af314e3198172127e5e8c0f00a5cd5a758592.zip
merge recent changes into HEAD
Diffstat (limited to 'index.php')
-rw-r--r--index.php55
1 files changed, 51 insertions, 4 deletions
diff --git a/index.php b/index.php
index 3e305fe..145e9b1 100644
--- a/index.php
+++ b/index.php
@@ -1,6 +1,53 @@
-<?php
+<?php
+/**
+ * $Header: /cvsroot/bitweaver/_bit_rss/index.php,v 1.2 2005/10/23 14:41:54 squareing Exp $
+ *
+ * Copyright ( c ) 2004 bitweaver.org
+ * Copyright ( c ) 2003 tikwiki.org
+ * Copyright ( c ) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
+ * 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
+ *
+ * $Id: index.php,v 1.2 2005/10/23 14:41:54 squareing Exp $
+ * @package pigeonholes
+ * @subpackage functions
+ */
- // This is not a package.
- header ("location: ../index.php");
+/**
+ * required setup
+ */
+require_once( '../bit_setup_inc.php' );
-?> \ No newline at end of file
+$gBitSystem->verifyPackage( 'rss' );
+
+foreach( $gBitSystem->mPackages as $pkg => $pkgInfo ) {
+ if( is_file( $pkgInfo['path'].$pkg.'_rss.php' ) ) {
+ $pkgs[$pkg] = $pkg;
+ }
+}
+$gBitSmarty->assign( "pkgs", $pkgs );
+
+$feedFormat = array(
+ 0 => "RSS 0.91",
+ 1 => "RSS 1.0",
+ 2 => "RSS 2.0",
+ 3 => "PIE 0.1",
+ 4 => "MBOX",
+ 5 => "ATOM",
+ 6 => "ATOM 0.3",
+ 7 => "OPML",
+ 8 => "HTML",
+ 9 => "JS",
+);
+$gBitSmarty->assign( "feedFormat",$feedFormat );
+
+if( !empty( $_REQUEST['get_feed'] ) ) {
+ $feedlink['url'] = constant( strtoupper( $_REQUEST['pkg'] ).'_PKG_URL' ).$_REQUEST['pkg'].'_rss.php?version='.$_REQUEST['format'];
+ $feedlink['title'] = $_REQUEST['pkg'].' - '.$feedFormat[$_REQUEST['format']];
+ $feedlink['pkg'] = $_REQUEST['pkg'];
+ $feedlink['format'] = $_REQUEST['format'];
+ $gBitSmarty->assign( 'feedlink', $feedlink );
+}
+
+$gBitSystem->display( 'bitpackage:rss/rss.tpl', tra( 'Select Feed' ) );
+?>