1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Gallery pagination

This commit is contained in:
CaMer0n
2012-04-24 08:36:35 +00:00
parent 72267ae458
commit 3746bf5f6a
5 changed files with 54 additions and 10 deletions

View File

@@ -10,7 +10,13 @@ if (!defined('e107_INIT')) { exit; }
class gallery_shortcodes extends e_shortcode
{
{
public $total = 0;
public $amount = 3;
public $from = 0;
public $curCat = null;
function sc_gallery_caption($parm='')
{
$text = "<a href='".e107::getParser()->replaceConstants($this->eParserVars['media_url'])."' rel='external shadowbox' >";
@@ -46,5 +52,13 @@ class gallery_shortcodes extends e_shortcode
return $text;
}
function sc_gallery_nextprev($parm='')
{
$url = e_SELF."?cat=".$this->curCat."--AMP--frm=--FROM--";
$parm = 'total='.$this->total.'&amount='.$this->amount.'&current='.$this->from.'&url='.$url; // .'&url='.$url;
$text .= e107::getParser()->parseTemplate("{NEXTPREV=".$parm."}");
return $text;
}
}