From 48f41709c883d59d0f1c988d6f1860ac2cae73f5 Mon Sep 17 00:00:00 2001 From: SecretR Date: Fri, 18 Oct 2013 11:03:01 +0300 Subject: [PATCH] Menu renders 'start' and 'end' templates now; Comment about usage of SETIMAGE sc in menu template; SETIMAGE: default - reset to default (TODO - site prefs) --- e107_core/shortcodes/single/setimage.php | 7 +++++++ e107_core/templates/menu_template.php | 1 + 2 files changed, 8 insertions(+) diff --git a/e107_core/shortcodes/single/setimage.php b/e107_core/shortcodes/single/setimage.php index c14f96374..508f950ee 100644 --- a/e107_core/shortcodes/single/setimage.php +++ b/e107_core/shortcodes/single/setimage.php @@ -3,6 +3,13 @@ function setimage_shortcode($parm, $mode='') { + ### Reset to defaults TODO site prefs + if(isset($parm['default'])) + { + $parm['w'] = 100; + $parm['h'] = 0; + $parm['crop'] = 0; + } e107::getParser()->thumbWidth = vartrue($parm['w'],100); e107::getParser()->thumbHeight = vartrue($parm['h'],0); e107::getParser()->thumbCrop = vartrue($parm['crop'],0); diff --git a/e107_core/templates/menu_template.php b/e107_core/templates/menu_template.php index 3b30fdaf0..7821793d3 100644 --- a/e107_core/templates/menu_template.php +++ b/e107_core/templates/menu_template.php @@ -12,6 +12,7 @@ $MENU_TEMPLATE['button']['body'] = '{CMENUBODY}{CPAGEBUTTON}'; $MENU_TEMPLATE['button']['end'] = ''; + ### Additional control over image thumbnailing is possible via SETIMAGE e.g. {SETIMAGE: w=200&h=150&crop=1} $MENU_TEMPLATE['buttom-image']['start'] = '
'; $MENU_TEMPLATE['buttom-image']['body'] = '{CMENUIMAGE}{CPAGEBUTTON}'; $MENU_TEMPLATE['buttom-image']['end'] = '
';