diff --git a/library/language/source/main.php b/library/language/source/main.php index 2695b8822..6a460e979 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -1879,6 +1879,7 @@ $lang['POST_PIN'] = 'Pin first post'; $lang['POST_UNPIN'] = 'Unpin first post'; $lang['POST_PINNED'] = 'First post pinned'; $lang['POST_UNPINNED'] = 'First post unpinned'; +$lang['PIN_MESSAGE'] = 'Pin post'; // Management of my messages $lang['GOTO_MY_MESSAGE'] = 'Close and return to the list "My Messages"'; diff --git a/styles/templates/default/tpl_config.php b/styles/templates/default/tpl_config.php index 7e44a7ebb..7593b6d4e 100644 --- a/styles/templates/default/tpl_config.php +++ b/styles/templates/default/tpl_config.php @@ -134,7 +134,7 @@ if (!empty($page_cfg['load_tpl_vars']) and $vars = array_flip($page_cfg['load_tp $template->assign_vars([ 'CODE_IMG' => $bb_cfg['text_buttons'] ? $lang['CODE_TOPIC_TXTB'] : '' . $lang['CODE_TOPIC_TXTB'] . '', 'QUOTE_IMG' => $bb_cfg['text_buttons'] ? $lang['REPLY_WITH_QUOTE_TXTB'] : '' . $lang['REPLY_WITH_QUOTE_TXTB'] . '', - 'PIN_IMG' => $bb_cfg['text_buttons'] ? $lang['PIN_POST_TXTB'] : '' . $lang['PIN_POST_TXTB'] . '', + 'PIN_IMG' => $bb_cfg['text_buttons'] ? $lang['PIN_POST_TXTB'] : '' . $lang['PIN_POST_TXTB'] . '', 'EDIT_POST_IMG' => $bb_cfg['text_buttons'] ? $lang['EDIT_DELETE_POST_TXTB'] : '' . $lang['EDIT_DELETE_POST_TXTB'] . '', 'DELETE_POST_IMG' => $bb_cfg['text_buttons'] ? $lang['DELETE_POST_TXTB'] : '' . $lang['DELETE_POST_TXTB'] . '', 'IP_POST_IMG' => $bb_cfg['text_buttons'] ? $lang['VIEW_IP_TXTB'] : '' . $lang['VIEW_IP_TXTB'] . '', diff --git a/viewtopic.php b/viewtopic.php index a049679f1..cf4d54bdf 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -604,7 +604,7 @@ for ($i = 0; $i < $total_posts; $i++) { if (!$poster_bot) { $quote_btn = ($is_auth['auth_reply'] && !$locked); $edit_btn = (($userdata['user_id'] == $poster_id && $is_auth['auth_edit']) || $is_auth['auth_mod']); - $pin_btn = (($userdata['user_id'] == $poster_id) || $is_auth['auth_mod']); + $pin_btn = ($post_id != $t_data['topic_first_post_id']) && (($userdata['user_id'] == $poster_id) || $is_auth['auth_mod']); $ip_btn = ($is_auth['auth_mod'] || IS_MOD); } $delpost_btn = ($post_id != $t_data['topic_first_post_id'] && ($is_auth['auth_mod'] || ($userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $t_data['topic_last_post_id'] == $post_id && $postrow[$i]['post_time'] + 3600 * 3 > TIMENOW)));