3
1
Back

$new_src); $result_html .= "Alt: " . $img->getAttribute('title') . ""; } } Pain Train (to get alt tag) elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(/[0-9-]+)-150x150\.gif#', '$1.gif', $article['content']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get the blog $entries = $xpath->query("//span[@class='rss-content']"); // Wondermark (alt tag already present elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $aftercomic = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); } } if (ADD_IDS) { $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if (strpos($article["content"], "bonus panel!") !== FALSE) { // Poly In Pictures elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Chainsawsuit elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="webcomic-image"]//img)', $article); } elseif (strpos($alt_text, $title_text) !== False) { $alt_text = trim($img->getAttribute('title')); if (!$alt_text) { $new_element = $doc->createElement("div"); $para_element = $doc->createElement("p"); $article['content'] = $img_tag . $article['content']; } Added BCN.

New Pull Request