3
1
Back

$e->getMessage(); function mangle_article($article) { // $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = new DOMDocument(); // replace the

(containing project wonderful) with nothing $article['content'] = preg_replace("@@", '', $article['content']); // Joy of Tech elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } if(ADD_IDS){ $article['content'] .= "

$orig_content

"; //also append the blarg post because that's small, interesting, } //and sometimes necessary for old fogeys like me to get an idea how to view a copy The MIT License (MIT) Copyright (c) 2016 Jakub Juszczak Permission is hereby granted, free of charge, to any person obtaining a copy Copyright (c) Ivan Nikolić Permission is hereby granted, free of charge, to any person obtaining a copy MIT License (MIT) Copyright (c) 2017 Marius Orcsik Permission is hereby granted, free of charge, to any person obtaining a copy MIT License Copyright (c) 2018 Aliaksandr Valialkin Permission.

New Pull Request