diff --git a/e107_admin/image.php b/e107_admin/image.php index cc5b47a26..bbe4a1f5e 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -1382,7 +1382,7 @@ class media_admin_ui extends e_admin_ui $tp = e107::getParser(); $options = array(); - $options['bbcode'] = ($this->getQuery('bbcode')=='img') ? 'img' : FALSE; + $options['bbcode'] = ($this->getQuery('bbcode')) ? $this->getQuery('bbcode') : FALSE; if(isset($_GET['from'])) { @@ -1400,6 +1400,13 @@ class media_admin_ui extends e_admin_ui 'core-media-glyphs' => array('caption'=> $tp->toGlyph('fa-flag')."Glyphs", 'method' => 'glyphTab'), ); + if(!empty($options['bbcode'])) + { + $tabOptions['core-media-img'] = $tabOptions['core-media-image']; + $tabOptions['core-media-glyph'] = $tabOptions['core-media-glyphs']; + + } + $tabs = array(); // check tab options against URL @@ -1415,13 +1422,27 @@ class media_admin_ui extends e_admin_ui } + if($options['bbcode'] === 'img') + { + $tabs['core-media-attributes'] = array('caption'=> $tp->toGlyph('fa-image').IMALAN_152, 'text' => $this->imageAttributesTab()); + } + if(getperms('A|A1')) { $tabs['core-media-upload'] = array('caption'=> $tp->toGlyph('fa-upload').IMALAN_150, 'text' => $this->uploadTab()); } + + $text = $frm->tabs($tabs, array('id'=>'admin-ui-media-manager', 'class'=>'media-manager')); + if($options['bbcode'] || E107_DEBUG_LEVEL > 0) + { + $text .= $this->mediaManagerSaveButtons($options); + } + + $text .= $this->mediaManagerPlaceholders(); + return $text; } @@ -1547,11 +1568,60 @@ class media_admin_ui extends e_admin_ui * */ - if($options['bbcode']) //TODO move to imagestyleTab(); + if($options['bbcode']) { - $text .= "