diff --git a/sources/ElkArte/AdminController/ManageRegistration.php b/sources/ElkArte/AdminController/ManageRegistration.php index 3b47759179..6e73f7057a 100644 --- a/sources/ElkArte/AdminController/ManageRegistration.php +++ b/sources/ElkArte/AdminController/ManageRegistration.php @@ -504,10 +504,10 @@ public function action_registerSettings_display() theme()->addInlineJavascript(' function checkCoppa() { - var coppaDisabled = document.getElementById(\'coppaAge\').value == 0; + let coppaDisabled = document.getElementById(\'coppaAge\').value == 0; document.getElementById(\'coppaType\').disabled = coppaDisabled; - var disableContacts = coppaDisabled || document.getElementById(\'coppaType\').options[document.getElementById(\'coppaType\').selectedIndex].value != 1; + let disableContacts = coppaDisabled || document.getElementById(\'coppaType\').options[document.getElementById(\'coppaType\').selectedIndex].value != 1; document.getElementById(\'coppaPost\').disabled = disableContacts; document.getElementById(\'coppaFax\').disabled = disableContacts; document.getElementById(\'coppaPhone\').disabled = disableContacts; diff --git a/sources/ElkArte/Controller/About.php b/sources/ElkArte/Controller/About.php index 053536fa77..81cf447838 100644 --- a/sources/ElkArte/Controller/About.php +++ b/sources/ElkArte/Controller/About.php @@ -181,7 +181,7 @@ public function action_coppa() if (isset($this->_req->query->form)) { - $this->handleContactForm(); + $this->handleContactForm($member); } else { @@ -190,14 +190,14 @@ public function action_coppa() } /** - * Handle the contact form for the forum. + * Handle the contact form for member registration. * - * This method allows for the viewing or downloading of the COPPA form. - * Accessed by action=about;sa=coppa;form;dl;member= and action=about;sa=coppa;form;member= + * This method sets the necessary variables in the global $context for displaying the contact form. + * If the query parameter `dl` is set, the method outputs a file for download, otherwise it shows the contact form template. * - * @return void + * @param array $member The member data from getBasicMemberData()) */ - private function handleContactForm() + private function handleContactForm($member) { global $context, $modSettings, $txt; diff --git a/sources/ElkArte/Controller/Poll.php b/sources/ElkArte/Controller/Poll.php index 9dcb1e6493..c24c7e8395 100644 --- a/sources/ElkArte/Controller/Poll.php +++ b/sources/ElkArte/Controller/Poll.php @@ -130,8 +130,10 @@ public function action_vote() if (!empty($row['change_vote']) && $this->user->is_guest === false && empty($this->_req->post->options)) { checkSession('request'); + // Find out what they voted for before. $pollOptions = determineVote($this->user->id, $row['id_poll']); + // Just skip it if they had voted for nothing before. if (!empty($pollOptions)) { diff --git a/sources/ElkArte/Languages/ManageThemes/English.php b/sources/ElkArte/Languages/ManageThemes/English.php index b6b5f76816..8106728d56 100644 --- a/sources/ElkArte/Languages/ManageThemes/English.php +++ b/sources/ElkArte/Languages/ManageThemes/English.php @@ -76,6 +76,7 @@ $txt['show_group_key'] = 'Show group key on board index.'; $txt['additional_options_collapsible'] = 'Enable collapsible additional post options.'; +$txt['show_keyinfo_above'] = 'Show key information (Reply#, Date) above post.'; $txt['who_display_viewing'] = 'Show who is viewing the board index and posts:'; $txt['who_display_viewing_off'] = 'Don\'t show'; $txt['who_display_viewing_numbers'] = 'Show only numbers'; @@ -136,6 +137,8 @@ $txt['themeadmin_themelist_link'] = 'Show the list of installed themes'; // Strings for the variants -$txt['variant_light'] = 'ElkArte Light'; -$txt['variant_besocial'] = 'ElkArte Be Social!'; -$txt['variant_dark'] = 'ElkArte Darktanion'; +$txt['variant_light'] = 'Fern Green'; +$txt['variant_besocial'] = 'Be-Social!'; +$txt['variant_dark'] = 'Darktanion'; +$txt['variant_blue'] = 'Manic Blue'; +$txt['variant_gold'] = 'Harvest Gold'; diff --git a/sources/ElkArte/Mentions/MentionType/Event/Watchedboard.php b/sources/ElkArte/Mentions/MentionType/Event/Watchedboard.php new file mode 100644 index 0000000000..5e9eaed3cb --- /dev/null +++ b/sources/ElkArte/Mentions/MentionType/Event/Watchedboard.php @@ -0,0 +1,27 @@ +_getNotificationStrings('', [ + 'subject' => static::$_type, + 'body' => static::$_type, + ], $members, $this->_task); + } + + /** + * We only use the mentions interface to allow on-site mention for new topics on watched boards + * Email and digests are handled in a separate process due to all the complications + */ + public static function isNotAllowed($method) + { + // Don't let watched be allowed to use email, that is handled by PostNotificaions + if (in_array($method, ['email', 'emaildaily', 'emailweekly'])) + { + return true; + } + + return false; + } + + /** + * There is no interface for this, its always available as an on-site mention and members set + * from profile options notifications + * + * @return true + */ + public static function hasHiddenInterface() + { + return true; + } + + /** + * Only called when hasHiddenInterface is true. Returns the application settings as if + * they had been selected in the ACP notifications area + * + * @return array Returns an array containing the settings. + */ + public static function getSettings() + { + return ['enable' => 1, 'notification' => 1, 'default' => [0 => 'notification']]; + } +} diff --git a/sources/ElkArte/MetadataIntegrate.php b/sources/ElkArte/MetadataIntegrate.php index 896e312a2c..211dbda1bb 100644 --- a/sources/ElkArte/MetadataIntegrate.php +++ b/sources/ElkArte/MetadataIntegrate.php @@ -482,6 +482,11 @@ public function getLikeCount() global $context; $total = 0; + if (empty($context['likes'])) + { + return $total; + } + foreach($context['likes'] as $item) { $total += $item['count']; } diff --git a/sources/subs/Poll.subs.php b/sources/subs/Poll.subs.php index dc0e890587..277aeda88f 100644 --- a/sources/subs/Poll.subs.php +++ b/sources/subs/Poll.subs.php @@ -714,7 +714,7 @@ function increaseGuestVote($id_poll) function determineVote($id_member, $id_poll) { $db = database(); - $pollOptions = array(); + $pollOptions = []; $db->fetchQuery(' SELECT @@ -728,7 +728,10 @@ function determineVote($id_member, $id_poll) ) )->fetch_callback( function ($row) use (&$pollOptions) { - $pollOptions[] = $row[0]; + if (isset($row['id_choice'])) + { + $pollOptions[] = $row['id_choice']; + } } ); diff --git a/themes/default/Admin.template.php b/themes/default/Admin.template.php index 8420be3e6c..c46554431d 100644 --- a/themes/default/Admin.template.php +++ b/themes/default/Admin.template.php @@ -626,11 +626,11 @@ function template_show_settings() { if (empty($config_var['multiple'])) { - $selected = $option[0] === $config_var['value']; + $selected = $option[0] == $config_var['value']; } else { - $selected = in_array($option[0], $config_var['value'], true); + $selected = in_array($option[0], $config_var['value']); } echo ' diff --git a/themes/default/Display.template.php b/themes/default/Display.template.php index 82ddc52a71..f723f89323 100644 --- a/themes/default/Display.template.php +++ b/themes/default/Display.template.php @@ -133,7 +133,7 @@ function template_messages() $ignoring = false; } - // Show the message anchor and a "new" anchor if this message is new. + // Show the message anchor and a "new" separator if this message is the first new. if (($message['id'] != $context['first_message']) && $message['first_new']) { echo ' @@ -141,57 +141,34 @@ function template_messages()
'; } - echo ' -
', $message['id'] != $context['first_message'] ? ' + echo $message['id'] != $context['first_message'] ? ' ' : ''; + echo ' +
'; + + if (!empty($settings['show_keyinfo_above'])) + { + template_keyinfo($message, $ignoring, true); + } + // Showing the sidebar poster area? if (empty($options['hide_poster_area'])) { echo ' -