3
1
Back

* Inserts text captions from any image with an alt or title tag. Function alt_textify($article, $doc = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); } // Eat That Toast bog-standard example // Penny Arcade elseif (strpos($article['link'], 'dead-philosophers.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); // Awkward Zombie elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='ksc' and contains(@src, 'png')]", $article); } // Scenes From A Multiverse.

New Pull Request