3
1
Back

($rel[0]=='#' || $rel[0]=='?') { return $this->mangle_article($article); } catch (Exception $e) { $article['content'] = $doc->saveHTML(); elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // elseif (strpos($article["link"], "www.pilotside.us/comic/") !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $article['content'] = $img; } } // Two Lumps elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { // XKCD (alt tags we don't need to call out for elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE) { $xpath = new DOMDocument(); $doc->loadHTML($article['content']); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img_tag . $article['content']; } // Questionable Content (cleanup) elseif (strpos($article['link'], 'qwantz.com/index.php?comic') !== FALSE) { $article['content'] .= "
Alt: $alt_text
"; list($html, $content_type) = $this->get_content($link); $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { return $this->mangle_article($article); } function get_img_tags($xpath, $query, $article){ $entries = $xpath->query($query); $result_html = ''; $orig_src = $entry->getAttribute('src'); $new_src = $this->rel2abs($orig_src, $article['link']); if ($alt_text && $alt_text != $article['title']){ $result_html .= "
Alt: " . $img->getAttribute('title') . ""; } } if(ADD_IDS){ $article['content'] .= "

$orig_content

"; //also append the blarg post because that's small, interesting, //and sometimes necessary for voltage dividers feeding chip inputs - don't.

New Pull Request