From e763b9023776cef6b51b735d9c13e7eb76ab4089 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Wed, 16 Nov 2016 20:43:18 +0000 Subject: [PATCH 1/2] Enable templating of viewforum caption Enable templating of viewforum caption --- e107_plugins/forum/forum_viewforum.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 74a3217d0..6c9906c21 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -163,6 +163,7 @@ if (empty($FORUM_VIEW_START)) if(!empty($FORUM_VIEWFORUM_TEMPLATE) && is_array($FORUM_VIEWFORUM_TEMPLATE) && deftrue('BOOTSTRAP',false)) // New v2.x bootstrap Template. { + $FORUM_VIEW_CAPTION = $FORUM_VIEWFORUM_TEMPLATE['caption']; $FORUM_VIEW_START_CONTAINER = $FORUM_VIEWFORUM_TEMPLATE['start']; $FORUM_VIEW_START = $FORUM_VIEWFORUM_TEMPLATE['header']; $FORUM_VIEW_FORUM = $FORUM_VIEWFORUM_TEMPLATE['item']; @@ -564,7 +565,9 @@ $forum_view_end = $tp->parseTemplate($FORUM_VIEW_END, false, $sc); if ($forum->prefs->get('enclose')) { // $forum_view_subs???? - $ns->tablerender($forum->prefs->get('title'), $forum_view_start.$forum_view_subs.$forum_view_forum.$forum_view_end, array('forum_viewforum', 'main1')); + $caption = varset($FORUM_VIEW_CAPTION) ? $tp->parseTemplate($FORUM_VIEW_CAPTION, TRUE, $sc) : $forum->prefs->get('title'); + + $ns->tablerender($caption, $forum_view_start.$forum_view_subs.$forum_view_forum.$forum_view_end, array('forum_viewforum', 'main1')); } else { From 26827d410a634685188be953e27aff40f84df194 Mon Sep 17 00:00:00 2001 From: rica-carv Date: Wed, 16 Nov 2016 20:44:40 +0000 Subject: [PATCH 2/2] Update forum_viewforum_template.php --- e107_plugins/forum/templates/forum_viewforum_template.php | 1 + 1 file changed, 1 insertion(+) diff --git a/e107_plugins/forum/templates/forum_viewforum_template.php b/e107_plugins/forum/templates/forum_viewforum_template.php index 42ba5ced9..d1e6b71f7 100644 --- a/e107_plugins/forum/templates/forum_viewforum_template.php +++ b/e107_plugins/forum/templates/forum_viewforum_template.php @@ -286,6 +286,7 @@ $FORUM_CRUMB['forum']['value'] = "{FORUM_TITLE}"; //TODO Find a good place to put a {SEARCH} dropdown. +$FORUM_VIEWFORUM_TEMPLATE['caption'] = ""; $FORUM_VIEWFORUM_TEMPLATE['start'] = ""; $FORUM_VIEWFORUM_TEMPLATE['header'] = "
{BREADCRUMB}