Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/plugin/rss/index.php

57 lines
1.5 KiB

13 years ago
<?php
13 years ago
$plugin = RssPlugin::create();
$rss = $plugin->get_rss();
13 years ago
13 years ago
$title = $plugin->get_block_title();
13 years ago
$title = $title ? "<h4>$title</h4>" : '';
13 years ago
$css = $plugin->get_css();
$css = $css ? "<style type=\"text/css\" scoped=\"scoped\">$css</style>" : '';
$bullet = api_get_path(WEB_PLUGIN_PATH).'rss/resources/arrow-bullet.png';
13 years ago
if (empty($rss)) {
Display::display_warning_message(get_lang('NoRSSItem'));
13 years ago
return;
13 years ago
}
echo<<<EOT
<div class="well sidebar-nav rss">
$css
<style type="text/css" scoped="scoped">
13 years ago
.gfg-listentry-highlight{
background-image: url('$bullet');
}
</style>
<div class="menusection">
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script src="http://www.google.com/uds/solutions/dynamicfeed/gfdynamicfeedcontrol.js" type="text/javascript"></script>
<script type="text/javascript">
google.load('feeds', '1');
function OnLoad() {
var feeds = [
{
url: '$rss'
}
];
var options = {
stacked : true,
numResults : 5,
horizontal : false,
title : 'Nouvelles!'
};
new GFdynamicFeedControl(feeds, 'news', options);
}
google.setOnLoadCallback(OnLoad);
</script>
$title
<div id="news" class="" style="min-height:300px;"></div>
</div>
13 years ago
</div>
EOT;