3
1
Back

Knob, these are some setup variables... You probably won't need to call out for if(preg_match("@.*()@", $article['content'], $matches)){ $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Scenes From A Multiverse (to get alt tag) elseif (strpos($article['link'], 'cad-comic.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $doc = new DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this // only keep everything starting at the first if(preg_match("@.*(get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Three Panel Soul * Scenes From A Multiverse (to get alt tags) // Scenes From A Multiverse (to get alt tags) elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']/noscript/img", $article); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } // SBMC elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE || strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users if (preg_match("@.*(

New Pull Request