Changeset 5280 in spip-zone


Ignore:
Timestamp:
Sep 12, 2006, 1:31:05 PM (15 years ago)
Author:
renato@…
Message:

A #GET_ACCESSKEY tag

Location:
_plugins_/_ze_laboratoire_/spiip
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/_ze_laboratoire_/spiip/dist_back/modeles/debut_cadre.html

    r5274 r5280  
    1 [(#REM|static_var{accesskey}|sinon{(#REM|static_var{accesskey,97})]
    2 #SET{accesskey,#REM|static_var{accesskey}}
     1#SET{accesskey,#GET_ACCESSKEY}
    32#SET{style_cadre, style='zoom:1;}
    43#SET{spip_display,#EVAL{$GLOBALS["spip_display"]}}
     
    109#SET{style_cadre,(#GET{style_cadre})"'"}
    1110<//B_style>
    12 [(#GET{accesskey}|<={122}|?{' ',''})
    13 #SET{accesskey_c,#GET{accesskey}|chr}
    14 [(#REM|static_var{accesskey,[(#GET{accesskey}|plus{1})]})]
    15 <a name='access-#GET{accesskey_c}' href='#access-#GET{accesskey_c}' accesskey='#GET{accesskey_c}'></a>]
     11[<a name='access-#GET{accesskey}' href='#access-(#GET{accesskey})' accesskey='#GET{accesskey}'></a>]
    1612[(#ENV{style}|=={e}|?{' ',''})
    1713<div class='cadre-e-noir'[(#GET{style_cadre})]><div class='cadre-#ENV{style}'>]
  • _plugins_/_ze_laboratoire_/spiip/inc/presentation.php

    r5259 r5280  
    7777// http://doc.spip.org/@debut_cadre
    7878function debut_cadre($style, $icone = "", $fonction = "", $titre = "") {
    79         global $spip_display, $spip_lang_left;
    80         static $accesskey = 97; // a
     79        global $spip_display, $spip_lang_left,$accesskey;
     80        //use a global var to manage accesskey via debut_cadre and #GET_ACCESSKEY
     81        if(!$accesskey) $accesskey = 97;
    8182
    8283        //zoom:1 fixes all expanding blocks in IE, see authors block in articles.php
  • _plugins_/_ze_laboratoire_/spiip/spiip_fonctions.php

    r5274 r5280  
    5656}
    5757
    58 function static_var($dummy,$name,$value='') {
    59         static $vars = array();
    60         if(!$value) {
    61                 if(isset($vars[$name])) return $vars[$name];
    62                 else return '';
    63         } else {
    64                 $vars[$name] = $value;
    65                 return '';
    66         }
     58//
     59// Get the next available accesskey
     60//
     61function balise_GET_ACCESSKEY($p) {
     62        global $accesskey;
     63        if(!$accesskey) $accesskey = 97;
     64        $key = $accesskey<=122?chr($accesskey):'';
     65        $p->code = "'$key'";
     66        return $p;
    6767}
    68 
    6968?>
Note: See TracChangeset for help on using the changeset viewer.