1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-05 06:07:32 +02:00

Gallery breadcrumb added.

This commit is contained in:
Cameron
2013-06-23 19:55:52 -07:00
parent 6b53d47ba4
commit 451e044078
4 changed files with 35 additions and 6 deletions

View File

@@ -84,12 +84,19 @@ class plugin_gallery_index_controller extends eControllerFront
$sc = e107::getScBatch('gallery',TRUE); $sc = e107::getScBatch('gallery',TRUE);
$text = ""; $text = "";
$text = e107::getParser()->parseTemplate($template['CAT_START'],TRUE, $sc);
foreach($this->catList as $val) foreach($this->catList as $val)
{ {
$sc->setVars($val); $sc->setVars($val);
$text .= e107::getParser()->parseTemplate($template['CAT_ITEM'],TRUE); $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) $this->addTitle(LAN_PLUGIN_GALLERY_TITLE)
->addBody($text); ->addBody($text);
} }

View File

@@ -44,6 +44,20 @@ class gallery_shortcodes extends e_shortcode
return $tp->toHTML($this->var['media_description'], true, 'BODY'); 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 * All possible parameters
* {GALLERY_THUMB=w=200&h=200&thumburl&thumbsrc&imageurl&orig} * {GALLERY_THUMB=w=200&h=200&thumburl&thumbsrc&imageurl&orig}

View File

@@ -56,13 +56,19 @@ class gallery
$sc = e107::getScBatch('gallery',TRUE); $sc = e107::getScBatch('gallery',TRUE);
$text = ""; $text = "";
$text = e107::getParser()->parseTemplate($template['CAT_START'],TRUE, $sc);
foreach($this->catList as $val) foreach($this->catList as $val)
{ {
$sc->setVars($val); $sc->setVars($val);
$text .= e107::getParser()->parseTemplate($template['CAT_ITEM'],TRUE, $sc); $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 .= $inner;
$text .= $tp->parseTemplate($template['LIST_END'],TRUE, $sc); $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);
} }

View File

@@ -8,7 +8,8 @@
$GALLERY_TEMPLATE['LIST_START'] = $GALLERY_TEMPLATE['LIST_START'] =
'<ul class="thumbnails gallery">'; '{GALLERY_BREADCRUMB}
<ul class="thumbnails gallery">';
$GALLERY_TEMPLATE['LIST_ITEM'] = ' $GALLERY_TEMPLATE['LIST_ITEM'] = '
@@ -29,7 +30,8 @@ $GALLERY_TEMPLATE['LIST_END'] =
$GALLERY_TEMPLATE['CAT_START'] = $GALLERY_TEMPLATE['CAT_START'] =
'<ul class="thumbnails gallery-cat">'; '{GALLERY_BREADCRUMB}
<ul class="thumbnails gallery-cat">';
$GALLERY_TEMPLATE['CAT_ITEM'] = ' $GALLERY_TEMPLATE['CAT_ITEM'] = '