1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

fixes #3317 moved the forum template from core to plugin

This commit is contained in:
Achim Ennenbach 2018-08-10 11:49:58 +02:00
parent fe7bb66b76
commit c1bec2b6d7
3 changed files with 33 additions and 10 deletions

View File

@ -50,14 +50,6 @@ $BBCODE_TEMPLATE_SUBMITNEWS = "
";
$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>
";
// -------- Admin Templates ----------------------
$BBCODE_TEMPLATE_ADMIN = "

View File

@ -547,7 +547,6 @@ class e_bbcode
$BBCODE_TEMPLATE_ADMIN = '';
$BBCODE_TEMPLATE_COMMENT = '';
$BBCODE_TEMPLATE_SIGNATURE = '';
$BBCODE_TEMPLATE_FORUM = '';
require(e107::coreTemplatePath('bbcode')); //correct way to load a core template.
@ -575,7 +574,20 @@ class e_bbcode
$temp['maintenance']= $BBCODE_TEMPLATE_ADMIN;
$temp['comment'] = $BBCODE_TEMPLATE_COMMENT;
$temp['signature'] = $BBCODE_TEMPLATE_SIGNATURE;
$temp['forum'] = $BBCODE_TEMPLATE_FORUM;
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]))
{

View 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>
";