3
1
Back

Analog drum voices; based heavily on Moritz Klein's work, but with an alt or title tag. Function alt_textify($article, $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//a//img", $article); elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='cc-comicbody']//img", $article); } // Dinosaur Comics Cleanup $extraimage = $xpath->query("//img[@class='extrapanelimage']")->item(0); $new_element = $doc->createElement("img"); $new_element->setAttribute('src', $extraimage->getAttribute('src')); $bread->parentNode->replaceChild($new_element, $bread); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comic-wrap']", $article); //Sites that provide images and just need alt tags textified. } $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debugging'] as $msg) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { if (strpos($article["content"], "bonus panel!") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Poorly Drawn Lines elseif (strpos($article["link"], "trenchescomic.com/comic/post/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { // Three Panel Soul elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { // Joy of Tech elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); } Some comics supported elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article['link'], 'paintraincomic.com/comic/') !== FALSE) { $aftercomic = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article['link'], 'http://www.geekculture.com/joyoftech/') !== FALSE) { $article['content'] .= "
Alt: " . $article['id']; $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debug']) { } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $doc->saveHTML(); elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $article['content'] .= "
Alt: " . $article['id']; } return $article; } /* dirty absolute URL is ready! */ elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { $article['content'] .= "
Alt: $alt_text
"; list($html, $content_type) = $this->get_content($link); //Sites that provide images and just need alt tags in feedburner (if there are quotes elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { // there's both alt and title texts, they're both different, use both. $title_element .

New Pull Request