Ver Fonte

trying something for filtering

Xen há 1 ano atrás
pai
commit
418c6f7877
1 ficheiros alterados com 15 adições e 12 exclusões
  1. 15 12
      www/index.php

+ 15 - 12
www/index.php

@@ -107,18 +107,21 @@ function clean_str($str) {
 	?>
  
 			<h3 style="font-size: 5;"><a href="<?php echo 'article.php?loc=' . $loc . '&a=' . $item->get_permalink(); ?>"><?php echo clean_str($item->get_title()); ?></a></h3>
-			<p style="font-size: 4;"><?php 
-            $subheadlines = clean_str($item->get_description());
-            $remove_google_link = explode("<li><strong>", $subheadlines);
-            $no_blank = str_replace('target="_blank"', "", $remove_google_link[0]) . "</li></ol></font></p>"; 
-            $cleaned_links = str_replace('<a href="', '<a href="article.php?loc=' . $loc . '&a=', $no_blank);
-			$cleaned_links = strip_tags($cleaned_links, '<a><ol><ul><li><br><p><small><font><b><strong><i><em><blockquote><h1><h2><h3><h4><h5><h6>');
-    		$cleaned_links = str_replace( 'strong>', 'b>', $cleaned_links); //change <strong> to <b>
-    		$cleaned_links = str_replace( 'em>', 'i>', $cleaned_links); //change <em> to <i>
-			$cleaned_links = str_replace( "View Full Coverage on Google News", "", $cleaned_links);
-            echo $cleaned_links;
-            ?></p>
-			<p style="text-align: center; font-size: small;">Posted on <?php echo $item->get_date('j F Y | g:i a'); ?></p>
+			<p style="font-size: 4;">
+			<?php 
+				$source = clean_str($item->get_source());
+				$subheadlines = clean_str($item->get_description());
+				$remove_google_link = explode("<li><strong>", $subheadlines);
+				$no_blank = str_replace('target="_blank"', "", $remove_google_link[0]) . "</li></ol></font></p>"; 
+				$cleaned_links = str_replace('<a href="', '<a href="article.php?loc=' . $loc . '&a=', $no_blank);
+				$cleaned_links = strip_tags($cleaned_links, '<a><ol><ul><li><br><p><small><font><b><strong><i><em><blockquote><h1><h2><h3><h4><h5><h6>');
+				$cleaned_links = str_replace( 'strong>', 'b>', $cleaned_links); //change <strong> to <b>
+				$cleaned_links = str_replace( 'em>', 'i>', $cleaned_links); //change <em> to <i>
+				$cleaned_links = str_replace( "View Full Coverage on Google News", "", $cleaned_links);
+				echo $cleaned_links . '<br>' . $source;
+            ?>
+			</p>
+			<p style="font-size: small;">Posted on <?php echo $item->get_date('j F Y | g:i a'); ?></p>
  
 	<?php endforeach; ?>
 	<p style="text-align: center; font-size: small;">v1.0 Powered by Mozilla Readability (Andres Rey PHP Port) and SimplePie</p>