diff options
| author | 2020-03-09 20:36:24 +0100 | |
|---|---|---|
| committer | 2020-03-09 20:36:24 +0100 | |
| commit | 942103092545e0bd90802cccd4eab303ef172158 (patch) | |
| tree | 1ed52d84ca5be2e32312c6251e6385987d89e223 | |
| parent | 51edbc1578fe49b281b39d91451d2b9df0092028 (diff) | |
Option to show/hide favicons (#2821)
* Option to show/hide favicons
#fix https://github.com/FreshRSS/FreshRSS/issues/2819
* Also for subscription list
| -rw-r--r-- | app/layout/aside_feed.phtml | 3 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 4 | ||||
| -rw-r--r-- | app/views/index/global.phtml | 2 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 3 | ||||
| -rw-r--r-- | app/views/subscription/index.phtml | 3 | ||||
| -rw-r--r-- | config-user.default.php | 1 |
6 files changed, 11 insertions, 5 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index cdc8b8e16..4c01b4694 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -94,7 +94,8 @@ <a class="dropdown-toggle" data-fweb="<?= $feed->website() ?>"><?= _i('configure') ?></a> <?php /* feed_config_template */ ?> </div> - <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'f_' . $feed->id()) ?>"><?= $feed->name() ?></a> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> + <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'f_' . $feed->id()) ?>"><?= $feed->name() ?></a> </li> <?php } ?> </ul> diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 2bc51e54c..3b8aafbb2 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -27,7 +27,9 @@ ?></li><?php } } - ?><li class="item website"><a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>"><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" /> <span><?= $this->feed->name() ?></span></a></li> + ?><li class="item website"><a href="<?= _url('index', 'index', 'get', 'f_' . $this->feed->id()) ?>"> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $this->feed->favicon() ?>" alt="✇" /><?php endif; ?> + <span><?= $this->feed->name() ?></span></a></li> <li class="item title" dir="auto"><a target="_blank" rel="noreferrer" href="<?= $this->entry->link() ?>"><?= $this->entry->title() ?><?php if ($topline_display_authors): ?><span class="author"><?php diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index a49e16525..e173b1b59 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -38,7 +38,7 @@ $url_base['params']['get'] = 'f_' . $feed->id(); ?> <li id="f_<?= $feed->id() ?>" class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>" data-unread="<?= $feed->nbNotRead() ?>" data-priority="<?= $feed->priority() ?>"> - <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> <a class="item-title" data-unread="<?= format_number($feed->nbNotRead()) ?>" href="<?= Minz_Url::display($url_base) ?>"><?= $feed->name() ?></a> </li> <?php } ?> diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index ee9e19327..c982c1132 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -48,7 +48,8 @@ $content_width = FreshRSS_Context::$user_conf->content_width; <?= _i($item->isFavorite() ? 'starred' : 'non-starred') ?> </a> <a class="website" href="<?= _url('index', 'reader', 'get', 'f_' . $feed->id()) ?>"> - <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> <span><?= $feed->name() ?></span> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> + <span><?= $feed->name() ?></span> </a> <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?= $item->link() ?>"><?= $item->title() ?></a></h1> diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index da7593a8d..736a582d2 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -98,7 +98,8 @@ data-feed-id="<?= $feed->id() ?>" dropzone="move"> <a class="configure open-slider" href="<?= _url('subscription', 'feed', 'id', $feed->id()) ?>"><?= _i('configure') ?></a> - <img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /> <?= $feed->name() ?> + <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" /><?php endif; ?> + <?= $feed->name() ?> </li> <?php } } else { diff --git a/config-user.default.php b/config-user.default.php index a814fe7c7..c517740da 100644 --- a/config-user.default.php +++ b/config-user.default.php @@ -76,6 +76,7 @@ return array ( 'reading_view' => '3', 'rss_view' => '4', ), + 'show_favicons' => true, 'topline_read' => true, 'topline_favorite' => true, 'topline_display_authors' => false, |
