1
e4elid
Not displaying ADV: in xoopsheadline
  • 2004/10/19 16:11

  • e4elid

  • Just popping in

  • Posts: 5

  • Since: 2004/1/17


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;
}
}

2
gguddu
Re: Not displaying ADV: in xoopsheadline
  • 2005/6/19 15:41

  • gguddu

  • Just popping in

  • Posts: 48

  • Since: 2004/11/17


moreover changed the ad text in its news feed from "ADV:" to "Sponsored Link". so the above patch need to be corrected.

pls change
if (substr($items[0][title],0,4) == "ADV:")
to
if (substr($items[0][title],-14) == "Sponsored Link")

Cheers,
Rajesh

Login

Who's Online

466 user(s) are online (361 user(s) are browsing Support Forums)


Members: 0


Guests: 466


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits