mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Fix for shortcode init() and plugin.xml tweak for Tinymce (show icon).
This commit is contained in:
@@ -445,11 +445,12 @@ class e_parse_shortcode
|
||||
if ($force || !$this->isRegistered($code))
|
||||
{
|
||||
$this->registered_codes[$code] = array('type' => 'class', 'path' => $path, 'class' => $className);
|
||||
|
||||
if (class_exists($className, false))
|
||||
{
|
||||
$this->scClasses[$className] = new $className(); // Required. Test with e107::getScBatch($className)
|
||||
}
|
||||
$this->initShortcodeClass($className);
|
||||
// if (class_exists($className, false))
|
||||
// {
|
||||
// $this->scClasses[$className] = new $className(); // Required. Test with e107::getScBatch($className)
|
||||
// echo "CLASS=:".$className;
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,16 +19,20 @@ class gallery_shortcodes extends e_shortcode
|
||||
public $slideMode = FALSE;
|
||||
public $slideCount = 1;
|
||||
private $downloadable = FALSE;
|
||||
private $attFull = null;
|
||||
|
||||
function init()
|
||||
{
|
||||
$this->downloadable = e107::getPlugPref('gallery','downloadable');
|
||||
$pop_w = vartrue(e107::getPlugPref('gallery','pop_w'),1024);
|
||||
$pop_h = vartrue(e107::getPlugPref('gallery','pop_h'),768);
|
||||
$this->attFull = 'w='.$pop_w.'&h='.$pop_h.'&x=1';
|
||||
}
|
||||
|
||||
function sc_gallery_caption($parm='')
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$text = "<a class='gallery-caption' title='".$tp->toAttribute($this->var['media_caption'])."' href='".e107::getParser()->replaceConstants($this->var['media_url'],'abs')."' rel='lightbox.Gallery2' >";
|
||||
$text = "<a class='gallery-caption' title='".$tp->toAttribute($this->var['media_caption'])."' href='".$tp->thumbUrl($this->var['media_url'], $this->attFull)."' rel='lightbox.Gallery2' >";
|
||||
$text .= $this->var['media_caption'];
|
||||
$text .= "</a>";
|
||||
return $text;
|
||||
@@ -61,10 +65,7 @@ class gallery_shortcodes extends e_shortcode
|
||||
$rel = ($this->slideMode == TRUE) ? 'lightbox.SlideGallery' : 'lightbox.Gallery';
|
||||
$att = 'aw='.$w.'&ah='.$h.'&x=1'; // 'aw=190&ah=150';
|
||||
|
||||
$pop_w = vartrue(e107::getPlugPref('gallery','pop_w'),1024);
|
||||
$pop_h = vartrue(e107::getPlugPref('gallery','pop_h'),768);
|
||||
$attFull = 'w='.$pop_w.'&h='.$pop_h.'&x=1';
|
||||
$srcFull = $tp->thumbUrl($this->var['media_url'], $attFull);
|
||||
$srcFull = $tp->thumbUrl($this->var['media_url'], $this->attFull);
|
||||
if(isset($parm['actualPreview']))
|
||||
{
|
||||
$srcFull = $tp->replaceConstants($this->var['media_url'], 'full');
|
||||
|
@@ -4,4 +4,7 @@
|
||||
<author name="e107 Inc." url="http://e107.org" />
|
||||
<description>Wysiwyg Text-Area Replacement</description>
|
||||
<category>misc</category>
|
||||
<adminLinks>
|
||||
<link icon='images/icon_32.png' iconSmall='images/icon_16.png' primary='true' />
|
||||
</adminLinks>
|
||||
</e107Plugin>
|
Reference in New Issue
Block a user