From 9a2e250ac50cb5571b81b8d005a1f1edf7b8e17f Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sat, 7 Jan 2012 14:11:47 +0100 Subject: make sure that sidebar TOCs won't interfere with page TOCs This could happen if a sidebar is rendered before the page (populating $TOC) and the page itself had no own TOC (no headers). --- inc/template.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'inc/template.php') diff --git a/inc/template.php b/inc/template.php index c70e407d6..476ef74a3 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1354,9 +1354,12 @@ function tpl_license($img='badge',$imgonly=false,$return=false){ */ function tpl_include_page($pageid,$print=true){ global $ID; - $oldid = $ID; + global $TOC; + $oldid = $ID; + $oldtoc = $TOC; $html = p_wiki_xhtml($pageid,'',false); - $ID = $oldid; + $ID = $oldid; + $TOC = $oldtoc; if(!$print) return $html; echo $html; -- cgit v1.2.3 From b8a84c03383cce9c6b85f9d742ae06fac02dd6cd Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 12 Jan 2012 18:34:48 +0100 Subject: readded missing "view original" button to the new media manager Template authors need to update their _mediamanager.css --- inc/template.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'inc/template.php') diff --git a/inc/template.php b/inc/template.php index 476ef74a3..9d1609fd3 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1202,7 +1202,16 @@ function tpl_mediaFileDetails($image, $rev){ media_tabs_details($image, $opened_tab); - echo '

'; + echo '
'; + + // view button + if($opened_tab === 'view'){ + $link = ml($image,array('rev'=>$rev),true); + echo ' '; + } + + echo '

'; list($ext,$mime,$dl) = mimetype($image,false); $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext); $class = 'select mediafile mf_'.$class; @@ -1212,6 +1221,7 @@ function tpl_mediaFileDetails($image, $rev){ } else { printf($lang['media_' . $opened_tab], $tabTitle); } + echo '

'.NL; echo '
'.NL; -- cgit v1.2.3 From 59f3611b2f11fe1652befff8189787a1181a2f66 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 22 Jan 2012 16:39:01 +0000 Subject: removed 'view original' button from new media manager again (was added in b8a84c03) and made a link around the image instead, as that is a more minor change (as it should be during the RC phase) and is what was originally planned --- inc/template.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'inc/template.php') diff --git a/inc/template.php b/inc/template.php index 9d1609fd3..024bf985c 100644 --- a/inc/template.php +++ b/inc/template.php @@ -970,9 +970,10 @@ function tpl_img($maxwidth=0,$maxheight=0,$link=true,$params=null){ * Default action for TPL_IMG_DISPLAY */ function _tpl_img_action($data, $param=NULL) { + global $lang; $p = buildAttributes($data['params']); - if($data['url']) print ''; + if($data['url']) print ''; print ''; if($data['url']) print ''; return true; @@ -1202,16 +1203,7 @@ function tpl_mediaFileDetails($image, $rev){ media_tabs_details($image, $opened_tab); - echo '
'; - - // view button - if($opened_tab === 'view'){ - $link = ml($image,array('rev'=>$rev),true); - echo ' '; - } - - echo '

'; + echo '

'; list($ext,$mime,$dl) = mimetype($image,false); $class = preg_replace('/[^_\-a-z0-9]+/i','_',$ext); $class = 'select mediafile mf_'.$class; -- cgit v1.2.3