diff --git a/e107_plugins/forum/forum.php b/e107_plugins/forum/forum.php index 82159faa8..6013f0fc3 100644 --- a/e107_plugins/forum/forum.php +++ b/e107_plugins/forum/forum.php @@ -653,6 +653,9 @@ function forum_track() global $forum; $trackPref = $forum->prefs->get('track'); + $trackEmailPref = $forum->prefs->get('trackemail',true); + + if(empty($trackPref)) { echo "Disabled"; @@ -691,6 +694,9 @@ function forum_track() $sql = e107::getDb(); $tp = e107::getParser(); + $trackDiz = ($trackEmailPref) ? LAN_FORUM_3040 : LAN_FORUM_3041; + + if($trackedThreadList = $forum->getTrackedThreadList(USERID, 'list')) { @@ -723,7 +729,7 @@ function forum_track() // $data['UNTRACK'] = "".LAN_FORUM_0070.""; - $data['UNTRACK'] = "".IMAGE_track.""; + $data['UNTRACK'] = "".IMAGE_track.""; $forum_trackstring .= $tp->simpleParse($FORUM_TRACK_MAIN, $data); } diff --git a/e107_plugins/forum/forum_admin.php b/e107_plugins/forum/forum_admin.php index 3cb23329d..fe9f4e701 100644 --- a/e107_plugins/forum/forum_admin.php +++ b/e107_plugins/forum/forum_admin.php @@ -171,14 +171,15 @@ if(!deftrue('OLD_FORUMADMIN')) protected $prefs = array( 'enclose' => array('title'=> FORLAN_44, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_45), - 'title' => array('title'=> FORLAN_65, 'type'=>'text', 'data' => 'str','help'=>'Help Text goes here'), + 'title' => array('title'=> FORLAN_65, 'type'=>'text', 'data' => 'str','help'=>''), 'notify' => array('title'=> FORLAN_47, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_48), 'notify_on' => array('title'=> FORLAN_177, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_178), 'poll' => array('title'=> FORLAN_49, 'type'=>'userclass', 'data' => 'int','help'=>FORLAN_50), 'attach' => array('title'=> FORLAN_70, 'type'=>'boolean', 'data' => 'str','help'=>FORLAN_71), 'maxwidth' => array('title'=> FORLAN_134, 'type'=>'number', 'data' => 'str','help'=>FORLAN_135), 'linkimg' => array('title'=> FORLAN_136, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_137), - 'track' => array('title'=> FORLAN_51, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_52), + 'track' => array('title'=> FORLAN_200, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_201), + 'trackemail' => array('title'=> FORLAN_202, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_203), 'redirect' => array('title'=> FORLAN_112, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_113), 'reported_post_email' => array('title'=> FORLAN_116, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_122), 'tooltip' => array('title'=> FORLAN_126, 'type'=>'boolean', 'data' => 'int','help'=>FORLAN_127), diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index 1e516cddc..85a7bd00a 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -327,6 +327,8 @@ class e107forum exit; } + $trackByEmail = ($this->prefs->get('trackemail',true)) ? true : false; + $sql = e107::getDb(); if($sql->select('forum_track', '*', "track_userid=".USERID." AND track_thread=".$threadID)) @@ -334,7 +336,7 @@ class e107forum if($this->track('del', USERID, $threadID)) { $ret['html'] = IMAGE_untrack; - $ret['msg'] = LAN_FORUM_8004; // "Email notifications for this topic are now turned off. "; + $ret['msg'] = ($trackByEmail) ? LAN_FORUM_8004 : LAN_FORUM_8006 ; // "Email notifications for this topic are now turned off. "; $ret['status'] = 'info'; } else @@ -348,7 +350,7 @@ class e107forum { if($this->track('add', USERID, $threadID)) { - $ret['msg'] = LAN_FORUM_8003; // "Email notifications for this topic are now turned on. "; + $ret['msg'] = ($trackByEmail) ? LAN_FORUM_8003 : LAN_FORUM_8005; // "Email notifications for this topic are now turned on. "; $ret['html'] = IMAGE_track; $ret['status'] = 'ok'; } @@ -1646,8 +1648,9 @@ class e107forum $tp = e107::getParser(); $trackingPref = $this->prefs->get('track'); + $trackingEmailPref = $this->prefs->get('trackemail',true); - if(empty($trackingPref)) + if(empty($trackingPref) || empty($trackingEmailPref)) { return false; } diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 8692fc98a..7ab06061d 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -305,7 +305,10 @@ if ($forum->prefs->get('track') && USER) ";*/ - $tVars->TRACK = "".$img." + + $trackDiz = ($forum->prefs->get('trackemail',true)) ? LAN_FORUM_3040 : LAN_FORUM_3041; + + $tVars->TRACK = "".$img." "; } diff --git a/e107_plugins/forum/languages/English/English_admin.php b/e107_plugins/forum/languages/English/English_admin.php index c84146a51..62365283b 100644 --- a/e107_plugins/forum/languages/English/English_admin.php +++ b/e107_plugins/forum/languages/English/English_admin.php @@ -213,4 +213,11 @@ define("FORLAN_186", "Threads per page"); define("FORLAN_187", "Number of threads displayed per page"); // define("FORLAN_188", "Latest Posts"); define("FORLAN_189", "Click the 'delete' button to delete the report.

Click the 'view' button to view the topic/thread"); + +define("FORLAN_200", "Topic tracking"); +define("FORLAN_201", "Enable this to allow your users to track topics."); +define("FORLAN_202", "Topic tracking email notifications"); +define("FORLAN_203", "Enable this option to allow your users to receive email notifications when others reply to a tracked topic."); + + ?> \ No newline at end of file diff --git a/e107_plugins/forum/languages/English/English_front.php b/e107_plugins/forum/languages/English/English_front.php index a9509a57f..6ab170a8f 100644 --- a/e107_plugins/forum/languages/English/English_front.php +++ b/e107_plugins/forum/languages/English/English_front.php @@ -218,6 +218,7 @@ define("LAN_FORUM_3028", "Add Poll"); // new // poll - partly in e107_plugins/po define("LAN_FORUM_3038", "Normal"); // LAN_1 define("LAN_FORUM_3039", "Deactivate emoticons for this post"); // LAN_FORUMPOST_EMOTES define("LAN_FORUM_3040", "Enable/disable email tracking (email sent when reply is posted)"); // LAN_380 +define("LAN_FORUM_3041", "Enable/disable tracking of this topic"); // missing 41-21 // forum_posted_template @@ -310,7 +311,8 @@ define("LAN_FORUM_8001", "A new post has been made by [x] under the topic [y] at define("LAN_FORUM_8002", "Please click the following link to view the full post ..."); define("LAN_FORUM_8003", "Email notifications for this topic are now turned on."); define("LAN_FORUM_8004", "Email notifications for this topic are now turned off."); - +define("LAN_FORUM_8005", "You are now tracking this topic."); +define("LAN_FORUM_8006", "You are no longer tracking this topic.");