Browse Source

Revert "Add support for sillies"

idiot submitter breaks all embedding with his genius strategy of
handling all posts with now News: in title

This reverts commit a3013adedd45fea4ae323c8621ef570119c3b489.
Andrew Dolgov 4 years ago
parent
commit
1929149661
1 changed files with 3 additions and 18 deletions
  1. 3 18
      plugins/af_comics/filters/af_comics_cad.php

+ 3 - 18
plugins/af_comics/filters/af_comics_cad.php

@@ -8,8 +8,8 @@ class Af_Comics_Cad extends Af_ComicFilter {
 	function process(&$article) {
 		$owner_uid = $article["owner_uid"];
 
-		if (strpos($article["title"], "News:") === FALSE) {
-			if (strpos($article["link"], "cad-comic.com/cad/") !== FALSE) {
+		if (strpos($article["link"], "cad-comic.com/cad/") !== FALSE) {
+			if (strpos($article["title"], "News:") === FALSE) {
 
 				$doc = new DOMDocument();
 				@$doc->loadHTML(fetch_file_contents($article["link"]));
@@ -24,24 +24,9 @@ class Af_Comics_Cad extends Af_ComicFilter {
 						$article["content"] = $doc->saveXML($basenode);
 					}
 				}
-			}
-			
-			elseif (strpos($article["link"], "cad-comic.com/sillies/") !== FALSE) {
-				$doc = new DOMDocument();
-				@$doc->loadHTML(fetch_file_contents($article["link"]));
 
-				$basenode = false;
-
-				if ($doc) {
-					$xpath = new DOMXPath($doc);
-					$basenode = $xpath->query('(//img[contains(@src, "/comics/sillies-")])')->item(0);
-
-					if ($basenode) {
-						$article["content"] = $doc->saveXML($basenode);
-					}
-				}
 			}
-			
+
 			return true;
 		}