Changeset 290 in t29-www for lib


Ignore:
Timestamp:
Aug 21, 2012, 10:47:12 AM (12 years ago)
Author:
sven
Message:
  • Falsche Übersetzungen in englische Navi gefixt
  • Kleine Korrektur des Opensearchdesc-Formulars (Bilingualität eingeführt)
  • CC-Icon verbessert
Location:
lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lib/search.php

    r274 r290  
    1919
    2020
    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               
    2227                header('Content-Type: application/opensearchdescription+xml');
    2328                print '<?xml version="1.0"?>'.PHP_EOL;
    2429                ?>
    2530                <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>
    2833                        <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&amp;q={searchTerms}&amp;format=json" />
    31                         <Url type="application/x-suggestions+xml" method="get" template="http://www.technikum29.de/de-v6/suche.php?get=suggestions&amp;q={searchTerms}&amp;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&amp;q={searchTerms}&amp;format=json" />
     36                        <Url type="application/x-suggestions+xml" method="get" template="http://www.technikum29.de/<?=$path[$lang]; ?>?get=suggestions&amp;q={searchTerms}&amp;format=xml" />
     37                        <moz:SearchForm>http://www.technikum29.de/<?=$path[$lang]; ?></moz:SearchForm>
    3338                </OpenSearchDescription>
    3439                <?php
  • lib/template.php

    r289 r290  
    150150 
    151151  <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&amp;lang='.$this->conf['lang']; ?>" title="<?php $p('opensearch-desc'); ?>">
    153153  <?php
    154154        // print interlanguage links for all languages except the active one
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License