mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:35:13 +00:00
make app display configurable
This commit is contained in:
parent
0e9914b268
commit
ef028d7106
3 changed files with 13 additions and 4 deletions
|
@ -410,10 +410,15 @@ class ThreadItem
|
|||
if (!$locicon) {
|
||||
$locicon = ($item['verb'] === 'Leave') ? '<i class="fa fa-fw fa-sign-out"></i> ' : '';
|
||||
}
|
||||
$author_app = $item['author']['site_project'] ?? '';
|
||||
if (empty($item['app'])) {
|
||||
$item['app'] = $author_app;
|
||||
|
||||
if (PConfig::Get($conv->get_profile_owner(), 'system','show_author_app', false)) {
|
||||
$author_app = $item['author']['site_project'] ?? '';
|
||||
if (empty($item['app'])) {
|
||||
$item['app'] = $author_app;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$isContained = $thread_level === 1 && str_contains($item['tgt_type'],'Collection');
|
||||
|
||||
$tmp_item = [
|
||||
|
|
|
@ -44,7 +44,7 @@ class Display
|
|||
$channel_divmore_height = ((x($_POST, 'channel_divmore_height')) ? intval($_POST['channel_divmore_height']) : 400);
|
||||
$stream_divmore_height = ((x($_POST, 'stream_divmore_height')) ? intval($_POST['stream_divmore_height']) : 400);
|
||||
$item_scroll = ((x($_POST, 'item_scroll')) ? intval($_POST['item_scroll']) : 0);
|
||||
|
||||
$show_author_app = ((x($_POST, 'show_author_app')) ? intval($_POST['show_author_app']) : 0);
|
||||
|
||||
$browser_update = ((x($_POST, 'browser_update')) ? intval($_POST['browser_update']) : 0);
|
||||
$browser_update = $browser_update * 1000;
|
||||
|
@ -76,6 +76,7 @@ class Display
|
|||
set_pconfig(local_channel(), 'system', 'thread_indent_px', $indentpx);
|
||||
set_pconfig(local_channel(), 'system', 'chanview_redirect', $chanview_redirect);
|
||||
set_pconfig(local_channel(), 'system', 'filter_menu_open', $filter_menu_open);
|
||||
set_pconfig(local_channel(), 'system', 'show_author_app', $show_author_app);
|
||||
|
||||
$newschema = '';
|
||||
if ($theme) {
|
||||
|
@ -225,6 +226,7 @@ class Display
|
|||
'$theme_config' => $theme_config,
|
||||
'$chanview_redirect' => [ 'chanview_redirect', t('Redirect automatically to profiles of my connections'), get_pconfig(local_channel(), 'system', 'chanview_redirect'), '' , $yes_no ],
|
||||
'$expert' => Features::enabled(local_channel(), 'advanced_theming'),
|
||||
'$show_author_app' => ['show_author_app', t('Show author app/project name'), get_pconfig(local_channel(), 'system','show_author_app'), '', $yes_no ],
|
||||
'$channel_divmore_height' => ['channel_divmore_height', t('Channel page max height of content (in pixels)'), get_pconfig(local_channel(), 'system', 'channel_divmore_height', 400), t('click to expand content exceeding this height, or 0 to display full height')],
|
||||
'$stream_divmore_height' => ['stream_divmore_height', t('Stream page max height of content (in pixels)'), get_pconfig(local_channel(), 'system', 'stream_divmore_height', 400), t('click to expand content exceeding this height, or 0 to display full height')],
|
||||
'$item_scroll' => ['item_scroll', t('Add scrollbars for long content'), get_pconfig(local_channel(), 'system', 'item_scroll'), '', $yes_no ],
|
||||
|
|
|
@ -70,6 +70,8 @@
|
|||
{{include file="field_checkbox.tpl" field=$user_scalable}}
|
||||
{{include file="field_checkbox.tpl" field=$preload_images}}
|
||||
{{include file="field_checkbox.tpl" field=$chanview_redirect}}
|
||||
{{include file="field_checkbox.tpl" field=$show_author_app}}
|
||||
|
||||
{{if $expert}}
|
||||
<div class="form-group">
|
||||
<a class="btn btn-outline-secondary" href="pdledit">{{$layout_editor}}</a>
|
||||
|
|
Loading…
Reference in a new issue