diff --git a/e107_plugins/gallery/controllers/index.php b/e107_plugins/gallery/controllers/index.php index 8fb942bfc..8ddafdb30 100644 --- a/e107_plugins/gallery/controllers/index.php +++ b/e107_plugins/gallery/controllers/index.php @@ -84,12 +84,19 @@ class plugin_gallery_index_controller extends eControllerFront $sc = e107::getScBatch('gallery',TRUE); $text = ""; + + $text = e107::getParser()->parseTemplate($template['CAT_START'],TRUE, $sc); + foreach($this->catList as $val) { $sc->setVars($val); $text .= e107::getParser()->parseTemplate($template['CAT_ITEM'],TRUE); } - $text = $template['CAT_START'].$text.$template['CAT_END']; + + $text .= e107::getParser()->parseTemplate($template['CAT_END'],TRUE, $sc); + + + // $text = $template['CAT_START'].$text.$template['CAT_END']; $this->addTitle(LAN_PLUGIN_GALLERY_TITLE) ->addBody($text); } diff --git a/e107_plugins/gallery/e_shortcode.php b/e107_plugins/gallery/e_shortcode.php index 87048991d..258a9a632 100644 --- a/e107_plugins/gallery/e_shortcode.php +++ b/e107_plugins/gallery/e_shortcode.php @@ -44,6 +44,20 @@ class gallery_shortcodes extends e_shortcode return $tp->toHTML($this->var['media_description'], true, 'BODY'); } + function sc_gallery_breadcrumb($parm='') + { + $breadcrumb = array(); + + $breadcrumb[] = array('text'=> LAN_PLUGIN_GALLERY_TITLE, 'url'=> e107::getUrl()->create('gallery', $this->var)); + + if(vartrue($this->curCat)) + { + $breadcrumb[] = array('text'=> $this->sc_gallery_cat_title('title'), 'url'=> e107::getUrl()->create('gallery/index/list', $this->var)); + } + + return e107::getForm()->breadcrumb($breadcrumb); + } + /** * All possible parameters * {GALLERY_THUMB=w=200&h=200&thumburl&thumbsrc&imageurl&orig} diff --git a/e107_plugins/gallery/gallery.php b/e107_plugins/gallery/gallery.php index 7a780ff81..cf49a6065 100644 --- a/e107_plugins/gallery/gallery.php +++ b/e107_plugins/gallery/gallery.php @@ -56,13 +56,19 @@ class gallery $sc = e107::getScBatch('gallery',TRUE); $text = ""; + + + $text = e107::getParser()->parseTemplate($template['CAT_START'],TRUE, $sc); + foreach($this->catList as $val) { $sc->setVars($val); $text .= e107::getParser()->parseTemplate($template['CAT_ITEM'],TRUE, $sc); } - $text = $template['CAT_START'].$text.$template['CAT_END']; - e107::getRender()->tablerender("Gallery",$text); + + $text .= e107::getParser()->parseTemplate($template['CAT_END'],TRUE, $sc); + + e107::getRender()->tablerender(LAN_PLUGIN_GALLERY_TITLE, $text); } @@ -93,7 +99,7 @@ class gallery $text .= $inner; $text .= $tp->parseTemplate($template['LIST_END'],TRUE, $sc); - e107::getRender()->tablerender("Gallery :: ".$catname,$mes->render().$text); + e107::getRender()->tablerender(LAN_PLUGIN_GALLERY_TITLE, $mes->render().$text); } diff --git a/e107_plugins/gallery/templates/gallery_template.php b/e107_plugins/gallery/templates/gallery_template.php index 68c66c43f..9075b98ad 100644 --- a/e107_plugins/gallery/templates/gallery_template.php +++ b/e107_plugins/gallery/templates/gallery_template.php @@ -8,7 +8,8 @@ $GALLERY_TEMPLATE['LIST_START'] = - '