Hide in topic: Added country hiding (#1535)

* Hide in topic: Added country hiding

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-07-11 00:25:51 +07:00 committed by GitHub
commit 97d42c599d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 0 deletions

View file

@ -14,6 +14,7 @@
- Increased PASSWORD_MAX_LENGTH [\#1510](https://github.com/torrentpier/torrentpier/pull/1510) ([belomaxorka](https://github.com/belomaxorka)) - Increased PASSWORD_MAX_LENGTH [\#1510](https://github.com/torrentpier/torrentpier/pull/1510) ([belomaxorka](https://github.com/belomaxorka))
- Some security improvements 🔑 [\#1503](https://github.com/torrentpier/torrentpier/pull/1503), [\#1505](https://github.com/torrentpier/torrentpier/pull/1505) ([belomaxorka](https://github.com/belomaxorka)) - Some security improvements 🔑 [\#1503](https://github.com/torrentpier/torrentpier/pull/1503), [\#1505](https://github.com/torrentpier/torrentpier/pull/1505) ([belomaxorka](https://github.com/belomaxorka))
- Some improvements for integrity checker [\#1501](https://github.com/torrentpier/torrentpier/pull/1501) ([belomaxorka](https://github.com/belomaxorka)) - Some improvements for integrity checker [\#1501](https://github.com/torrentpier/torrentpier/pull/1501) ([belomaxorka](https://github.com/belomaxorka))
- Hide in topic: Added country hiding [\#1535](https://github.com/torrentpier/torrentpier/pull/1535) ([belomaxorka](https://github.com/belomaxorka))
- Hide vote button in topic for guests [\#1507](https://github.com/torrentpier/torrentpier/pull/1507) ([belomaxorka](https://github.com/belomaxorka)) - Hide vote button in topic for guests [\#1507](https://github.com/torrentpier/torrentpier/pull/1507) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1502](https://github.com/torrentpier/torrentpier/pull/1502), [\#1506](https://github.com/torrentpier/torrentpier/pull/1506), [\#1509](https://github.com/torrentpier/torrentpier/pull/1509), [\#1511](https://github.com/torrentpier/torrentpier/pull/1511), [\#1515](https://github.com/torrentpier/torrentpier/pull/1515), [\#1516](https://github.com/torrentpier/torrentpier/pull/1516), [\#1517](https://github.com/torrentpier/torrentpier/pull/1517), [\#1519](https://github.com/torrentpier/torrentpier/pull/1519), [\#1523](https://github.com/torrentpier/torrentpier/pull/1523), [\#1525](https://github.com/torrentpier/torrentpier/pull/1525), [\#1530](https://github.com/torrentpier/torrentpier/pull/1530), [\#1532](https://github.com/torrentpier/torrentpier/pull/1532) ([belomaxorka](https://github.com/belomaxorka)) - Minor improvements [\#1502](https://github.com/torrentpier/torrentpier/pull/1502), [\#1506](https://github.com/torrentpier/torrentpier/pull/1506), [\#1509](https://github.com/torrentpier/torrentpier/pull/1509), [\#1511](https://github.com/torrentpier/torrentpier/pull/1511), [\#1515](https://github.com/torrentpier/torrentpier/pull/1515), [\#1516](https://github.com/torrentpier/torrentpier/pull/1516), [\#1517](https://github.com/torrentpier/torrentpier/pull/1517), [\#1519](https://github.com/torrentpier/torrentpier/pull/1519), [\#1523](https://github.com/torrentpier/torrentpier/pull/1523), [\#1525](https://github.com/torrentpier/torrentpier/pull/1525), [\#1530](https://github.com/torrentpier/torrentpier/pull/1530), [\#1532](https://github.com/torrentpier/torrentpier/pull/1532) ([belomaxorka](https://github.com/belomaxorka))
- New Crowdin updates [\#1504](https://github.com/torrentpier/torrentpier/pull/1504), [\#1513](https://github.com/torrentpier/torrentpier/pull/1513) ([Exileum](https://github.com/Exileum)) - New Crowdin updates [\#1504](https://github.com/torrentpier/torrentpier/pull/1504), [\#1513](https://github.com/torrentpier/torrentpier/pull/1513) ([Exileum](https://github.com/Exileum))

View file

@ -38,6 +38,7 @@ class User
*/ */
public $opt_js = [ public $opt_js = [
'only_new' => 0, // show ony new posts or topics 'only_new' => 0, // show ony new posts or topics
'h_from' => 0, // hide from
'h_av' => 0, // hide avatar 'h_av' => 0, // hide avatar
'h_rnk_i' => 0, // hide rank images 'h_rnk_i' => 0, // hide rank images
'h_post_i' => 0, // hide post images 'h_post_i' => 0, // hide post images

View file

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

View file

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