2012-05-21 04:58:26 +02:00
|
|
|
<?php
|
2013-08-14 23:21:07 +02:00
|
|
|
|
2013-04-11 12:35:22 +02:00
|
|
|
if(class_exists('Widget')) {
|
2013-08-14 23:21:07 +02:00
|
|
|
|
2012-05-21 04:58:26 +02:00
|
|
|
/**
|
2013-04-11 12:35:22 +02:00
|
|
|
* A simple widget that just shows a link
|
|
|
|
* to this website's blog RSS, with an RSS
|
|
|
|
* icon.
|
2012-05-21 04:58:26 +02:00
|
|
|
*
|
2013-04-11 12:35:22 +02:00
|
|
|
* @package blog
|
2012-05-21 04:58:26 +02:00
|
|
|
*/
|
2013-04-11 12:35:22 +02:00
|
|
|
class SubscribeRSSWidget extends Widget {
|
|
|
|
|
2013-08-14 23:21:07 +02:00
|
|
|
private static $title = 'Subscribe via RSS';
|
|
|
|
|
|
|
|
private static $cmsTitle = 'Subscribe via RSS widget';
|
|
|
|
|
|
|
|
private static $description = 'Shows a link allowing a user to subscribe to this blog via RSS.';
|
2012-05-21 04:58:26 +02:00
|
|
|
|
2013-04-11 12:35:22 +02:00
|
|
|
/**
|
|
|
|
* Return an absolute URL based on the BlogHolder
|
|
|
|
* that this widget is located on.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
function getRSSLink() {
|
|
|
|
Requirements::themedCSS('subscribersswidget');
|
|
|
|
$container = BlogTree::current();
|
|
|
|
if ($container) return $container->Link('rss');
|
|
|
|
}
|
2012-05-21 04:58:26 +02:00
|
|
|
}
|
|
|
|
|
2013-08-14 23:21:07 +02:00
|
|
|
}
|