mirror of
https://github.com/e107inc/e107.git
synced 2025-08-24 07:03:06 +02:00
MediaManager Fixes.
This commit is contained in:
@@ -136,6 +136,17 @@ class bbcode_shortcodes extends e_shortcode
|
||||
{
|
||||
//$text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' title='Insert a Youtube video via Media Manager : " . $this->var['template'] . "' id='{$id}' href='" . e_HTTP . e_ADMIN . "image.php?mode=main&action=dialog&for=" . $this->var['template'] . "&tagid=" . $tag . "&iframe=1&bbcode=video' >";
|
||||
$text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' title='Insert a Youtube video via Media Manager : " . $this->var['template'] . "' id='{$id}' href='" . e_ADMIN_ABS . "image.php?mode=main&action=dialog&for=" . $this->var['template'] . "&tagid=" . $tag . "&iframe=1&bbcode=video&youtube=1' >";
|
||||
|
||||
$label = $this->button(e_IMAGE_ABS."bbcode/youtube.png", 'youtube');
|
||||
|
||||
$opts = array(
|
||||
'bbcode' => 'video',
|
||||
'class' => 'btn btn-small btn-primary bbcode bbcode_buttons e-pointer',
|
||||
'title' => $this->br2nl(LANHELP_48),
|
||||
'youtube' => 1
|
||||
);
|
||||
|
||||
return e107::getForm()->mediaUrl($this->var['template'],$label, $tag, $opts);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -143,13 +154,22 @@ class bbcode_shortcodes extends e_shortcode
|
||||
$event = $this->getEvent('addtext',$data,LANHELP_48);
|
||||
$text = "<a {$event} class='btn btn-default' id='{$id}' data-function='insert' href='#{$this->var['tagid']}' data-bbcode='{$data}' title='".$this->br2nl(LANHELP_48)."'>";
|
||||
}
|
||||
|
||||
$text .= $this->button(e_IMAGE_ABS."bbcode/youtube.png", 'youtube'); // , LANHELP_48
|
||||
|
||||
$text .= "</a>";
|
||||
|
||||
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* todo complete for 2.2.0
|
||||
* @param $id
|
||||
* @return string
|
||||
*/
|
||||
function bb_glyph($id)
|
||||
{
|
||||
if($this->var['tagid'] == 'data_') // BC work-around for duplicate IDs.
|
||||
@@ -162,10 +182,22 @@ class bbcode_shortcodes extends e_shortcode
|
||||
}
|
||||
|
||||
|
||||
$text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' title='Insert a Glyphicon via Media Manager : ".$this->var['template']."' id='{$id}' href='".e_HTTP.e_ADMIN."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=glyph' >";
|
||||
$text .= $this->button(e_IMAGE_ABS."bbcode/youtube.png", 'youtube'); // LANHELP_48
|
||||
/* $text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' title='Insert a Glyphicon via Media Manager : ".$this->var['template']."' id='{$id}' href='".e_HTTP.e_ADMIN."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=glyph' >";
|
||||
$text .= $this->button(e_IMAGE_ABS."bbcode/youtube.png", 'flag'); // LANHELP_48
|
||||
|
||||
$text .= "</a>";
|
||||
*/
|
||||
$label = $this->button(e_IMAGE_ABS."bbcode/preimage.png",'picture-o');
|
||||
|
||||
$opts = array(
|
||||
'bbcode' => 'img',
|
||||
'class' => 'btn btn-small btn-primary bbcode bbcode_buttons e-pointer',
|
||||
'title' => "Insert an Image from the Media Manager : ".$this->var['template']
|
||||
);
|
||||
|
||||
$text = e107::getForm()->mediaUrl($this->var['template'],$label, $tag, $opts);
|
||||
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
@@ -188,10 +220,7 @@ class bbcode_shortcodes extends e_shortcode
|
||||
|
||||
function button($image, $glyph='')
|
||||
{
|
||||
// $text .= "<button type='button' class='btn e-pointer' title='".$title."'>";
|
||||
|
||||
// $text .= ($link) ? $link : "";
|
||||
|
||||
|
||||
if(deftrue('BOOTSTRAP') && $glyph && deftrue('FONTAWESOME'))
|
||||
{
|
||||
$text = "<span class='fa fa-".$glyph."'></span>";
|
||||
@@ -200,10 +229,7 @@ class bbcode_shortcodes extends e_shortcode
|
||||
{
|
||||
$text ="<img src='".$image."' alt='' style='max-height:18px' />";
|
||||
}
|
||||
|
||||
// $text .= ($link) ? "</a>" : "";
|
||||
|
||||
// $text .= "</button>";
|
||||
|
||||
return $text;
|
||||
|
||||
|
||||
@@ -221,12 +247,23 @@ class bbcode_shortcodes extends e_shortcode
|
||||
{
|
||||
list($tag,$tmp) = explode("--",$this->var['tagid']); // works with $frm->bbarea to detect textarea from first half of tag.
|
||||
}
|
||||
// $text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' title='Insert an Image from the Media Manager : ".$this->var['template']."' id='{$id}' href='".e_HTTP.e_ADMIN."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=img' >";
|
||||
$text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' title='Insert an Image from the Media Manager : ".$this->var['template']."' id='{$id}' href='".e_ADMIN_ABS."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=img' >";
|
||||
|
||||
/*
|
||||
$text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' title='Insert an Image from the Media Manager : ".$this->var['template']."' id='{$id}' href='".e_ADMIN_ABS."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=img' >";
|
||||
$text .= $this->button(e_IMAGE_ABS."bbcode/preimage.png",'picture-o');
|
||||
// $text .= "<img class='btn btn-small bbcode bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/preimage.png' title='".LANHELP_45."' alt='' />";
|
||||
$text .= "</a>\n";
|
||||
*/
|
||||
|
||||
$label = $this->button(e_IMAGE_ABS."bbcode/preimage.png",'picture-o');
|
||||
|
||||
$opts = array(
|
||||
'bbcode' => 'img',
|
||||
'class' => 'btn btn-small btn-primary bbcode bbcode_buttons e-pointer',
|
||||
'title' => "Insert an Image from the Media Manager : ".$this->var['template']
|
||||
);
|
||||
|
||||
$text = e107::getForm()->mediaUrl($this->var['template'],$label, $tag, $opts);
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user