$owner_uid = $article["owner_uid"];
if (strpos($article["link"], "cad-comic.com/cad/") !== FALSE) {
- if (strpos($article["title"], "News:") === FALSE && strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
+ if (strpos($article["title"], "News:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
}
return true;
strpos($article["guid"], "happyjar.com") !== FALSE ||
strpos($article["guid"], "csectioncomics.com") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
-
// lol at people who block clients by user agent
// oh noes my ad revenue Q_Q
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
$owner_uid = $article["owner_uid"];
if (strpos($article["guid"], "darklegacycomics.com") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
-
- print "DLC!" . $article["link"] . "\n";
$res = fetch_file_contents($article["link"], false, false, false,
false, false, 0,
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
$owner_uid = $article["owner_uid"];
if (strpos($article["guid"], "dilbert.com") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
$owner_uid = $article["owner_uid"];
if (strpos($article["link"], "explosm.net/comics") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
$owner_uid = $article["owner_uid"];
if (strpos($article["guid"], "gocomics.com") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
}
function process(&$article) {
- $owner_uid = $article["owner_uid"];
-
if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
if ($debug_enabled) {
_debug("af_pennyarcade: Processing comic");
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "News Post:") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
if ($debug_enabled) {
_debug("af_pennyarcade: Processing news post");
}
if ($basenode){
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
}
function process(&$article) {
- $owner_uid = $article["owner_uid"];
if (strpos($article["link"], "threewordphrase.com") !== FALSE) {
- if (strpos($article["plugin_data"], "af_comics,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_comics,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
return true;
}
}
function hook_article_filter($article) {
- $owner_uid = $article["owner_uid"];
-
- if (strpos($article["plugin_data"], "fsckportal,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
}
$article["content"] = $doc->saveXML();
- $article["plugin_data"] = "fsckportal,$owner_uid:" . $article["plugin_data"];
- }
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
}
return $article;
$owner_uid = $article["owner_uid"];
if (strpos($article["link"], "habrahabr.ru") !== FALSE) {
- if (strpos($article["plugin_data"], "af_habr,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "af_habr,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
}
return $article;
$owner_uid = $article["owner_uid"];
if (strpos($article["link"], "nationalgeographic.com") !== FALSE) {
- if (strpos($article["plugin_data"], "natgeo,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "natgeo,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
}
return $article;
}
function hook_article_filter($article) {
- $owner_uid = $article["owner_uid"];
-
- $force = false;
if (strpos($article["link"], "reddit.com/r/") !== FALSE) {
- if (strpos($article["plugin_data"], "redditimgur,$owner_uid:") === FALSE || $force) {
$doc = new DOMDocument();
@$doc->loadHTML($article["content"]);
if ($node && $found) {
$article["content"] = $doc->saveXML($node);
- if (!$force) $article["plugin_data"] = "redditimgur,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
}
return $article;
$owner_uid = $article["owner_uid"];
if (strpos($article["link"], "scientificamerican.com") !== FALSE || strpos($article["link"], "rss.sciam.com") !== FALSE) {
- if (strpos($article["plugin_data"], "sciam,$owner_uid:") === FALSE) {
$doc = new DOMDocument();
@$doc->loadHTML(fetch_file_contents($article["link"]));
if ($basenode) {
$article["content"] = $doc->saveXML($basenode);
- $article["plugin_data"] = "sciam,$owner_uid:" . $article["plugin_data"];
}
}
- } else if (isset($article["stored"]["content"])) {
- $article["content"] = $article["stored"]["content"];
- }
}
return $article;
strpos($article["link"], "/~r/") !== FALSE ||
strpos($article["link"], "feedsportal.com") !== FALSE)) {
- if (strpos($article["plugin_data"], "unburn,$owner_uid:") === FALSE) {
-
if (ini_get("safe_mode") || ini_get("open_basedir")) {
$ch = curl_init(geturl($article["link"]));
} else {
curl_setopt($ch, CURLOPT_PROXY, _CURL_HTTP_PROXY);
}
- $contents = @curl_exec($ch);
+ @curl_exec($ch);
$real_url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
$article["plugin_data"] = "unburn,$owner_uid:" . $article["plugin_data"];
$article["link"] = $real_url;
}
- } else if (isset($article["stored"]["link"])) {
- $article["link"] = $article["stored"]["link"];
- }
}
return $article;