diff --git a/bureau/admin/main.php b/bureau/admin/main.php index e0066ad1..7d39b9e4 100644 --- a/bureau/admin/main.php +++ b/bureau/admin/main.php @@ -46,6 +46,25 @@ if ($mem->user["lastfail"]) { $mem->resetlast(); +# use MagpieRSS to syndicate content from another site if available + +# this should work, since the debian package installs it in +# /usr/share/php, which is in the include path +if (include_once('magpierss/rss_fetch.inc')) { + $rss = fetch_rss( variable_get('rss_feed') ); + + if ($rss) { + echo "

" . _("Latest news") . "

"; + foreach ($rss->items as $item) { + $href = $item['link']; + $title = $item['title']; + echo "

$title

"; + echo $item['summary']; + } + echo ""; + } +} + if($admin->enabled) { $expiring = $admin->renew_get_expiring_accounts(); diff --git a/install/mysql.sql b/install/mysql.sql index b7d56156..066df451 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -419,6 +419,9 @@ the domain "username.example.com". If this is set to 0 or a "false" string, it will be ignored.'); +INSERT IGNORE INTO `variable` (name, value, comment) VALUES ('rss_feed', 0, +'This is an RSS feed that will be displayed on the users homepages when +they log in. Set this to 0 or a "false" string to ignore.'); -- -- Table structure for table `dbusers` --