mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Global: Add user option to hide ad poster
This commit is contained in:
parent
1b1c88dd96
commit
3edf34e0ea
6 changed files with 23 additions and 8 deletions
|
@ -354,6 +354,7 @@ class User extends RowModel
|
|||
"groups",
|
||||
"news",
|
||||
"links",
|
||||
"poster",
|
||||
],
|
||||
])->get($id);
|
||||
}
|
||||
|
@ -774,6 +775,7 @@ class User extends RowModel
|
|||
"groups",
|
||||
"news",
|
||||
"links",
|
||||
"poster",
|
||||
],
|
||||
])->set($id, (int) $status)->toInteger();
|
||||
|
||||
|
|
|
@ -370,13 +370,14 @@ final class UserPresenter extends OpenVKPresenter
|
|||
$user->setNsfwTolerance((int) $this->postParam("nsfw"));
|
||||
} else if($_GET['act'] === "lMenu") {
|
||||
$settings = [
|
||||
"menu_bildoj" => "photos",
|
||||
"menu_filmetoj" => "videos",
|
||||
"menu_mesagoj" => "messages",
|
||||
"menu_notatoj" => "notes",
|
||||
"menu_grupoj" => "groups",
|
||||
"menu_novajoj" => "news",
|
||||
"menu_ligiloj" => "links",
|
||||
"menu_bildoj" => "photos",
|
||||
"menu_filmetoj" => "videos",
|
||||
"menu_mesagoj" => "messages",
|
||||
"menu_notatoj" => "notes",
|
||||
"menu_grupoj" => "groups",
|
||||
"menu_novajoj" => "news",
|
||||
"menu_ligiloj" => "links",
|
||||
"menu_standardo" => "poster",
|
||||
];
|
||||
foreach($settings as $checkbox => $setting)
|
||||
$user->setLeftMenuItemStatus($setting, $this->checkbox($checkbox));
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
|
||||
</div>
|
||||
<a
|
||||
n:if="OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['enable']"
|
||||
n:if="OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['enable'] && $thisUser->getLeftMenuItemStatus('poster')"
|
||||
href="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['link']}" >
|
||||
<img
|
||||
src="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['src']}"
|
||||
|
|
|
@ -552,6 +552,16 @@
|
|||
<td>
|
||||
<span class="nobold">{_additional_links}</span>
|
||||
</td>
|
||||
</tr><tr n:if="OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['enable']">
|
||||
<td width="120" valign="top" align="right" align="right">
|
||||
<input
|
||||
n:attr="checked => $user->getLeftMenuItemStatus('poster')"
|
||||
type="checkbox"
|
||||
name="menu_standardo" />
|
||||
</td>
|
||||
<td>
|
||||
<span class="nobold">{_ad_poster}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
|
|
|
@ -412,6 +412,7 @@
|
|||
"ui_settings_rating_hide" = "Hide";
|
||||
|
||||
"additional_links" = "Additional links";
|
||||
"ad_poster" = "Ad poster";
|
||||
|
||||
/* Two-factor authentication */
|
||||
|
||||
|
|
|
@ -432,6 +432,7 @@
|
|||
"ui_settings_rating_hide" = "Скрывать";
|
||||
|
||||
"additional_links" = "Дополнительные ссылки";
|
||||
"ad_poster" = "Рекламный плакат";
|
||||
|
||||
/* Two-factor authentication */
|
||||
|
||||
|
|
Loading…
Reference in a new issue