3
1
Back

- pad; pokey_outey = [pokey_outey_value, pokey_outey_value,0]; // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $alt_text); $para_element->appendChild($text_element); } elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = str_replace('comicsthumbs', 'comics', $article['content']); foreach ($entries as $entry){ $orig_src = $entry->getAttribute('src'); $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= $entry->ownerDocument->saveXML($entry); Added BCN, Something Positive elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { //no-op else { // SatW elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // Timothy Winchester (People I Know elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } */ // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } function get_img_tags($xpath, $query, $article){ $new_src = $this->rel2abs($orig_src, $article['link']); $entry->setAttribute('src', $new_src); $result_html .= $entry->ownerDocument->saveXML($entry); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debugging'] as $msg) { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); //also get the blog $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); } // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] .= $aftercomic; } } // Chainsawsuit elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); } // Scenes From A Multiverse (to get alt tags if (preg_match("@.*()@", $article['content'], $matches)) { if (strpos($article["content"], "bonus panel!") !== FALSE) { $doc = new DOMXpath($doc); $bread = $xpath->query("//a[contains(@href, 'bonus-panel')]")->item(0); if ($bread) { $bread_page_url = $bread->getAttribute('href'); $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] .= "

" . $entry->textContent . "

"; $article['content'] .= "
" . $msg . ""; } } // PhD Unknown elseif (strpos($article["link"], "drugsandwires.fail/dnwcomic/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); // Dead Philosophers elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($bread_page_url); $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("div"); $para_element = $doc->createElement("p"); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); } // Timothy Winchester (People I Know elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $article['content'] .= "" . $entry->ownerDocument->saveXML($entry) . "

"; // Wondermark (alt tag elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { // Dilbert elseif (strpos($article['link'], 'breakingcatnews.com/comic/') .

New Pull Request