- Timestamp:
- Aug 21, 2012, 10:47:12 AM (12 years ago)
- Location:
- lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/search.php
r274 r290 19 19 20 20 21 function print_opensearch_desc() { 21 function print_opensearch_desc($lang=null) { 22 $path = array('de' => '/de/suche.php', 'en' => '/en/search.php'); 23 // assure a valid given language 24 if(!$lang && isset($_GET['lang'])) $lang = $_GET['lang']; 25 if(!isset($path[$lang])) $lang = 'de'; 26 22 27 header('Content-Type: application/opensearchdescription+xml'); 23 28 print '<?xml version="1.0"?>'.PHP_EOL; 24 29 ?> 25 30 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> 26 <ShortName>technikum29 ( de)</ShortName>27 <Description>technikum29 ( de)</Description>31 <ShortName>technikum29 (<?=$lang; ?>)</ShortName> 32 <Description>technikum29 (<?=$lang; ?>)</Description> 28 33 <Image height="16" width="16" type="image/x-icon">http://www.technikum29.de/favicon.ico</Image> 29 <Url type="text/html" method="get" template="http://www.technikum29.de/ de-v6/suche.php?q={searchTerms}" />30 <Url type="application/x-suggestions+json" method="get" template="http://www.technikum29.de/ de-v6/suche.php?get=suggestions&q={searchTerms}&format=json" />31 <Url type="application/x-suggestions+xml" method="get" template="http://www.technikum29.de/ de-v6/suche.php?get=suggestions&q={searchTerms}&format=xml" />32 <moz:SearchForm>http://www.technikum29.de/ de-v6/suche.php</moz:SearchForm>34 <Url type="text/html" method="get" template="http://www.technikum29.de/<?=$path[$lang]; ?>?q={searchTerms}" /> 35 <Url type="application/x-suggestions+json" method="get" template="http://www.technikum29.de/<?=$path[$lang]; ?>?get=suggestions&q={searchTerms}&format=json" /> 36 <Url type="application/x-suggestions+xml" method="get" template="http://www.technikum29.de/<?=$path[$lang]; ?>?get=suggestions&q={searchTerms}&format=xml" /> 37 <moz:SearchForm>http://www.technikum29.de/<?=$path[$lang]; ?></moz:SearchForm> 33 38 </OpenSearchDescription> 34 39 <?php -
lib/template.php
r289 r290 150 150 151 151 <link rel="copyright" href="<?php $p('footer-legal-file'); ?>" title="<?php $p('footer-legal-link'); ?>"> 152 <link rel="search" type="application/opensearchdescription+xml" href="<?php $p('topnav-search-page'); print '?action=opensearch-desc '; ?>" title="<?php $p('opensearch-desc'); ?>">152 <link rel="search" type="application/opensearchdescription+xml" href="<?php $p('topnav-search-page'); print '?action=opensearch-desc&lang='.$this->conf['lang']; ?>" title="<?php $p('opensearch-desc'); ?>"> 153 153 <?php 154 154 // print interlanguage links for all languages except the active one
Note: See TracChangeset
for help on using the changeset viewer.