Skip to content
Permalink
Browse files

[plugin:showrss] add conf (array) $this->conf['ng_sites']

A config that exclude URL from results.
  • Loading branch information
nao-pon committed Jul 7, 2014
1 parent 9eec0b4 commit ecc547aeaa00456e995bee8a62b16fa4f0e0e89a
Showing with 11 additions and 1 deletion.
  1. +11 −1 xoops_trust_path/modules/xpwiki/plugin/showrss.inc.php
@@ -20,6 +20,10 @@ function plugin_showrss_init () {
// URL of which it is effective is html is judged from an agreement forward.
// 'http://...',
);
$this->conf['ng_sites'] = array(
// Exclude URL from results.
// 'http://...',
);
}

// Show related extensions are found or not
@@ -205,8 +209,14 @@ function XpWikiShowRSS_html(& $xpwiki, $data, $show_description = '', $max = 10)
if ($count > $max) break;
foreach ($items as $item) {
if ($count > $max) break;
if ($link = @ $item['LINK']) {
foreach($conf['ng_sites'] as $ng_site) {
if ($ng_site && strpos($link, $ng_site) === 0) {
continue 2;
}
}
}
$count++;
$link = @ $item['LINK'];

$this->func->encode_numericentity($item['TITLE'], $this->cont['SOURCE_ENCODING'], 'UTF-8');
$linkstr = mb_convert_encoding($item['TITLE'], $this->cont['SOURCE_ENCODING'], 'UTF-8');

0 comments on commit ecc547a

Please sign in to comment.
You can’t perform that action at this time.