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:
parent
402bc3ff28
commit
f666451b86
8
init.php
8
init.php
@ -142,7 +142,13 @@ class Af_Feedmod extends Plugin implements IHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
$article['content'] = $doc->saveXML($basenode);
|
||||
|
||||
// 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'];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user