Plugin Directory

Changeset 815788


Ignore:
Timestamp:
12/06/2013 07:27:51 AM (12 years ago)
Author:
ashdurham
Message:

Error checking and fix to multiple feeds

Location:
rsskingpro
Files:
38 added
4 edited

Legend:

Unmodified
Added
Removed
  • rsskingpro/trunk/includes/output.php

    r778210 r815788  
    3232        $formatsplit = explode('##', $format);
    3333        $formatdef = array('FEEDTITLE','PUBDATE','TITLE','LINK','DESCRIPTION','CONTENT','CATEGORIES','CATEGORY','AUTHORS','AUTHOR','CONTRIBUTORS','CONTRIBUTOR','COPYRIGHT','GUID','UNIQUEKEY');
    34         $feedarray = explode(",",$feedaddress);
     34        $feedarray = explode("|",$feedaddress);
    3535        foreach ($feedarray as &$feedurl) {
    3636            $feedurl = trim($feedurl);
    3737            $rss_urlcheck = stripos($feedurl, 'http');
    3838            if ($rss_urlcheck !== 0) { $feedurl = 'http://'.$feedurl; }
    39             $feedurl = (html_entity_decode ($feedurl));
     39            $feedurls[] = html_entity_decode($feedurl);
    4040        }
    4141
     
    4545       
    4646        $feed = new SimplePie();
    47         $feed->set_feed_url($feedarray);
     47        $feed->set_feed_url($feedurls);
    4848        $feed->set_cache_location($cachelocation);
    4949        $feed->set_cache_duration('60');
     
    5252        $feed->handle_content_type();
    5353        $rss = $feed;
     54        if ($rss->error()) {
     55            $error_output = '';
     56            foreach ($rss->error() as $err_num=>$error)
     57                $error_output .= "[".$err_num."] ".$error."<br />";
     58            return $error_output;
     59        }
    5460        $totalitems = $rss->get_item_quantity();
    5561        if (isset($_GET['rsskppage'])) {
  • rsskingpro/trunk/includes/screens/settings.php

    r798361 r815788  
    3737            <p>There is alot of options you can modify using the shortcode, please see below for all the options. You can define your own settings by:</p>
    3838            <pre>[rsskingpro feedaddress="http://feedurl.com/feed/" display="10"]</pre>
     39            <p>Multiple feeds can be pulled in at once:</p>
     40            <pre>[rsskingpro feedaddress="http://feedurl.com/feed/|http://feedurl2.com/feed/" display="10"]</pre>
    3941            <p>To add this into a template, just use the "do_shortcode" function:</p>
    4042            <pre>&lt;?php
     
    4446            <h3>Shortcode Options</h3>
    4547            <h4>feedaddress</h4>
    46             <p style='padding-left: 20px;'><strong>Default - 'no feed'</strong> | This field takes the external web address(es) of the feed you want to pull. To list multiple addresses, separate with commas.</p>
     48            <p style='padding-left: 20px;'><strong>Default - 'no feed'</strong> | This field takes the external web address(es) of the feed you want to pull. To list multiple addresses, separate with '|'.</p>
    4749            <h4>display</h4>
    4850            <p style='padding-left: 20px;'><strong>Default - '5'</strong> | Number of items to list on output</p>
  • rsskingpro/trunk/readme.txt

    r811283 r815788  
    55Requires at least: 3.0.1
    66Tested up to: 3.7.1
    7 Stable tag: 1.0.3
     7Stable tag: 1.0.4
    88License: GPLv2
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5858= Shortcode Options =
    5959* feedaddress
    60 `Default - 'no feed'` | This field takes the external web address(es) of the feed you want to pull. To list multiple addresses, separate with commas.
     60`Default - 'no feed'` | This field takes the external web address(es) of the feed you want to pull. To list multiple addresses, separate with '|'.
    6161* display
    6262`Default - '5'` | Number of items to list on output
     
    138138== Changelog ==
    139139
     140= 1.0.4 =
     141* Addition of error checking and reporting
     142* Fixed ability to add multiple feeds by changing the splitter from ',' to '|'
     143
    140144= 1.0.3 =
    141145* Update to KPP section with release of new plugin
     
    154158== Upgrade Notice ==
    155159
     160= 1.0.4 =
     161* Addition of error checking and reporting
     162* Fixed ability to add multiple feeds by changing the splitter from ',' to '|'
     163
    156164= 1.0.3 =
    157165* Update to KPP section with release of new plugin
  • rsskingpro/trunk/rsskingpro.php

    r811283 r815788  
    44    Plugin URI: http://kingpro.me/plugins/rss-king-pro/
    55    Description: RSS King Pro allows you display and format a RSS feed on a page
    6     Version: 1.0.3
     6    Version: 1.0.4
    77    Author: Ash Durham
    88    Author URI: http://durham.net.au/
     
    2828
    2929    global $rsskp_db_version;
    30     $rsskp_db_version = "1.0.3";
     30    $rsskp_db_version = "1.0.4";
    3131
    3232    function rsskp_install() {
Note: See TracChangeset for help on using the changeset viewer.