Location: PHPKode > projects > HAE > hae/admin/createffsearch.php
<?php
/*
	Copyright 2007 Hugo Wood

    This file is part of HAE.

    HAE is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.

    HAE is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see http://www.gnu.org/licenses/.
*/
?>

<?php
include('../php/vars.php');
global $serverName;
global $serverAlias;
echo 'Checking variables:<br>';
echo 'HAE Engine folder: '.HAE_path.'<br>';
echo 'Server name: '.$serverName.'<br>';
echo 'Server alias: '.$serverAlias.'<br>';

echo 'Generating search.xpi<br>';
$ffsearch = '<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
	<ShortName>'.$serverName.'</ShortName>
	<Description>Search on '.$serverName.'</Description>
	<InputEncoding>ISO-8859-1</InputEncoding>
	<Image height="16" width="16" type="image/x-icon">http://'.$serverAlias.'/'.HAE_path.'/design/0/images/favicon.ico</Image>
	<Image height="64" width="64" type="image/x-icon">http://'.$serverAlias.'/'.HAE_path.'/design/0/images/favicon64.ico</Image>
	<Url type="text/html" method="GET"  template="http://'.$serverAlias.'/index.php?search={searchTerms}"/>
	<Language>en</Language>
	<Developer>moa</Developer>
</OpenSearchDescription>';
echo 'Writing search.xpi<br>';
$fp = fopen("../search.xpi", 'w+');
fputs($fp, utf8_encode($ffsearch));
fclose($fp);
echo 'Completed';
?>
Return current item: HAE