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 'commentcenter', // including Akismet interface
'mediamanager', 'mediamanager',
'datechanger', // Lets you change the publish date for (new) entries. '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', 'gallerycaptions',
'photoswipe' 'photoswipe'
); );

View File

@ -1,13 +1,10 @@
<?php <?php
$fp_widgets = array ( $fp_widgets = array (
// to disable put // or # before the plugin name // to disable put // or # before the plugin name
// remove it to enable :) // remove it to enable :)
'top' => array (
'top' =>
array (
// (no widgets) // (no widgets)
), ),
@ -15,15 +12,12 @@
// on the left side // on the left side
// (Theme dependant) // (Theme dependant)
'left' => 'left' => array (
array (
// (no widgets) // (no widgets)
), ),
// Right side widgets // Right side widgets
'right' => 'right' => array (
array (
'adminarea', 'adminarea',
'blockparser:menu', 'blockparser:menu',
'categories', 'categories',
@ -32,14 +26,11 @@
'lastentries', 'lastentries',
// 'lastcomments', // 'lastcomments',
'searchbox', 'searchbox',
'feed'
), ),
'bottom' => 'bottom' => array (
array (
// (no widgets) // (no widgets)
), ),
); );
?> ?>

View File

@ -11,10 +11,6 @@
<div id="body-container"> <div id="body-container">
<div id="head"> <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> <h1><a href="{$smarty.const.BLOG_BASEURL}">{$flatpress.title}</a></h1>
<p class="subtitle">{$flatpress.subtitle}</p> <p class="subtitle">{$flatpress.subtitle}</p>
</div> <!-- end of #head --> </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'); $lang = lang_load('plugin:feed');
$baseurl = BLOG_BASEURL; $baseurl = BLOG_BASEURL;
$imgdir = IMAGES_DIR; $imgdir = plugin_geturl('feed');
$widget ['subject'] = $lang ['plugin'] ['feed'] ['subject']; $widget ['subject'] = $lang ['plugin'] ['feed'] ['subject'];
@ -32,11 +32,11 @@ function plugin_feed_widget() {
$atom = $lang ['plugin'] ['feed'] ['atom']; $atom = $lang ['plugin'] ['feed'] ['atom'];
$widget ['content'] = ' $widget ['content'] = '
<!-- BEOF Feed-Buttons --> <!-- BOF Feed-Buttons -->
<ul> <ul>
<li> <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: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 . 'atom.png" alt="Atom"></a> <a href="' . $baseurl . '?x=feed:atom" title="' . $atom . '" target="_blank"><img class="feed-widget" src="' . $imgdir . 'img/atom.png" alt="Atom"></a>
</li> </li>
</ul> </ul>
<!-- EOF Feed-Buttons --> <!-- EOF Feed-Buttons -->