Commit cf99d2ad authored by Erase's avatar Erase
Browse files

Changement des cibles de recherche : ajout de la recherche dans le lien +...

Changement des cibles de recherche : ajout de la recherche dans le lien + ajout de recherche dans plusieurs champs précis
parent 62bcf36a
......@@ -14,7 +14,10 @@
ini_set('display_errors', (Config::get('displayErrors') ? 1 : 0));
error_reporting((Config::get('displayErrors') || Config::get('logErrors')) ? 1 : 0);
/*
/*
** For example
*/
$_links = array(
"http://www.lemonde.fr/rss/une.xml",
"https://rss.framasoft.org/"
......@@ -25,6 +28,6 @@
echo "<pre>";
var_dump($feeds->objParseFeed->items)
*/
?>
......@@ -105,12 +105,19 @@ class FeedReader
// Where
$where = \Config::get('where');
if(!is_null($where) && $where == 'title'){
$merge_str = strtolower($items[$i]['title']);
}elseif(!is_null($where) && $where == 'description'){
$merge_str = strtolower($items[$i]['description']);
$_cible = explode('|', \Config::get('where'));
if(count($_cible) > 1){
$merge_str = "";
foreach ($_cible as $cible) {
$merge_str .= " ".strtolower($items[$i][$cible]);
}
}else{
$merge_str = strtolower($items[$i]['title']." ".$items[$i]['description']);
if($_cible[0] && $_cible[0] != 'all'){
$merge_str = strtolower($items[$i][$_cible[0]]);
}else{
$merge_str = strtolower($items[$i]['title']." ".$items[$i]['description']." ".$items[$i]['link']);
}
}
// Bad and star words
......
......@@ -61,4 +61,29 @@ $GLOBALS['TL_CONFIG']['RssReaderReferer'] = "RSS-Fusion with SimplePie";
*/
$GLOBALS['TL_CONFIG']['_starWords'] = array();
$GLOBALS['TL_CONFIG']['_badWords'] = array();
$GLOBALS['TL_CONFIG']['where'] = 'all'; //~ (title | description | all)
\ No newline at end of file
$GLOBALS['TL_CONFIG']['where'] = 'all'; //~ (title, description, link, all)
//*
// Search in title only
// $GLOBALS['TL_CONFIG']['where'] = 'title';
//*
//*
// Search in description only
// $GLOBALS['TL_CONFIG']['where'] = ' description';
//*
//*
// Search in url only
// $GLOBALS['TL_CONFIG']['where'] = 'link';
//*
//*
// Search in multiple content, separate with "|"
// $GLOBALS['TL_CONFIG']['where'] = 'title|description';
//*
//*
// Search in all content
// $GLOBALS['TL_CONFIG']['where'] = 'all';
//*
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment