This commit is contained in:
Roman Kelesidis 2024-07-13 20:03:30 +07:00
parent c6bf479fd4
commit 14216ce16d
3 changed files with 8 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class user_common
*/
var $opt_js = array(
'only_new' => 0, // show ony new posts or topics
'h_from' => 0, // hide from (country)
'h_av' => 0, // hide avatar
'h_rnk_i' => 0, // hide rank images
'h_post_i' => 0, // hide post images

View File

@ -1,5 +1,6 @@
<!-- IF LOGGED_IN -->
<style type="text/css">
<!-- IF HIDE_FROM -->.from { display: none; }<!-- ENDIF -->
<!-- IF HIDE_AVATAR -->.avatar { display: none; }<!-- ENDIF -->
<!-- IF HIDE_RANK_IMG -->.rank_img { display: none; }<!-- ENDIF -->
<!-- IF HIDE_POST_IMG -->img.postImg, div.postImg-wrap { display: none; }<!-- ENDIF -->
@ -282,6 +283,11 @@ function build_poll_add_form (src_el)
<fieldset id="show-only">
<legend>{L_HIDE_IN_TOPIC}</legend>
<div class="med pad_4">
<label>
<input type="checkbox" <!-- IF HIDE_FROM -->{CHECKED}<!-- ENDIF -->
onclick="user.set('h_from', this.checked ? 1 : 0);"
/>{L_LOCATION}
</label>
<label>
<input type="checkbox" <!-- IF HIDE_AVATAR -->{CHECKED}<!-- ENDIF -->
onclick="user.set('h_av', this.checked ? 1 : 0);"

View File

@ -564,6 +564,7 @@ $template->assign_vars(array(
'SHOW_BOT_NICK' => $bb_cfg['show_bot_nick'],
'T_POST_REPLY' => $reply_alt,
'HIDE_FROM' => $user->opt_js['h_from'],
'HIDE_AVATAR' => $user->opt_js['h_av'],
'HIDE_RANK_IMG' => ($user->opt_js['h_rnk_i'] && $bb_cfg['show_rank_image']),
'HIDE_POST_IMG' => $user->opt_js['h_post_i'],