Skip to content

Commit

Permalink
Closes #317 | Add RSS and Atom link
Browse files Browse the repository at this point in the history
- remove the RSS and Atom buttons in the header template
- Activates the plugin by default and places the widget in the menu column
  • Loading branch information
Fraenkiman committed Feb 16, 2024
2 parents d38c971 + 86cb093 commit 113ba8f
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 45 deletions.
Binary file removed fp-content/images/.thumbs/atom-white.png
Binary file not shown.
Binary file removed fp-content/images/.thumbs/atom.png
Binary file not shown.
Binary file removed fp-content/images/.thumbs/rss-white.png
Binary file not shown.
Binary file removed fp-content/images/.thumbs/rss.png
Binary file not shown.
Binary file removed fp-content/images/atom-white.png
Binary file not shown.
Binary file removed fp-content/images/atom.png
Binary file not shown.
Binary file removed fp-content/images/rss-white.png
Binary file not shown.
Binary file removed fp-content/images/rss.png
Binary file not shown.
2 changes: 1 addition & 1 deletion fp-defaults/plugins.conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'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'
);
Expand Down
63 changes: 27 additions & 36 deletions fp-defaults/widgets.conf.php
Original file line number Diff line number Diff line change
@@ -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)
),
);

?>
4 changes: 0 additions & 4 deletions fp-interface/themes/leggero/header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand Down
6 changes: 6 additions & 0 deletions fp-plugins/feed/img/License.md
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 4 additions & 4 deletions fp-plugins/feed/plugin.feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ 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'];

$rss = $lang ['plugin'] ['feed'] ['rss'];
$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 -->
Expand Down

0 comments on commit 113ba8f

Please sign in to comment.