'.NL;
}
/**
* prints a section editing button
* used as a callback in html_secedit
*
* @author Andreas Gohr
*/
function html_secedit_button($matches){
global $ID;
global $INFO;
$section = $matches[2];
$name = $matches[1];
$secedit = '';
$secedit .= '
';
return $secedit;
}
/**
* inserts section edit buttons if wanted or removes the markers
*
* @author Andreas Gohr
*/
function html_secedit($text,$show=true){
global $INFO;
if($INFO['writable'] && $show && !$INFO['rev']){
$text = preg_replace_callback('##',
'html_secedit_button', $text);
}else{
$text = preg_replace('##','',$text);
}
return $text;
}
/**
* Just the back to top button (in its own form)
*
* @author Andreas Gohr
*/
function html_topbtn(){
global $lang;
$ret = '';
$ret = '';
return $ret;
}
/**
* Displays a button (using its own form)
* If tooltip exists, the access key tooltip is replaced.
*
* @author Andreas Gohr
*/
function html_btn($name,$id,$akey,$params,$method='get',$tooltip=''){
global $conf;
global $lang;
$label = $lang['btn_'.$name];
$ret = '';
$tip = '';
//filter id (without urlencoding)
$id = idfilter($id,false);
//make nice URLs even for buttons
if($conf['userewrite'] == 2){
$script = DOKU_BASE.DOKU_SCRIPT.'/'.$id;
}elseif($conf['userewrite']){
$script = DOKU_BASE.$id;
}else{
$script = DOKU_BASE.DOKU_SCRIPT;
$params['id'] = $id;
}
$ret .= '