From 552d113ce06c763fe4267888c6c319ed3c994a85 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 30 Jan 2015 02:50:37 -0800 Subject: [PATCH] Fixes #797 missing LANs and correct forum layout for bootstrap 3 css classes. --- e107_plugins/forum/forum.php | 14 +++++-- e107_plugins/forum/forum_class.php | 8 ++-- e107_plugins/forum/forum_viewforum.php | 8 ++-- e107_plugins/forum/forum_viewtopic.php | 12 +++--- .../forum/languages/English/English_front.php | 5 ++- .../shortcodes/batch/post_shortcodes.php | 2 +- .../shortcodes/batch/view_shortcodes.php | 26 ++++++------ .../forum/templates/forum_post_template.php | 2 +- .../forum/templates/forum_template.php | 16 ++++---- .../templates/forum_viewforum_template.php | 8 ++-- .../templates/forum_viewtopic_template.php | 40 +++++++++---------- 11 files changed, 77 insertions(+), 64 deletions(-) diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index 7e664fdb2..85e24fe1b 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -123,13 +123,21 @@ $fVars->ICONKEY = " ".LAN_FORUM_0041." \n\n"; +if(!$srchIcon = $tp->toGlyph('fa-search')) +{ + $srchIcon = LAN_SEARCH; +} + $fVars->SEARCH = "
- - - +
+ + + + +
\n"; diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index 5659c80f4..c8b06097b 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -377,7 +377,7 @@ class e107forum case 'lock': if(e107::getDb()->update('forum_thread', 'thread_active=0 WHERE thread_id='.$id)) { - $ret['msg'] = FORLAN_CLOSE; + $ret['msg'] = LAN_FORUM_CLOSE; // FORLAN_CLOSE; $ret['status'] = 'ok'; } else @@ -390,7 +390,7 @@ class e107forum case 'unlock': if(e107::getDb()->update('forum_thread', 'thread_active=1 WHERE thread_id='.$id)) { - $ret['msg'] = FORLAN_OPEN; + $ret['msg'] = LAN_FORUM_OPEN; // FORLAN_OPEN; $ret['status'] = 'ok'; } else @@ -403,7 +403,7 @@ class e107forum case 'stick': if(e107::getDb()->update('forum_thread', 'thread_sticky=1 WHERE thread_id='.$id)) { - $ret['msg'] = FORLAN_STICK; + $ret['msg'] = LAN_FORUM_STICK; // FORLAN_STICK; $ret['status'] = 'ok'; } else @@ -416,7 +416,7 @@ class e107forum case 'unstick': if(e107::getDb()->update('forum_thread', 'thread_sticky=0 WHERE thread_id='.$id)) { - $ret['msg'] = FORLAN_UNSTICK; + $ret['msg'] = LAN_FORUM_UNSTICK; // FORLAN_UNSTICK; $ret['status'] = 'ok'; } else diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 8d7f0ca54..381a960ce 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -698,11 +698,11 @@ function fadminoptions($thread_info) - $text .= "
  • Delete ".$tp->toGlyph('trash'); - $text .= "
  • ".$lan[$stickUnstick]." ".$icon[$stickUnstick]."
  • "; - $text .= "
  • ".$lan[$lockUnlock]." ".$icon[$lockUnlock]."
  • "; + $text .= "
  • Delete ".$tp->toGlyph('trash'); + $text .= "
  • ".$lan[$stickUnstick]." ".$icon[$stickUnstick]."
  • "; + $text .= "
  • ".$lan[$lockUnlock]." ".$icon[$lockUnlock]."
  • "; - $text .= "
  • Move ".$tp->toGlyph('move')."
  • "; + $text .= "
  • Move ".$tp->toGlyph('move')."
  • "; /* $text .= "
  • Delete
  • "; diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 50c685496..df3535891 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -382,12 +382,14 @@ if ($forum->checkPerm($thread->threadInfo['thread_forum_id'], 'post') && $thread $tVars->QUICKREPLY = "
    $thread->threadId)) . "' method='post'> - -
    - - - +
    +
    +
    + + +
    + "; // Preview should be reserved for the full 'Post reply' page.   diff --git a/e107_plugins/forum/languages/English/English_front.php b/e107_plugins/forum/languages/English/English_front.php index ad10b87b1..143715f4f 100644 --- a/e107_plugins/forum/languages/English/English_front.php +++ b/e107_plugins/forum/languages/English/English_front.php @@ -277,7 +277,10 @@ define("LAN_FORUM_4012", "Unstick thread"); // LAN_398 define("LAN_FORUM_4013", "Lock thread"); // LAN_399 define("LAN_FORUM_4014", "Unlock thread"); // LAN_400 - +define("LAN_FORUM_CLOSE", "Thread closed."); +define("LAN_FORUM_OPEN", "Thread reopened."); +define("LAN_FORUM_STICK", "Thread made sticky."); +define("LAN_FORUM_UNSTICK", "Thread unstuck."); /* THIS WILL BE DELETED ONCE THE REWRITE IS DONE diff --git a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php index 348865505..9076819a3 100644 --- a/e107_plugins/forum/shortcodes/batch/post_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/post_shortcodes.php @@ -88,7 +88,7 @@ class plugin_forum_post_shortcodes extends e_shortcode $rows = (e107::wysiwyg()==true) ? 15 : 10; - $ret = "\n
    \n"; + $ret = "\n
    \n"; // if(!e_WYSIWYG) { // $ret .= display_help('helpb', 'forum'); diff --git a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php index 9d6b62bef..084e15276 100644 --- a/e107_plugins/forum/shortcodes/batch/view_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/view_shortcodes.php @@ -428,7 +428,7 @@ class plugin_forum_view_shortcodes extends e_shortcode $ue = $tp->parseTemplate("{USER_EXTENDED=location.text_value}",true); $username = $this->postInfo['user_name']; - $text = '
    + $text = '
    '.$username.' -