3
1
Back

Any image 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'] .= "

" . $entry->textContent . "

"; } } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); } // SBMC // SBMC elseif (strpos($article["link"], "www.phdunknown.com/index.php?id=") !== FALSE) { // Breaking Cat News elseif (strpos($article['link'], 'leasticoulddo.com/comic') !== FALSE) { // replace the (containing project wonderful) with nothing $article['content'] = $this->get_img_tags($xpath, '(//div[@class="container"]//center//img)', $article); } elseif ($alt_text == $article['title'] || strpos($article['title'], $title_text) !== false){ $text_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); Latest.

New Pull Request