r865 - webspace/include

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Aug 23 02:02:14 EDT 2006


Author: floam
Date: 2006-08-23 02:02:14 -0400 (Wed, 23 Aug 2006)
New Revision: 865

Modified:
   webspace/include/news.php
Log:
Try to make it automagic


Modified: webspace/include/news.php
===================================================================
--- webspace/include/news.php	2006-08-23 05:40:58 UTC (rev 864)
+++ webspace/include/news.php	2006-08-23 06:02:14 UTC (rev 865)
@@ -40,6 +40,10 @@
 				$err = "Failed to grab news item: $err";
 				break;
 			}
+			if (strpos($item['text'], "<p>") != 0)
+				$item['text'] = "<p>" . $item['text'];
+			if (strrpos($item['text'], "</p>") != (strlen($item['text']) - 4))
+				$item['text'] .= "</p>"
 			echo "<h3 id=\"post" . $item['id'] . "\">" . $item['title'] . " - <em>" .
 			 date("F j, Y", strtotime($item['postdate'])) . "</em></h3>\n" . $item['text'] .
 			 "<p><a class=\"permalink\" href=\"?page=news&amp;news_item=" . $item['id'] . "\">Permalink</a></p>";




More information about the quake3-commits mailing list