mirror of
https://github.com/openvk/openvk
synced 2024-11-14 19:19:14 +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",
|
"groups",
|
||||||
"news",
|
"news",
|
||||||
"links",
|
"links",
|
||||||
|
"poster",
|
||||||
],
|
],
|
||||||
])->get($id);
|
])->get($id);
|
||||||
}
|
}
|
||||||
|
@ -774,6 +775,7 @@ class User extends RowModel
|
||||||
"groups",
|
"groups",
|
||||||
"news",
|
"news",
|
||||||
"links",
|
"links",
|
||||||
|
"poster",
|
||||||
],
|
],
|
||||||
])->set($id, (int) $status)->toInteger();
|
])->set($id, (int) $status)->toInteger();
|
||||||
|
|
||||||
|
|
|
@ -377,6 +377,7 @@ final class UserPresenter extends OpenVKPresenter
|
||||||
"menu_grupoj" => "groups",
|
"menu_grupoj" => "groups",
|
||||||
"menu_novajoj" => "news",
|
"menu_novajoj" => "news",
|
||||||
"menu_ligiloj" => "links",
|
"menu_ligiloj" => "links",
|
||||||
|
"menu_standardo" => "poster",
|
||||||
];
|
];
|
||||||
foreach($settings as $checkbox => $setting)
|
foreach($settings as $checkbox => $setting)
|
||||||
$user->setLeftMenuItemStatus($setting, $this->checkbox($checkbox));
|
$user->setLeftMenuItemStatus($setting, $this->checkbox($checkbox));
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<a
|
<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']}" >
|
href="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['link']}" >
|
||||||
<img
|
<img
|
||||||
src="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['src']}"
|
src="{php echo OPENVK_ROOT_CONF['openvk']['preferences']['adPoster']['src']}"
|
||||||
|
|
|
@ -552,6 +552,16 @@
|
||||||
<td>
|
<td>
|
||||||
<span class="nobold">{_additional_links}</span>
|
<span class="nobold">{_additional_links}</span>
|
||||||
</td>
|
</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>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -412,6 +412,7 @@
|
||||||
"ui_settings_rating_hide" = "Hide";
|
"ui_settings_rating_hide" = "Hide";
|
||||||
|
|
||||||
"additional_links" = "Additional links";
|
"additional_links" = "Additional links";
|
||||||
|
"ad_poster" = "Ad poster";
|
||||||
|
|
||||||
/* Two-factor authentication */
|
/* Two-factor authentication */
|
||||||
|
|
||||||
|
|
|
@ -432,6 +432,7 @@
|
||||||
"ui_settings_rating_hide" = "Скрывать";
|
"ui_settings_rating_hide" = "Скрывать";
|
||||||
|
|
||||||
"additional_links" = "Дополнительные ссылки";
|
"additional_links" = "Дополнительные ссылки";
|
||||||
|
"ad_poster" = "Рекламный плакат";
|
||||||
|
|
||||||
/* Two-factor authentication */
|
/* Two-factor authentication */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue