CODE
$html = preg_replace('/<!--access_key_desc:([a-z0-9]*)-->/ie', '<kbd title="'.str_replace("%", $1, $lang["access_key"]).'">{$1}</kbd>', $html);
I can not get that working for the life of me. I get this error:
QUOTE
Parse error[/b]: syntax error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in display.class.php on line 120
$lang['access_key'] is: Keyboard shortcut: Alt+% (Win), Ctrl+% (Apple)
(The % gets replaced with whatever the key is....)
Basically, what I am trying to do is have it so in my templates, someone can put in :
CODE
<!--access_key_desc:S-->earch
and that will change to:
CODE
<kbd title="Keyboard shortcut: Alt+S (Win), Ctrl+S (Apple)">S</kbd>earch