1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<?php
/**
* $Header: /cvsroot/bitweaver/_bit_rss/index.php,v 1.4 2006/12/09 23:42:07 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.4 2006/12/09 23:42:07 squareing Exp $
* @package pigeonholes
* @subpackage functions
*/
/**
* required setup
*/
require_once( '../bit_setup_inc.php' );
$gBitSystem->verifyPackage( 'rss' );
foreach( $gBitSystem->mPackages as $pkg => $pkgInfo ) {
// Install may be chmod 000 if user followed directions
if( $pkg != 'install' && is_file( $pkgInfo['path'].$pkg.'_rss.php' ) ) {
$pkgs[$pkg] = ( $gBitSystem->isFeatureActive( $pkg."_rss_title" ) ? $gBitSystem->getConfig( $pkg."_rss_title" ) : $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' ) );
?>
|