]> git.mjollnir.org Git - s9y.git/commitdiff
allow to configure icon url, patch by sapphirecat on the forums
authorgarvinhicking <garvinhicking>
Thu, 14 Jun 2007 09:34:28 +0000 (09:34 +0000)
committergarvinhicking <garvinhicking>
Thu, 14 Jun 2007 09:34:28 +0000 (09:34 +0000)
include/plugin_internal.inc.php

index be894afe5a8d4a89032c9cbb59e11b1408e9bde1..6fcb331d2aa19023c06d0b15e8a43b45fa34472d 100644 (file)
@@ -672,7 +672,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         $propbag->add('description',   SHOWS_RSS_BLAHBLAH);
         $propbag->add('stackable',     true);
         $propbag->add('author',        'Serendipity Team');
-        $propbag->add('version',       '1.3');
+        $propbag->add('version',       '1.4');
         $propbag->add('configuration', array(
                                         'title',
                                         'fullfeed',
@@ -691,6 +691,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
                                         'field_ttl',
                                         'field_pubDate',
                                         'seperator',
+                                        'iconURL',
                                         'bannerURL',
                                         'bannerWidth',
                                         'bannerHeight',
@@ -839,6 +840,13 @@ class serendipity_syndication_plugin extends serendipity_plugin {
                 $propbag->add('default',     true);
                 break;
 
+            case 'iconURL':
+                $propbag->add('type',        'string');
+                $propbag->add('name',        XML_IMAGE_TO_DISPLAY);
+                $propbag->add('description', '');
+                $propbag->add('default',     'img/xml.gif');
+                break;
+
             case 'bannerURL':
                 $propbag->add('type',        'string');
                 $propbag->add('name',        SYNDICATION_PLUGIN_BANNERURL);
@@ -900,11 +908,12 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         global $serendipity;
 
         $title = $this->get_config('title');
+        $icon  = serendipity_getTemplateFile($this->get_config('iconURL', 'img/xml.gif'));
 
         if (serendipity_db_bool($this->get_config('show_0.91', true))) {
 ?>
         <div style="padding-bottom: 2px;">
-            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss', 'serendipityHTTPPath') ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" alt="XML" style="border: 0px" /></a>
+            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss', 'serendipityHTTPPath') ?>"><img src="<?php echo $icon; ?>" alt="XML" style="border: 0px" /></a>
             <a href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss', 'serendipityHTTPPath') ?>">RSS 0.91 feed</a>
         </div>
 <?php
@@ -913,7 +922,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         if (serendipity_db_bool($this->get_config('show_1.0', true))) {
 ?>
         <div style="padding-bottom: 2px;">
-            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss1', 'serendipityHTTPPath') ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" alt="XML" style="border: 0px" /></a>
+            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss1', 'serendipityHTTPPath') ?>"><img src="<?php echo $icon; ?>" alt="XML" style="border: 0px" /></a>
             <a href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss1', 'serendipityHTTPPath') ?>">RSS 1.0 feed</a>
         </div>
 <?php
@@ -922,7 +931,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         if (serendipity_db_bool($this->get_config('show_2.0', true))) {
 ?>
         <div style="padding-bottom: 2px;">
-            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss2', 'serendipityHTTPPath') ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" alt="XML" style="border: 0px" /></a>
+            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss2', 'serendipityHTTPPath') ?>"><img src="<?php echo $icon; ?>" alt="XML" style="border: 0px" /></a>
             <a href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/index.rss2', 'serendipityHTTPPath') ?>">RSS 2.0 feed</a>
         </div>
 <?php
@@ -931,7 +940,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         if (serendipity_db_bool($this->get_config('show_atom0.3', true))) {
 ?>
         <div style="padding-bottom: 2px;">
-            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/atom03.xml', 'serendipityHTTPPath') ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" alt="ATOM/XML" style="border: 0px" /></a>
+            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/atom03.xml', 'serendipityHTTPPath') ?>"><img src="<?php echo $icon; ?>" alt="ATOM/XML" style="border: 0px" /></a>
             <a href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/atom03.xml', 'serendipityHTTPPath') ?>">ATOM 0.3 feed</a>
         </div>
 <?php
@@ -940,7 +949,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         if (serendipity_db_bool($this->get_config('show_atom1.0', true))) {
 ?>
         <div style="padding-bottom: 2px;">
-            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/atom10.xml', 'serendipityHTTPPath') ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" alt="ATOM/XML" style="border: 0px" /></a>
+            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/atom10.xml', 'serendipityHTTPPath') ?>"><img src="<?php echo $icon; ?>" alt="ATOM/XML" style="border: 0px" /></a>
             <a href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/atom10.xml', 'serendipityHTTPPath') ?>">ATOM 1.0 feed</a>
         </div>
 <?php
@@ -949,7 +958,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         if (serendipity_db_bool($this->get_config('show_2.0c', true))) {
 ?>
         <div style="padding-bottom: 2px;">
-            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2', 'serendipityHTTPPath') ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" alt="XML" style="border: 0px" /></a>
+            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2', 'serendipityHTTPPath') ?>"><img src="<?php echo $icon; ?>" alt="XML" style="border: 0px" /></a>
             <a href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2', 'serendipityHTTPPath') ?>"><span style="white-space: nowrap">RSS 2.0 <?php echo COMMENTS; ?></span></a>
         </div>
 <?php
@@ -958,7 +967,7 @@ class serendipity_syndication_plugin extends serendipity_plugin {
         if (serendipity_db_bool($this->get_config('show_opml1.0', false))) {
 ?>
         <div style="padding-bottom: 2px;">
-            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/opml.xml', 'serendipityHTTPPath') ?>"><img src="<?php echo serendipity_getTemplateFile('img/xml.gif'); ?>" alt="XML" style="border: 0px" /></a>
+            <a class="serendipity_xml_icon" href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/opml.xml', 'serendipityHTTPPath') ?>"><img src="<?php echo $icon; ?>" alt="XML" style="border: 0px" /></a>
             <a href="<?php echo serendipity_rewriteURL(PATH_FEEDS .'/opml.xml', 'serendipityHTTPPath') ?>">OPML 1.0 feed</a>
         </div>
 <?php