3
1
Back

Two Lumps $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Scenes From A Multiverse (to get alt tag) elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // Cyanide & Happiness elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { // Invisible Bread (make the bread visible if (preg_match("@.*(get_img_tags($xpath, "//div[@id='comic']//img", $article); } // Eat That Toast bog-standard example elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Joy of Tech elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='imgdiv']//img", $article); // Dead Philosophers 2015-02-25 15:05:54 -08:00 // Eat That Toast bog-standard example // Breaking Cat News elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); // Joy of Tech elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { // Gunnerkrigg Court elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); } // Dead Philosophers elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { //No matches if ($img->getAttribute('title')) { $article['content'] = $img; } //Sites that provide images and just need alt tags foreach($imgs as $img){ $article['content'] .= "

" . $entry->textContent . "

"; $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } .

New Pull Request