mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 22:27:34 +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))
|
if ($force || !$this->isRegistered($code))
|
||||||
{
|
{
|
||||||
$this->registered_codes[$code] = array('type' => 'class', 'path' => $path, 'class' => $className);
|
$this->registered_codes[$code] = array('type' => 'class', 'path' => $path, 'class' => $className);
|
||||||
|
$this->initShortcodeClass($className);
|
||||||
if (class_exists($className, false))
|
// if (class_exists($className, false))
|
||||||
{
|
// {
|
||||||
$this->scClasses[$className] = new $className(); // Required. Test with e107::getScBatch($className)
|
// $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 $slideMode = FALSE;
|
||||||
public $slideCount = 1;
|
public $slideCount = 1;
|
||||||
private $downloadable = FALSE;
|
private $downloadable = FALSE;
|
||||||
|
private $attFull = null;
|
||||||
|
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
$this->downloadable = e107::getPlugPref('gallery','downloadable');
|
$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='')
|
function sc_gallery_caption($parm='')
|
||||||
{
|
{
|
||||||
$tp = e107::getParser();
|
$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 .= $this->var['media_caption'];
|
||||||
$text .= "</a>";
|
$text .= "</a>";
|
||||||
return $text;
|
return $text;
|
||||||
@@ -61,10 +65,7 @@ class gallery_shortcodes extends e_shortcode
|
|||||||
$rel = ($this->slideMode == TRUE) ? 'lightbox.SlideGallery' : 'lightbox.Gallery';
|
$rel = ($this->slideMode == TRUE) ? 'lightbox.SlideGallery' : 'lightbox.Gallery';
|
||||||
$att = 'aw='.$w.'&ah='.$h.'&x=1'; // 'aw=190&ah=150';
|
$att = 'aw='.$w.'&ah='.$h.'&x=1'; // 'aw=190&ah=150';
|
||||||
|
|
||||||
$pop_w = vartrue(e107::getPlugPref('gallery','pop_w'),1024);
|
$srcFull = $tp->thumbUrl($this->var['media_url'], $this->attFull);
|
||||||
$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);
|
|
||||||
if(isset($parm['actualPreview']))
|
if(isset($parm['actualPreview']))
|
||||||
{
|
{
|
||||||
$srcFull = $tp->replaceConstants($this->var['media_url'], 'full');
|
$srcFull = $tp->replaceConstants($this->var['media_url'], 'full');
|
||||||
|
@@ -4,4 +4,7 @@
|
|||||||
<author name="e107 Inc." url="http://e107.org" />
|
<author name="e107 Inc." url="http://e107.org" />
|
||||||
<description>Wysiwyg Text-Area Replacement</description>
|
<description>Wysiwyg Text-Area Replacement</description>
|
||||||
<category>misc</category>
|
<category>misc</category>
|
||||||
|
<adminLinks>
|
||||||
|
<link icon='images/icon_32.png' iconSmall='images/icon_16.png' primary='true' />
|
||||||
|
</adminLinks>
|
||||||
</e107Plugin>
|
</e107Plugin>
|
Reference in New Issue
Block a user