diff --git a/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.models.ini b/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.models.ini index 8e98d40a76..4db3c583f8 100644 --- a/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.models.ini +++ b/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.models.ini @@ -93,6 +93,8 @@ COM_KUNENA_SHOW_USERLIST_COUNTUNSERS_ACTIVATED_ACCOUNT="All Real Users" COM_KUNENA_SHOW_USERLIST_COUNTUNSERS_ACTIVE="Only Active Users" COM_KUNENA_SHOW_USERLIST_COUNTUNSERS_ALL="All Users" COM_KUNENA_SHOW_USERLIST_COUNTUNSERS_NON_BLOCKED_USERS="Show only non-blocked users" +COM_KUNENA_CFG_OPTION_UNAPPROVED_POSTS="Unapproved Posts" +COM_KUNENA_CFG_OPTION_ALL_NEW_POSTS="All New Posts" ; JROOT/administrator/components/com_kunena/models/cpanel.php diff --git a/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.views.ini b/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.views.ini index 4db46169e5..9c4fd697e6 100644 --- a/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.views.ini +++ b/administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.views.ini @@ -199,14 +199,14 @@ COM_KUNENA_A_LATESTCATEGORY_IN="Category Filter in Recent Topics" COM_KUNENA_A_LATESTCATEGORY_IN_DESC="Choose if you want show or hide following categories in recent topics." COM_KUNENA_A_LENGTHS="Length Settings" COM_KUNENA_A_LOOKS="Look and Feel" -COM_KUNENA_A_MAIL_ADMIN="E-mail Administrators" -COM_KUNENA_A_MAIL_ADMIN_DESC="Set to Yes if you want e-mail notifications on each new post sent to the enabled system administrator(s)." +COM_KUNENA_A_MAILADMIN="E-mail Administrators" +COM_KUNENA_A_MAILADMIN_DESC="Set to Unapproved Posts or All New Posts if you want e-mail notifications on new new posts sent to the Kunena administrators." COM_KUNENA_A_MESSAGES="Messages Per Page" COM_KUNENA_A_MESSAGES_DESC="Number of messages per page to show" COM_KUNENA_A_MESSAGES_DESC_SEARCH="Messages per page for search results" COM_KUNENA_A_MESSAGES_SEARCH="Search Results" -COM_KUNENA_A_MODERATION="E-mail Moderators" -COM_KUNENA_A_MODERATION_DESC="Set to Yes if you want e-mail notifications on new posts sent to the category moderator(s). Note: Although every Administrator has automatically all Moderator privileges, assign them explicitly as moderators on the category to receive e-mails too." +COM_KUNENA_A_MAILMOD="E-mail Moderators" +COM_KUNENA_A_MAILMOD_DESC="Set to Unapproved Posts or All New Posts if you want e-mail notifications on new posts sent to the category moderators. Note: Global moderators and administrators do not get e-mail notifications with this option unless you explicitly assign them as moderators on the category." COM_KUNENA_A_PESONNALTEXT="Max. Personal Text Length" COM_KUNENA_A_PESONNALTEXT_DESC="Maximum number of characters allowed for the personal text in user profile." COM_KUNENA_A_POLL_ALLOW_ONE_VOTE="Single Vote Only" diff --git a/administrator/components/com_kunena/libraries/forum/message/message.php b/administrator/components/com_kunena/libraries/forum/message/message.php index 8ce48b3bde..76cf15d3cf 100644 --- a/administrator/components/com_kunena/libraries/forum/message/message.php +++ b/administrator/components/com_kunena/libraries/forum/message/message.php @@ -142,12 +142,12 @@ public function sendNotification($url=null) { return; } elseif ($this->hold == 1) { $mailsubs = 0; - $mailmods = (bool) $config->mailmod; - $mailadmins = (bool) $config->mailadmin; + $mailmods = $config->mailmod >= 0; + $mailadmins = $config->mailadmin >= 0; } else { $mailsubs = (bool) $config->allowsubscriptions; - $mailmods = 0; - $mailadmins = 0; + $mailmods = $config->mailmod >= 1; + $mailadmins = $config->mailadmin >= 1; } $once = false; diff --git a/administrator/components/com_kunena/models/config.php b/administrator/components/com_kunena/models/config.php index 9d87f7e20d..f3dde84e38 100644 --- a/administrator/components/com_kunena/models/config.php +++ b/administrator/components/com_kunena/models/config.php @@ -141,8 +141,6 @@ function getConfiglists() { $lists ['allowsubscriptions'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_allowsubscriptions', 'class="inputbox" size="1"', 'value', 'text', $this->config->allowsubscriptions ); $lists ['subscriptionschecked'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_subscriptionschecked', 'class="inputbox" size="1"', 'value', 'text', $this->config->subscriptionschecked ); $lists ['allowfavorites'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_allowfavorites', 'class="inputbox" size="1"', 'value', 'text', $this->config->allowfavorites ); - $lists ['mailmod'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_mailmod', 'class="inputbox" size="1"', 'value', 'text', $this->config->mailmod ); - $lists ['mailadmin'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_mailadmin', 'class="inputbox" size="1"', 'value', 'text', $this->config->mailadmin ); $lists ['showemail'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_showemail', 'class="inputbox" size="1"', 'value', 'text', $this->config->showemail ); $lists ['askemail'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_askemail', 'class="inputbox" size="1"', 'value', 'text', $this->config->askemail ); $lists ['changename'] = JHTML::_ ( 'select.genericlist', $yesno, 'cfg_changename', 'class="inputbox" size="1"', 'value', 'text', $this->config->changename ); @@ -316,7 +314,7 @@ function getConfiglists() { $recaptcha_theme[] = JHTML::_('select.option', 'clean', JText::_('COM_KUNENA_A_RECAPTCHA_THEME_OPTION_CLEAN')); $lists ['recaptcha_theme'] = JHTML::_ ( 'select.genericlist', $recaptcha_theme, 'cfg_recaptcha_theme', 'class="inputbox" size="1"', 'value', 'text', $this->config->recaptcha_theme ); - // Kunena 2.0.0 + // Added new options into Kunena 2.0.0 $lists ['keywords'] = JHTML::_('select.genericlist', $yesno, 'cfg_keywords', 'class="inputbox" size="1"', 'value', 'text', $this->config->keywords); $lists ['userkeywords'] = JHTML::_('select.genericlist', $yesno, 'cfg_userkeywords', 'class="inputbox" size="1"', 'value', 'text', $this->config->userkeywords); @@ -373,6 +371,15 @@ function getConfiglists() { $lists ['cache'] = JHTML::_('select.genericlist', $yesno, 'cfg_cache', 'class="inputbox" size="1"', 'value', 'text', $this->config->cache); $lists ['cache_time'] = JHTML::_('select.genericlist', $cachetime, 'cfg_cache_time', 'class="inputbox" size="1"', 'value', 'text', $this->config->cache_time); + // Added new options into Kunena 2.0.1 + $mailoptions = array(); + $mailoptions[] = JHTML::_('select.option', '-1', JText::_('COM_KUNENA_NO')); + $mailoptions[] = JHTML::_('select.option', '0', JText::_('COM_KUNENA_CFG_OPTION_UNAPPROVED_POSTS')); + $mailoptions[] = JHTML::_('select.option', '1', JText::_('COM_KUNENA_CFG_OPTION_ALL_NEW_POSTS')); + + $lists ['mailmod'] = JHTML::_ ( 'select.genericlist', $mailoptions, 'cfg_mailmod', 'class="inputbox" size="1"', 'value', 'text', $this->config->mailmod ); + $lists ['mailadmin'] = JHTML::_ ( 'select.genericlist', $mailoptions, 'cfg_mailadmin', 'class="inputbox" size="1"', 'value', 'text', $this->config->mailadmin ); + return $lists; } } diff --git a/administrator/components/com_kunena/views/config/tmpl/default.php b/administrator/components/com_kunena/views/config/tmpl/default.php index dd278b4338..9aea737bc3 100644 --- a/administrator/components/com_kunena/views/config/tmpl/default.php +++ b/administrator/components/com_kunena/views/config/tmpl/default.php @@ -517,14 +517,14 @@ - + lists ['mailmod'] ?> - + - + lists ['mailadmin'] ?> - +