3
1
Back

A295bd71525185b616796bece6c52d455905c9b6 Mon Sep 17 00:00:00 2001 Subject: [PATCH 10/18] More tweaks after pro review 2 From 398c2b234cc710f69bb9085257ff5dbf3509a410 Mon Sep 17 00:00:00 2001 Subject: [PATCH] Added The Trenches; yet more code style tweaking Added The Trenches; yet more code style tweaking elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); $article['content'] = $img; } //Sites that provide images and just need alt tags elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'jpg')]", $article, "http://vgcats.com/comics/"); // Invisible Bread (make the bread visible) $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Cyanide & Happiness elseif (strpos($article["link"], "www.smbc-comics.com/comic/") !== FALSE) { // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } $img->parentNode->replaceChild($new_element, $img); } function api_version() { return array(0.1, 'Yet more stupid-simple comic-fetching.', } function get_img_tags($xpath, $query, &$article, $base_url=NULL) { $img_attributes_whitelist = array('src', 'alt', 'title'); $new_src = $this->rel2abs($orig_src, $base_url); foreach($attributes as $attrib_name => $node){ } function get_content($link) { /** * When debugging or writing.

New Pull Request