Discussion:
svn: /pear/pearweb/trunk/public_html/channels/ index.php xbel.php
Daniel O'Connor
2011-04-12 22:18:55 UTC
Permalink
clockwerx Tue, 12 Apr 2011 22:18:55 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=310169

Log:
Add XBEL feed

Changed paths:
U pear/pearweb/trunk/public_html/channels/index.php
A pear/pearweb/trunk/public_html/channels/xbel.php

Modified: pear/pearweb/trunk/public_html/channels/index.php
===================================================================
--- pear/pearweb/trunk/public_html/channels/index.php 2011-04-12 22:06:42 UTC (rev 310168)
+++ pear/pearweb/trunk/public_html/channels/index.php 2011-04-12 22:18:55 UTC (rev 310169)
@@ -55,7 +55,7 @@
<?php } ?>
</ul>

-<p><a href="/channels/add.php">Add your site</a></p>
+<p><a href="/channels/add.php">Add your site</a>, or <a href="/channels/xbel.php" rel="alternate">grab the bookmarks</a></p>

<?php if (auth_check('pear.admin')) { ?>
<h2>Sites to be Approved</h2>

Added: pear/pearweb/trunk/public_html/channels/xbel.php
===================================================================
--- pear/pearweb/trunk/public_html/channels/xbel.php (rev 0)
+++ pear/pearweb/trunk/public_html/channels/xbel.php 2011-04-12 22:18:55 UTC (rev 310169)
@@ -0,0 +1,35 @@
+<?php
+/*
+ +----------------------------------------------------------------------+
+ | PEAR Web site version 1.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2005 The PEAR Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.0 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/3_0.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | ***@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Martin Jansen <***@php.net> |
+ +----------------------------------------------------------------------+
+ $Id: index.php 310104 2011-04-09 15:38:46Z clockwerx $
+*/
+require_once 'pear-database-channel.php';
+
+$channels = channel::listActive();
+
+header('Content-type: application/xbel+xml');
+?>
+<?xml version="1.0"?>
+<xbel version="1.0">
+
+<?php foreach ($channels as $channel) { ?>
+ <bookmark href="<?php print $channel['project_link']; ?>">
+ <title><?php print htmlentities($channel['name']); ?></title>
+ <desc><?php print htmlentities($channel['project_label']); ?></desc>
+ </bookmark>
+<?php } ?>
+</xbel>

Loading...