mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Simple Gallery plugin which uses the media-manager back-end.
This commit is contained in:
44
e107_plugins/gallery/shortcodes/batch/gallery_shortcodes.php
Normal file
44
e107_plugins/gallery/shortcodes/batch/gallery_shortcodes.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (c) e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: e_shortcode.php 12438 2011-12-05 15:12:56Z secretr $
|
||||
*
|
||||
* Featurebox shortcode batch class - shortcodes available site-wide. ie. equivalent to multiple .sc files.
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
|
||||
class gallery_shortcodes extends e_shortcode
|
||||
{
|
||||
function sc_gallery_caption($parm='')
|
||||
{
|
||||
return $this->eParserVars['media_caption'];
|
||||
}
|
||||
|
||||
function sc_gallery_thumb($parm='')
|
||||
{
|
||||
$att = ($parm) ?$parm : 'aw=190&ah=150';
|
||||
return "<img src='".e107::getParser()->thumbUrl($this->eParserVars['media_url'],$att)."' alt='' />";
|
||||
}
|
||||
|
||||
function sc_gallery_cat_title($parm='')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$text = "<a href='".e_SELF."?cat=".$this->eParserVars['media_cat_category']."'>";
|
||||
$text .= $tp->toHtml($this->eParserVars['media_cat_title']);
|
||||
$text .= "</a>";
|
||||
return $text;
|
||||
}
|
||||
|
||||
function sc_gallery_cat_thumb($parm='')
|
||||
{
|
||||
$att = ($parm) ?$parm : 'aw=190&ah=150';
|
||||
$text = "<a href='".e_SELF."?cat=".$this->eParserVars['media_cat_category']."'>";
|
||||
$text .= "<img src='".e107::getParser()->thumbUrl($this->eParserVars['media_cat_image'],$att)."' alt='' />";
|
||||
$text .= "</a>";
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user