summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-08-02 11:06:51 +0400
committerAndrew Dolgov <[email protected]>2013-08-02 11:06:51 +0400
commit623d1308c0dbab0998509a6915f08a201b451e56 (patch)
treebb03d756c1ed38cb586ab321e49ccf3edac9c221 /plugins
parentc309f41d2dc49535b34766107c2d31a128912cf2 (diff)
af_natgeo: remove some unneeded elements
Diffstat (limited to 'plugins')
-rw-r--r--plugins/af_natgeo/init.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/af_natgeo/init.php b/plugins/af_natgeo/init.php
index 7dc7116dd..72354c1c8 100644
--- a/plugins/af_natgeo/init.php
+++ b/plugins/af_natgeo/init.php
@@ -27,8 +27,16 @@ class Af_NatGeo extends Plugin {
$basenode = false;
if ($doc) {
+ $xpath = new DOMXPath($doc);
+
$basenode = $doc->getElementById("content_mainA");
+ $trash = $xpath->query("//*[@class='aside' or @id='livefyre' or @id='powered_by_livefyre' or @class='social_buttons']");
+
+ foreach ($trash as $t) {
+ $t->parentNode->removeChild($t);
+ }
+
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
$article["plugin_data"] = "natgeo,$owner_uid:" . $article["plugin_data"];