1
0

Replace an article's link (instead of its content)

Added a new option `mod_link` to allow the modification of an article's link.

*Example:*
http://feeds.feedburner.com/rivva
```json
"rivva.de": {
    "type": "xpath",
    "xpath": "header/h1/a/@href",
    "force_charset": "utf-8",
    "mod_link": true
}
```
This commit is contained in:
kroka 2015-01-11 15:14:58 +01:00
parent 402bc3ff28
commit f666451b86

View File

@ -142,7 +142,13 @@ class Af_Feedmod extends Plugin implements IHandler
}
}
}
// modify the article
if ($config['mod_link']) {
$article['link'] = $basenode->textContent;
} else {
$article['content'] = $doc->saveXML($basenode);
}
$article['plugin_data'] = "feedmod,$owner_uid:" . $article['plugin_data'];
}
}