1
Some RSS feeds like moreover contain advertisements as the first title. If you do not want to display them in your headlines, the following patch may help
--- modules/xoopsheadline/class/headlinerenderer.org
+++ modules/xoopsheadline/class/headlinerenderer.php
@@ -100,6 +100,9 @@
$this->_tpl->assign('show_full', false);
}
$items =& $this->_parser->getItems();
+ if (substr($items[0][title],0,4) == "ADV:") {
+ array_shift($items);
+ }
$count = count($items);
$max = ($count > $this->_hl->getVar('headline_mainmax')) ? $this->_hl->getVar('headline_mainmax') : $count;
for ($i = 0; $i < $max; $i++) {
@@ -132,6 +135,9 @@
$this->_tpl->assign_by_ref('image', $image_data);
}
$items =& $this->_parser->getItems();
+ if (substr($items[0][title],0,4) == "ADV:") {
+ array_shift($items);
+ }
$count = count($items);
$max = ($count > $this->_hl->getVar('headline_blockmax')) ? $this->_hl->getVar('headline_blockmax') : $count;
for ($i = 0; $i < $max; $i++) {
@@ -218,4 +224,4 @@
return $xmlfile;
}
}