From 825ab749844b8aa7070927e138115506a452d328 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 23 Mar 2016 17:25:21 -0700 Subject: [PATCH] Custom Forum title now respected throughout. --- e107_plugins/forum/forum.php | 4 ++-- e107_plugins/forum/forum_class.php | 8 +++++--- e107_plugins/forum/forum_viewtopic.php | 3 ++- e107_plugins/forum/languages/English/English_front.php | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index fbc057b18..6b4070ce5 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -92,7 +92,7 @@ if(isset($_GET['f'])) $fVars = new e_vars; $gen = new convert; -$fVars->FORUMTITLE = LAN_PLUGIN_FORUM_NAME; +$fVars->FORUMTITLE = e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME); $fVars->THREADTITLE = LAN_FORUM_0002; $fVars->REPLYTITLE = LAN_FORUM_0003; $fVars->LASTPOSTITLE = LAN_FORUM_0004; @@ -417,7 +417,7 @@ function parse_forum($f, $restricted_string = '') $fVars->FORUMSUBFORUMS = ''; - + $badgeReplies = ($f['forum_replies']) ? "badge-info" : ""; diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index 247846508..f79673197 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -1971,6 +1971,8 @@ class e107forum $tp = e107::getParser(); $frm = e107::getForm(); + + $forumTitle = e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME); global $FORUM_CRUMB, $forumInfo, $threadInfo, $thread; global $BREADCRUMB,$BACKLINK; // Eventually we should deprecate BACKLINK @@ -1985,7 +1987,7 @@ class e107forum $FORUM_CRUMB['sitename']['value'] = str_replace($search, $replace, $FORUM_CRUMB['sitename']['value']); $search = array('{FORUMS_TITLE}', '{FORUMS_HREF}'); - $replace = array(LAN_PLUGIN_FORUM_NAME, e107::url('forum','index')); + $replace = array($forumTitle, e107::url('forum','index')); $FORUM_CRUMB['forums']['value'] = str_replace($search, $replace, $FORUM_CRUMB['forums']['value']); $search = array('{PARENT_TITLE}', '{PARENT_HREF}'); @@ -2023,7 +2025,7 @@ class e107forum $dfltsep = ' :: '; $BREADCRUMB = "".SITENAME."".$dfltsep. - "".LAN_PLUGIN_FORUM_NAME."".$dfltsep; + "".$forumTitle."".$dfltsep; if($forumInfo['sub_parent']) { @@ -2057,7 +2059,7 @@ class e107forum $breadcrumb = array(); - $breadcrumb[] = array('text'=> LAN_PLUGIN_FORUM_NAME , 'url'=> e107::url('forum','index')); + $breadcrumb[] = array('text'=> $forumTitle , 'url'=> e107::url('forum','index')); if($forumInfo['sub_parent']) { diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 2112a86a4..4b3a93f81 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -531,7 +531,8 @@ require_once (HEADERF); if ($forum->prefs->get('enclose')) { - $ns->tablerender(LAN_FORUM_1001, $forumstring, $mes->render(). array('forum_viewtopic', 'main')); + $forumTitle = e107::pref('forum','title', LAN_PLUGIN_FORUM_NAME); + $ns->tablerender($forumTitle, $forumstring, $mes->render(). array('forum_viewtopic', 'main')); } else { diff --git a/e107_plugins/forum/languages/English/English_front.php b/e107_plugins/forum/languages/English/English_front.php index 4d442b6b2..a9509a57f 100644 --- a/e107_plugins/forum/languages/English/English_front.php +++ b/e107_plugins/forum/languages/English/English_front.php @@ -118,7 +118,7 @@ define("LAN_FORUM_1004", "Starter"); // LAN_54 define("LAN_FORUM_1005", "Views"); // LAN_56 define("LAN_FORUM_1006", "Important Topics"); // LAN_411 (vf) -define("LAN_FORUM_1007", "Forum Topics"); // LAN_412 (vf) +define("LAN_FORUM_1007", "Topics"); // LAN_412 (vf) define("LAN_FORUM_1008", "There are no topics in this forum yet."); // LAN_58 define("LAN_FORUM_1009", "This forum is moderated by"); // LAN_404 define("LAN_FORUM_1010", "[popular]"); // LAN_395 (vf)