3
1
Back

Own itch here. * Most important: Keep it simple. Follow one pattern. Class _comics extends Plugin { function about() { return 2; } } // Scenes From A Multiverse (to get alt tags elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@id="aftercomic"]//img)', $article); $article['content'] = preg_replace('#(width|height)="150"#', '', $article['content']); if (preg_match("@.*?(.*)@", $article['content'], $matches)) { $article['content'] = $doc->saveXML(); } Some comics supported elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { // Dead Philosophers elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $article['content'] .= "
Alt: $alt_text
"; } } if(ADD_IDS){ $article['content'] .= "
Error processing via _comics plugin!
" . $e->getMessage(); if (strpos($article["link"], "penny-arcade.com") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ //also get blog entry $article['content'] .= "

" . $entry->textContent . ""; $img_tag = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '(//div[@class="container"]//center//img)', $article); } // Joy of Tech elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { // Two Lumps // Breaking Cat News elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { //noop elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get the blog // XKCD (alt tags we don't need to call out for elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='img-comic-container']//img", $article); } // PhD Unknown elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // only keep everything starting at the first if (preg_match("@.*()@", $article['content'], $matches)) { // Dinosaur Comics (alt tags+blog), CAD, attempt.

New Pull Request