Эх сурвалжийг харах

testing get_source() as a possibility

Xen 1 жил өмнө
parent
commit
92b09a2146
1 өөрчлөгдсөн 10 нэмэгдсэн , 2 устгасан
  1. 10 2
      www/index.php

+ 10 - 2
www/index.php

@@ -118,10 +118,18 @@ function clean_str($str) {
 				$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;
+				echo $cleaned_links;
             ?>
 			</p>
-			<p style="font-size: small;">Posted on <?php echo $item->get_date('j F Y | g:i a'); ?></p>
+			<p style="font-size: small;">Posted on 
+				<?php 
+					echo $item->get_date('j F Y | g:i a');
+				?>
+				on the site
+				<?php 
+					echo clean_str($item->get_source());
+				?>
+			</p>
  
 	<?php endforeach; ?>
 	<p style="text-align: center; font-size: small;">v1.0 Powered by Mozilla Readability (Andres Rey PHP Port) and SimplePie</p>