Reduce RSS and Atom Feed plugin to the widget

- remove the RSS and Atom buttons in the header template
- Activates the plugin by default and places the widget in the menu column
This commit is contained in:
Fraenkiman 2024-02-17 00:31:24 +01:00
parent d38c9715d2
commit 86cb0930ca
13 changed files with 38 additions and 45 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -27,7 +27,7 @@ $fp_plugins = array(
'commentcenter', // including Akismet interface
'mediamanager',
'datechanger', // Lets you change the publish date for (new) entries.
// 'feed', // Activates the RSS and Atom feed widget, deactivates the feed links in the header in the Leggero theme
'feed', // Activates the RSS and Atom feed widget
'gallerycaptions',
'photoswipe'
);

View File

@ -1,45 +1,36 @@
<?php
$fp_widgets = array (
$fp_widgets = array (
// to disable put // or # before the plugin name
// remove it to enable :)
'top' =>
array (
// (no widgets)
),
// to disable put // or # before the plugin name
// remove it to enable :)
// Left side widgets. Put here blocks which will appear
// on the left side
// (Theme dependant)
'top' => array (
// (no widgets)
),
'left' =>
array (
// (no widgets)
),
// Left side widgets. Put here blocks which will appear
// on the left side
// (Theme dependant)
'left' => array (
// (no widgets)
),
// Right side widgets
'right' =>
array (
'adminarea',
'blockparser:menu',
'categories',
'archives',
//'calendar', // quite time consuming, not really recommended
'lastentries',
// 'lastcomments',
'searchbox',
),
'bottom' =>
array (
// (no widgets)
),
// Right side widgets
'right' => array (
'adminarea',
'blockparser:menu',
'categories',
'archives',
//'calendar', // quite time consuming, not really recommended
'lastentries',
// 'lastcomments',
'searchbox',
'feed'
),
'bottom' => array (
// (no widgets)
),
);
?>

View File

@ -11,10 +11,6 @@
<div id="body-container">
<div id="head">
{if not function_exists('plugin_feed_head')}
<a href="{$smarty.const.BLOG_BASEURL}?x=feed:atom" title="{$lang.main.atom}" target="_blank"><img class="feed" src="{$smarty.const.BLOG_BASEURL}fp-content/images/atom-white.png" alt="atom-feed"></a>
<a href="{$smarty.const.BLOG_BASEURL}?x=feed:rss2" title="{$lang.main.rss}" target="_blank"><img class="feed" src="{$smarty.const.BLOG_BASEURL}fp-content/images/rss-white.png" alt="rss-feed"></a>
{/if}
<h1><a href="{$smarty.const.BLOG_BASEURL}">{$flatpress.title}</a></h1>
<p class="subtitle">{$flatpress.subtitle}</p>
</div> <!-- end of #head -->

View File

@ -0,0 +1,6 @@
## Source:
https://www.kisscc0.com/clipart/atom-rss-logo-web-feed-computer-icons-rss-atom-but-n1kmz1/
## Image License:
✔️ Free for personal and commercial use
✔️ Attribution is not required.

View File

@ -24,7 +24,7 @@ function plugin_feed_widget() {
$lang = lang_load('plugin:feed');
$baseurl = BLOG_BASEURL;
$imgdir = IMAGES_DIR;
$imgdir = plugin_geturl('feed');
$widget ['subject'] = $lang ['plugin'] ['feed'] ['subject'];
@ -32,11 +32,11 @@ function plugin_feed_widget() {
$atom = $lang ['plugin'] ['feed'] ['atom'];
$widget ['content'] = '
<!-- BEOF Feed-Buttons -->
<!-- BOF Feed-Buttons -->
<ul>
<li>
<a href="' . $baseurl . '?x=feed:rss2" title="' . $rss . '" target="_blank"><img class="feed-widget" src="' . $imgdir . 'rss.png" alt="RSS"></a>
<a href="' . $baseurl . '?x=feed:atom" title="' . $atom . '" target="_blank"><img class="feed-widget" src="' . $imgdir . 'atom.png" alt="Atom"></a>
<a href="' . $baseurl . '?x=feed:rss2" title="' . $rss . '" target="_blank"><img class="feed-widget" src="' . $imgdir . 'img/rss.png" alt="RSS"></a>
<a href="' . $baseurl . '?x=feed:atom" title="' . $atom . '" target="_blank"><img class="feed-widget" src="' . $imgdir . 'img/atom.png" alt="Atom"></a>
</li>
</ul>
<!-- EOF Feed-Buttons -->