cvs: phpweb / results.php /images pear_item.gif pecl_item.gif
| From: | Rasmus Lerdorf | Date: | Tue, 28 Feb 2006 21:59:20 +0000 |
| Subject: | cvs: phpweb / results.php /images pear_item.gif pecl_item.gif | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-30737@lists.php.net to get a copy of this message | ||
rasmus Tue Feb 28 21:59:20 2006 UTC
Added files:
/phpweb/images pear_item.gif pecl_item.gif
Modified files:
/phpweb results.php
Log:
Spruce up the search results page a bit. We need icons for talks, bugs,
cvs, pecl4win and whatever other top-level sites may pop up here.
http://cvs.php.net/viewcvs.cgi/phpweb/results.php?r1=1.10&r2=1.11&diff_format=u
Index: phpweb/results.php
diff -u phpweb/results.php:1.10 phpweb/results.php:1.11
--- phpweb/results.php:1.10 Tue Feb 28 16:30:04 2006
+++ phpweb/results.php Tue Feb 28 21:59:20 2006
@@ -1,5 +1,5 @@
<?php
-// $Id: results.php,v 1.10 2006/02/28 16:30:04 nlopess Exp $
+// $Id: results.php,v 1.11 2006/02/28 21:59:20 rasmus Exp $
$_SERVER['BASE_PAGE'] = 'results.php';
include $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc';
#include $_SERVER['DOCUMENT_ROOT'] . '/include/loadavg.inc';
@@ -67,11 +67,16 @@
// rewrite mirrors urls (\w\w\d? or www)
$real_url = preg_replace('!^http://\w{2,3}\.php\.net(.*)$!', '$1',
$hit['Url']);
-
$displayurl = preg_replace('!^http://(?:\w{2,3}\.)?(.+[^/])/?$!', '$1',
$hit['Url']);
+ $type = substr($displayurl,0,strpos($displayurl,'.'));
$display_title = str_replace('PHP:', '', $hit['Title']);
+ $types = array('pear'=>'<img src="http://static.php.net/www.php.net/images/pear_item.gif"
height="19" width="17" style="float:left;
margin-left:-30px;"/>',
+ 'pecl'=>'<img src="http://static.php.net/www.php.net/images/pecl_item.gif"
height="19" width="17" style="float:left;
margin-left:-30px;"/>',
+ 'php'=>'<img src="http://static.php.net/www.php.net/images/logos/php-icon-white.gif"
height="32" width="32" style="float:left;
margin-left:-40px;"/>'
+ );
echo <<<EOB
<li>
+ {$types[$type]}
<p class="result"><a
href="{$real_url}">{$display_title}</a></p>
<p class="summary">{$hit['Summary']}</p>
<p class="meta">{$displayurl} - {$d}{$size}{$cachelink}</p>