cvs: phpweb / error.php index.php search.php /include layout.inc mozopensearch.inc

From: Date: Wed, 28 Mar 2007 10:28:57 +0000
Subject: cvs: phpweb / error.php index.php search.php /include layout.inc mozopensearch.inc
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-34942@lists.php.net to get a copy of this message
bjori Wed Mar 28 10:28:57 2007 UTC Added files: /phpweb/include mozopensearch.inc Modified files: /phpweb/include layout.inc /phpweb search.php index.php error.php Log: Add 'opensearch' by Marco Rodrigues (Supports Firefox2 and IE7..) http://cvs.php.net/viewvc.cgi/phpweb/include/layout.inc?r1=1.262&r2=1.263&diff_format=u Index: phpweb/include/layout.inc diff -u phpweb/include/layout.inc:1.262 phpweb/include/layout.inc:1.263 --- phpweb/include/layout.inc:1.262 Wed Mar 28 09:52:02 2007 +++ phpweb/include/layout.inc Wed Mar 28 10:28:56 2007 @@ -1,5 +1,5 @@ <?php -/* $Id: layout.inc,v 1.262 2007/03/28 09:52:02 bjori Exp $ */ +/* $Id: layout.inc,v 1.263 2007/03/28 10:28:56 bjori Exp $ */ // Set the static content root differently on php.net $_SERVER['STATIC_ROOT'] = ($MYSITE == 'http://www.php.net/') ? @@ -100,8 +100,14 @@ $link = ""; if (isset($config['link']) && is_array($config['link'])) { foreach($config['link'] as $rel => $url) { - if ($url) { + if (!is_array($url)) { $link .= "\n <link rel=\"$rel\" href=\"$url\" />"; + } else { + $link .= "\n <link "; + foreach($url as $attr => $val) { + $link .= "$attr=\"$val\" "; + } + $link .= "/>"; } } } http://cvs.php.net/viewvc.cgi/phpweb/search.php?r1=1.111&r2=1.112&diff_format=u Index: phpweb/search.php diff -u phpweb/search.php:1.111 phpweb/search.php:1.112 --- phpweb/search.php:1.111 Wed Sep 6 12:52:57 2006 +++ phpweb/search.php Wed Mar 28 10:28:56 2007 @@ -1,5 +1,5 @@ -<?php -// $Id: search.php,v 1.111 2006/09/06 12:52:57 goba Exp $ +<?php // vim: et +// $Id: search.php,v 1.112 2007/03/28 10:28:56 bjori Exp $ $_SERVER['BASE_PAGE'] = 'search.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; @@ -100,7 +100,13 @@ else { // Print out common header - site_header("Search"); + $link = array( + "rel" => "search", + "type" => "application/opensearchdescription+xml", + "href" => $MYSITE . "phpnetimprovedsearch.src", + "title" => "Add PHP.net search" + ); + site_header("Search", array("link" => array($link))); ?> <p> The autocompleting search feature is accessible via the form elements at the top http://cvs.php.net/viewvc.cgi/phpweb/index.php?r1=1.881&r2=1.882&diff_format=u Index: phpweb/index.php diff -u phpweb/index.php:1.881 phpweb/index.php:1.882 --- phpweb/index.php:1.881 Sat Mar 24 18:24:00 2007 +++ phpweb/index.php Wed Mar 28 10:28:56 2007 @@ -1,4 +1,4 @@ -<?php +<?php // vim: et /* If you're reading this, it isn't because you've found a security hole. this is an open source website. read and learn! @@ -189,7 +189,20 @@ $RSIDEBAR_DATA = $MIRROR_IMAGE . $rel . $RSIDEBAR_DATA; // Write out common header -site_header("Hypertext Preprocessor", array('onload' => 'boldEvents();', 'headtags' => '<link rel="alternate" type="application/rss+xml" title="PHP: Hypertext Preprocessor" href="' . $MYSITE . 'news.rss" />')); +site_header("Hypertext Preprocessor", + array( + 'onload' => 'boldEvents();', + 'headtags' => '<link rel="alternate" type="application/rss+xml" title="PHP: Hypertext Preprocessor" href="' . $MYSITE . 'news.rss" />', + 'link' => array( + array( + "rel" => "search", + "type" => "application/opensearchdescription+xml", + "href" => $MYSITE . "phpnetimprovedsearch.src", + "title" => "Add PHP.net search" + ), + ), + ) +); if (is_array($CONF_TEASER) && count($CONF_TEASER)) { $categories = array("conference" => "Conferences", "cfp" => "Calling for papers"); http://cvs.php.net/viewvc.cgi/phpweb/error.php?r1=1.62&r2=1.63&diff_format=u Index: phpweb/error.php diff -u phpweb/error.php:1.62 phpweb/error.php:1.63 --- phpweb/error.php:1.62 Wed Mar 21 20:57:37 2007 +++ phpweb/error.php Wed Mar 28 10:28:56 2007 @@ -1,6 +1,6 @@ <?php -// $Id: error.php,v 1.62 2007/03/21 20:57:37 bjori Exp $ +// $Id: error.php,v 1.63 2007/03/28 10:28:56 bjori Exp $ /* @@ -29,6 +29,12 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/include/mozsearch.inc'; exit; } +// FIXME: Nuke the old firefox search plugin +if ($URI == 'phpnetimprovedsearch.src') { + status_header(200); + include_once $_SERVER['DOCUMENT_ROOT'] . '/include/mozopensearch.inc'; + exit; +} // ============================================================================ // BC: handle bugs.php moved completely to bugs.php.net http://cvs.php.net/viewvc.cgi/phpweb/include/mozopensearch.inc?view=markup&rev=1.1 Index: phpweb/include/mozopensearch.inc +++ phpweb/include/mozopensearch.inc <SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/"> <ShortName>PHP.net</ShortName> <Description>PHP.net - Search</Description> <InputEncoding>UTF-8</InputEncoding> <Contact>gothicx@gmail.com</Contact> <Image width="16" height="16"><?php echo $MYSITE; ?>images/phpnetsearch.png</Image> <Developer>Marco Rodrigues</Developer> <Url type="text/html" method="GET" template="<?php echo $MYSITE; ?>manual-lookup.php"> <Param name="pattern" value="{searchTerms}"/> <Param name="opensearch" value="yes"/> </Url> <SearchForm><?php echo $MYSITE; ?></SearchForm> </SearchPlugin>

« previous php.mirrors (#34942) next »