1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Added alert bbcode. menu-name shortcode for custom menus. And a 'Bootstrap Row' css style in Tinymce4.

This commit is contained in:
Cameron
2015-09-21 14:52:29 -07:00
parent 970070fa62
commit d8d4b48341
4 changed files with 72 additions and 3 deletions

View File

@@ -0,0 +1,60 @@
<?php
/**
* Copyright (C) e107 Inc (e107.org), Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
*
* DIV block bbcode
*/
if (!defined('e107_INIT')) { exit; }
// This is a generic and 'responsive' video bbcode. Handles Youtube and eventually html5 video tags.
class bb_alert extends e_bb_base
{
/**
* Called prior to save
* Re-assemble the bbcode
*/
function toDB($code_text, $parm)
{
if(!empty($parm))
{
$ins = '='.$parm;
}
else
{
$ins = '';
}
return '[alert'.$ins.']'.$code_text.'[/alert]';
}
/**
* Bootstrap Alert container.
* @param $code_text :
*/
function toHTML($code_text, $parm='')
{
if(!empty($parm))
{
$style = "alert alert-".$parm;
}
else
{
$style = "alert alert-default";
}
return "<div class='".$style."'>".$code_text."</div>";
}
}
?>