mirror of
https://github.com/e107inc/e107.git
synced 2025-04-20 20:51:53 +02:00
Merge pull request #3365 from SimSync/fix_3317
fixes #3317 added bbcode template "forum"
This commit is contained in:
commit
7403d9f59a
@ -131,8 +131,17 @@ 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 a Youtube video via Media Manager : ".$this->var['template']."' id='{$id}' href='".e_ADMIN."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=video' >";
|
||||
|
||||
if (ADMIN)
|
||||
{
|
||||
$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' >";
|
||||
}
|
||||
else
|
||||
{
|
||||
$data = "[youtube=tiny | small | medium | big | huge | width,height]6kYjxJmk0wc[/youtube]";
|
||||
$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>";
|
||||
@ -152,7 +161,7 @@ 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_ADMIN."image.php?mode=main&action=dialog&for=".$this->var['template']."&tagid=".$tag."&iframe=1&bbcode=glyph' >";
|
||||
$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>";
|
||||
@ -211,7 +220,7 @@ 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_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_HTTP.e_ADMIN."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='' />";
|
||||
@ -229,7 +238,7 @@ 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' id='{$id}' title='Insert a file from the Media-Manager' href='".e_ADMIN."image.php?mode=main&action=dialog&for=_common_file&tagid=".$tag."&iframe=1&bbcode=file' >";
|
||||
$text = "<a class='e-modal btn btn-primary' data-modal-caption='Media Manager' data-target='#uiModal' id='{$id}' title='Insert a file from the Media-Manager' href='".e_HTTP.e_ADMIN."image.php?mode=main&action=dialog&for=_common_file&tagid=".$tag."&iframe=1&bbcode=file' >";
|
||||
|
||||
$text .= $this->button(e_IMAGE_ABS."bbcode/prefile.png", 'file');
|
||||
// $text .= "<img class='btn btn-small bbcode bbcode_buttons e-pointer' src='".e_IMAGE_ABS."bbcode/prefile.png' title='".LANHELP_39."' alt='' />";
|
||||
|
@ -574,7 +574,21 @@ class e_bbcode
|
||||
$temp['maintenance']= $BBCODE_TEMPLATE_ADMIN;
|
||||
$temp['comment'] = $BBCODE_TEMPLATE_COMMENT;
|
||||
$temp['signature'] = $BBCODE_TEMPLATE_SIGNATURE;
|
||||
|
||||
|
||||
if(!isset($temp[$template]))
|
||||
{
|
||||
// if template not yet defined, assume that $template is the name of a plugin
|
||||
// and load the specific bbcode template from the plugin
|
||||
// see forum plugin "templates/bbcode_template.php" for an example of the definition
|
||||
$tpl = e107::getTemplate($template, 'bbcode', $template);
|
||||
if (!empty($tpl))
|
||||
{
|
||||
// If the plugin has a template defined for bbcode, add it to the list
|
||||
$temp[$template] = $tpl;
|
||||
}
|
||||
unset($tpl);
|
||||
}
|
||||
|
||||
if(isset($temp[$template]))
|
||||
{
|
||||
$BBCODE_TEMPLATE = $temp[$template];
|
||||
@ -584,7 +598,7 @@ class e_bbcode
|
||||
$BBCODE_TEMPLATE = $template;
|
||||
$template = 'comment';
|
||||
}
|
||||
elseif(ADMIN_AREA)
|
||||
elseif(deftrue('ADMIN_AREA'))
|
||||
{
|
||||
$BBCODE_TEMPLATE = $BBCODE_TEMPLATE_ADMIN;
|
||||
}
|
||||
|
19
e107_plugins/forum/templates/bbcode_template.php
Normal file
19
e107_plugins/forum/templates/bbcode_template.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2013 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
* BBCODE template - to be used by the bbcode editor
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$BBCODE_TEMPLATE['forum'] = "
|
||||
<div class='field-spacer'><!-- --></div>
|
||||
{BB=link}{BB=b}{BB=i}{BB=u}{BB=img}{BB=format}{BB=left}{BB=center}{BB=right}{BB=justify}
|
||||
{BB=list}{BB=fontcol}{BB=fontsize}{BB=emotes}{BB=youtube}
|
||||
<div class='field-spacer'><!-- --></div>
|
||||
";
|
Loading…
x
Reference in New Issue
Block a user