3
1
Back

"//div[@id='cc-comicbody']/img", $article); $article['content'] .= "

" . $entry->textContent . "

"; } } Dead Philosophers elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicbody"]//img)', $article) . $article['content']; } drugs & wires, pilotside elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE ) { // $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) function about() { return $rel; } if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { // Eat That Toast bog-standard example elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $article['content'] .= "
Alt: " . $article['id']; } return $article; } if(ADD_IDS){ $article['content'] .= "Error processing via _comics plugin!
" . $e->getMessage(); } } if(ADD_IDS){ $article['content'] .= "Alt: " . $article['id']; } return $article; } /* absolute URL is ready! */ } function get_xpath_dealie($link){ list($html, $content_type) = $this->get_content($link); $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] .= "
ID: " . $img->getAttribute('title') . "
"; } } // XKCD (alt tags we don't lose it Add the label font so.

New Pull Request