Changeset 27221 in spip-zone


Ignore:
Timestamp:
Mar 11, 2009, 3:42:58 AM (10 years ago)
Author:
cy_altern@…
Message:

passer un paramètre est une soluce plus élégante pour ne pas avoir à maintenir 2 fichiers de raccourcis

Location:
_plugins_/_stable_/skiplink
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_stable_/skiplink/insere_skiplink.php

    r27217 r27221  
    1010 
    1111        if (!function_exists('recuperer_fond')) include_spip('public/assembler');
    12   $fond_raccourcis = (preg_match(',<input.*?name[ ]*=[ ]*"recherche".*?>,i', $page) == 1 ? 'raccourcis' : 'raccourcis_sans_recherche');
    13         $raccourcis = recuperer_fond($fond_raccourcis, array('lang'=>$GLOBALS['spip_lang']));
     12  $recherche_existe = (preg_match(',<input.*?name[ ]*=[ ]*"recherche".*?>,i', $page) == 1 ? 'oui' : 'non');
     13        $raccourcis = recuperer_fond('raccourcis', array('lang'=>$GLOBALS['spip_lang'], 'recherche'=>$recherche_existe));
    1414        preg_match(',<body\b.*?>,i', $page, $regs);
    1515        if ($regs)
  • _plugins_/_stable_/skiplink/raccourcis.html

    r27219 r27221  
    11<a href="#ancre_haute" id="#ancre_haute" name="ancre_haute"></a>
    2 <p class="skiplink" id="raccourcis" style="z-index: 100;"><a href="#contenu" accesskey="s"><:skiplink:go_main:></a> | <a href="#navigation" accesskey="n"><:skiplink:go_sidebar:></a> | <a href="#recherche" accesskey="4"><:skiplink:go_search:></a></p>
     2<p class="skiplink" id="raccourcis" style="z-index: 100;"><a href="#contenu" accesskey="s"><:skiplink:go_main:></a> | <a href="#navigation" accesskey="n"><:skiplink:go_sidebar:></a>[(#ENV{recherche}|=={'oui'}|?{' '}) | <a href="#recherche" accesskey="4"><:skiplink:go_search:></a>]</p>
Note: See TracChangeset for help on using the changeset viewer.