1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 13:41:52 +02:00

{---BREADCRUMB---} values added for Gsitemap and Gallery plugins.

This commit is contained in:
Cameron 2019-06-15 10:45:02 -07:00
parent 1e6bf9df94
commit ee59e5cc85
4 changed files with 42 additions and 11 deletions

@ -118,6 +118,7 @@ class plugin_gallery_index_controller extends eControllerFront
$template = $this->getTemplate();
$template = array_change_key_case($template);
$sc = e107::getScBatch('gallery', true);
$sc->breadcrumb();
$text = "";
@ -186,6 +187,7 @@ class plugin_gallery_index_controller extends eControllerFront
$sc = e107::getScBatch('gallery', true);
if(defset('BOOTSTRAP') === true || defset('BOOTSTRAP') === 2) // Convert bootsrap3 to bootstrap2 compat.
{
$template['list_start'] = str_replace('row', 'row-fluid', $template['list_start']);
@ -196,6 +198,9 @@ class plugin_gallery_index_controller extends eControllerFront
$sc->curCat = $cid;
$sc->from = $request->getRequestParam('frm', 0);
$orderBy = varset($plugPrefs['orderby'], 'media_id DESC');
$list = e107::getMedia()->getImages($cid, $sc->from, $sc->amount, null, $orderBy);
@ -204,6 +209,8 @@ class plugin_gallery_index_controller extends eControllerFront
$inner = "";
foreach($list as $row)
{
$sc->setVars($row)
@ -212,6 +219,8 @@ class plugin_gallery_index_controller extends eControllerFront
$inner .= $tp->parseTemplate($template['list']['item'], true, $sc);
}
$sc->breadcrumb();
$text = $tp->parseTemplate($template['list']['start'], true, $sc);
$text .= $inner;
$text .= $tp->parseTemplate($template['list']['end'], true, $sc);

@ -36,6 +36,30 @@ class gallery_shortcodes extends e_shortcode
$this->attFull = array('w' => $pop_w, 'h' => $pop_h, 'x' => 1, 'crop' => 0); // 'w='.$pop_w.'&h='.$pop_h.'&x=1';
}
function breadcrumb()
{
$breadcrumb = array();
$template = e107::getTemplate('gallery', 'gallery', 'cat');
$caption = isset($template['caption']) ? e107::getParser()->toText($template['caption']) : LAN_PLUGIN_GALLERY_TITLE;
$breadcrumb[] = array('text' => $caption, '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));
}
var_dump($breadcrumb);
e107::breadcrumb($breadcrumb);
}
function sc_gallery_caption($parm = '')
{
$tp = e107::getParser();
@ -65,20 +89,13 @@ class gallery_shortcodes extends e_shortcode
return $tp->toHTML($this->var['media_description'], true, 'BODY');
}
function sc_gallery_breadcrumb($parm = '')
{
$breadcrumb = array();
// $this->breadcrumb();
$template = e107::getTemplate('gallery', 'gallery', 'cat');
$caption = isset($template['caption']) ? e107::getParser()->toText($template['caption']) : LAN_PLUGIN_GALLERY_TITLE;
$breadcrumb[] = array('text' => $caption, '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));
}
$breadcrumb = e107::breadcrumb();
return e107::getForm()->breadcrumb($breadcrumb);
}

@ -98,6 +98,8 @@ class gallery
$template = array_change_key_case($template);
$sc = e107::getScBatch('gallery', true);
$sc->breadcrumb();
if(defset('BOOTSTRAP') === true || defset('BOOTSTRAP') === 2) // Convert bootstrap3 to bootstrap2 compat.
{
$template['cat_start'] = str_replace('row', 'row-fluid', $template['cat_start']);
@ -137,6 +139,8 @@ class gallery
$sc->amount = varset($plugPrefs['perpage'], 12);
$sc->curCat = $cat;
$sc->from = ($_GET['frm']) ? intval($_GET['frm']) : 0;
$sc->breadcrumb();
$orderBy = varset($plugPrefs['orderby'], 'media_id DESC');
$list = e107::getMedia()->getImages($cat, $sc->from, $sc->amount, null, $orderBy);

@ -35,6 +35,7 @@ if(e_QUERY == "show" || !empty($_GET['show']))
0 => array('text' => $tp->toHTML(GSLAN_Name), 'url'=> null ) // e107::url('gsitemap','index')
);
$text = e107::getForm()->breadcrumb($bread);
e107::breadcrumb($bread);
}
else
{