' + buttonText + ' '; // alert(html); tinyMCEPopup.editor.execCommand('mceInsertContent', false, html); tinyMCEPopup.close(); }); $('span.label, span.badge').click(function () { var cls = $(this).attr('class'); var html = '' + $(this).text() + ' '; tinyMCEPopup.editor.execCommand('mceInsertContent', false, html); tinyMCEPopup.close(); }); $('ul.glyphicons li, #glyph-save').click(function () { var color = $('#glyph-color').val(); var custom = $('#glyph-custom').val(); var cls = (custom != '') ? custom : $(this).find('i').attr('class'); var html = ' '; // alert(html); tinyMCEPopup.editor.execCommand('mceInsertContent', false, html); tinyMCEPopup.close(); }); $('#bbcodeInsert').click(function () { s = $('#bbcodeValue').val(); s = s.trim(s); var html = $.ajax({ type: 'POST', url: './parser.php', data: { content: s, mode: 'tohtml' }, async : false, dataType: 'html', success: function(html) { return html; } }).responseText; html = '' + html + ' ' ; alert(html); tinyMCEPopup.editor.execCommand('mceInsertContent', false, html); tinyMCEPopup.close(); }); $('a.bbcodeSelect').click(function () { var html = $(this).html(); $('#bbcodeValue').val(html); }); $('#e-cancel').click(function () { tinyMCEPopup.close(); }); }); ",'jquery'); class e_bootstrap { private $styleClasses = array(''=>'Default', 'primary'=>"Primary", 'success'=>"Success", 'info'=>"Info", 'warning'=>"Warning",'danger'=>"Danger",'inverse'=>"Inverse"); function init() { $ns = e107::getRender(); if(e_QUERY == 'bbcode') { echo $this->bbcodeForm(); return; } $text = "
Warning: These will only work if you have a bootstrap-based theme installed
"; $text .= ' '; $text .= '
'; $text .= '
'.$this->buttonForm().'
'; $text .= '
'.$this->badgeForm().'
'; $text .= '
'.$this->glyphicons().'
'; $text .= '
'; echo $text; } function buttonForm() { $frm = e107::getForm(); $buttonSizes = array(''=>'Default', 'btn-mini'=>"Mini", 'btn-small'=>"Small", 'btn-large' => "Large"); $buttonTypes = $this->styleClasses; $butSelect = ""; $butSelect .= "
"; foreach($buttonTypes as $type=>$diz) { $label = ''; $butSelect .= $frm->radio('buttonType', $type, false, array('label'=>$label)); } $butSelect .= "
"; $butSize = "
"; foreach($buttonSizes as $size=>$label) { $selected = ($size == '') ? true : false; $butSize .= $frm->radio('buttonSize', $size, $selected, array('label'=>$label)); } $butSize .= "
"; $text = "
Button Style ".$butSelect."
Button Size

".$butSize."

Button Text

".$frm->text('buttonText',$value,50)."

Button Url

".$frm->text('buttonUrl','',255,'size=xxlarge')."

". $frm->admin_button('insertButton','save','other',"Insert") ."
"; return $text; } function badgeForm() { unset($this->styleClasses['primary']); foreach($this->styleClasses as $key=>$type) { $classLabel = ($key != '') ? " label-".$key : ""; $classBadge = ($key != '') ? " badge-".$key : ""; $text .= '
'.$type.' '; $text .= ''.$type.''; $text .= "
"; } return $text; } function bbcodeForm() { $list = e107::getPref('bbcode_list'); $text .= "

e107 Bbcodes

"; foreach($list as $plugin=>$val) { $text .= ""; } $text .= "
Plugin Bbcode
".$plugin." "; foreach($val as $bb=>$v) { $text .= "[".$bb."][/".$bb."]"; } $text .= "
"; $frm = e107::getForm(); $text .= $frm->text('bbcodeValue','',false,'size=xlarge'); $text .= $frm->button('bbcodeInsert','go','other','Insert'); return $text; } function glyphicons() { $icons = array( "icon-glass", "icon-music", "icon-search", "icon-envelope", "icon-heart", "icon-star", "icon-star-empty", "icon-user", "icon-film", "icon-th-large", "icon-th", "icon-th-list", "icon-ok", "icon-remove", "icon-zoom-in", "icon-zoom-out", "icon-off", "icon-signal", "icon-cog", "icon-trash", "icon-home", "icon-file", "icon-time", "icon-road", "icon-download-alt", "icon-download", "icon-upload", "icon-inbox", "icon-play-circle", "icon-repeat", "icon-refresh", "icon-list-alt", "icon-lock", "icon-flag", "icon-headphones", "icon-volume-off", "icon-volume-down", "icon-volume-up", "icon-qrcode", "icon-barcode", "icon-tag", "icon-tags", "icon-book", "icon-bookmark", "icon-print", "icon-camera", "icon-font", "icon-bold", "icon-italic", "icon-text-height", "icon-text-width", "icon-align-left", "icon-align-center", "icon-align-right", "icon-align-justify", "icon-list", "icon-indent-left", "icon-indent-right", "icon-facetime-video", "icon-picture", "icon-pencil", "icon-map-marker", "icon-adjust", "icon-tint", "icon-edit", "icon-share", "icon-check", "icon-move", "icon-step-backward", "icon-fast-backward", "icon-backward", "icon-play", "icon-pause", "icon-stop", "icon-forward", "icon-fast-forward", "icon-step-forward", "icon-eject", "icon-chevron-left", "icon-chevron-right", "icon-plus-sign", "icon-minus-sign", "icon-remove-sign", "icon-ok-sign", "icon-question-sign", "icon-info-sign", "icon-screenshot", "icon-remove-circle", "icon-ok-circle", "icon-ban-circle", "icon-arrow-left", "icon-arrow-right", "icon-arrow-up", "icon-arrow-down", "icon-share-alt", "icon-resize-full", "icon-resize-small", "icon-plus", "icon-minus", "icon-asterisk", "icon-exclamation-sign", "icon-gift", "icon-leaf", "icon-fire", "icon-eye-open", "icon-eye-close", "icon-warning-sign", "icon-plane", "icon-calendar", "icon-random", "icon-comment", "icon-magnet", "icon-chevron-up", "icon-chevron-down", "icon-retweet", "icon-shopping-cart", "icon-folder-close", "icon-folder-open", "icon-resize-vertical", "icon-resize-horizontal", "icon-hdd", "icon-bullhorn", "icon-bell", "icon-certificate", "icon-thumbs-up", "icon-thumbs-down", "icon-hand-right", "icon-hand-left", "icon-hand-up", "icon-hand-down", "icon-circle-arrow-right", "icon-circle-arrow-left", "icon-circle-arrow-up", "icon-circle-arrow-down", "icon-globe", "icon-wrench", "icon-tasks", "icon-filter", "icon-briefcase", "icon-fullscreen" ); $frm = e107::getForm(); $sel = array(''=>'Dark Gray','icon-white'=>'White'); $text .= "
"; $text .= "
Color: ".$frm->select('glyph-color',$sel)." Custom: ".$frm->text('glyph-custom','').$frm->button('glyph-save','Go')."
"; $text .= ""; $text .= "
"; return $text; } } require_once(e_ADMIN."auth.php"); //e107::lan('core','admin',TRUE); $bootObj = new e_bootstrap; $bootObj->init(); require_once(e_ADMIN."footer.php"); exit; //