WordPress.org

Plugin Directory

Changeset 565228 for syndicate-press


Ignore:
Timestamp:
06/29/12 05:10:17 (22 months ago)
Author:
hranchFundi
Message:

1.0.16: New feature release and bug fixes
Added a new feature that allows the user to customize the format of the timestamp.
Fixed a bug in the shortcode definition of the feednames to include in a page. SP now allows the user to define the feeds to include as follows: feedList=feedname
Updated the help tab with the new feedList example
Added directory path display when the cache permissions are incorrect.

Location:
syndicate-press/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • syndicate-press/trunk/php/TinyFeedParser.php

    r524972 r565228  
    22/* 
    33File: TinyFeedParser.php 
    4 Date: 2/28/2012 
    5 Version 1.9.4 
     4Date: 6/25/2012 
     5Version 1.9.5 
    66Author: HenryRanch LLC 
    77 
     
    9696    var $numArticles = 0; 
    9797     
     98    var $useCustomTimestampFormat = true; 
     99    var $defaultTimestampFormatString = 'l F jS, Y h:i:s A'; 
     100    var $timestampFormatString = 'l F jS, Y h:i:s A'; 
     101     
    98102    function TinyFeedParser()  
    99103    { 
    100104    } 
    101105     
     106    function getDefaultTimestampFormatString() 
     107    { 
     108        return $this->defaultTimestampFormatString; 
     109    } 
     110     
    102111    function getDomainFromUrl($url) 
    103112    { 
     
    171180    { 
    172181        $this->feedUpdateTime = $this->getFileModificationTime($url_or_file); 
     182         
    173183        if(strpos($url_or_file, "http://") === false) 
    174184        { 
     
    358368        if(file_exists($filename)) 
    359369        { 
    360             return date("F d Y H:i:s.", filemtime($filename)); 
     370            if($this->useCustomTimestampFormat) 
     371            { 
     372                return date($this->timestampFormatString, filemtime($filename)); 
     373            } 
     374            else 
     375            { 
     376                return date("F d Y H:i:s.", filemtime($filename)); 
     377            } 
    361378        } 
    362379    } 
     
    567584                { 
    568585                    //$html = $this->addBrIfNeeded($html); 
    569                     $html .= '<font size=-3>'.$article->pubDateStr.'</font>'."\r\n"; 
     586                    if($this->useCustomTimestampFormat) 
     587                    { 
     588                        $html .= '<font size=-3>'.date($this->timestampFormatString, $article->pubTimeStamp).'</font>'."\r\n"; 
     589                    } 
     590                    else 
     591                    { 
     592                        $html .= '<font size=-3>'.$article->pubDateStr.'</font>'."\r\n"; 
     593                    } 
    570594                } 
    571595                else 
  • syndicate-press/trunk/readme.txt

    r538797 r565228  
    44Tags: RSS,RDF,Atom,feed,syndicate,syndication,news,aggregator,aggregation,plugin,active,maintained,custom,widget,post,plugin,posts,admin,sidebar,theme,comments,images,twitter,page,google,links 
    55Requires at least: 2.8 
    6 Tested up to: 3.3.2 
    7 Stable tag: 1.0.15 
     6Tested up to: 3.4 
     7Stable tag: 1.0.16 
    88 
    99Syndicate Press lets you include RSS, RDF or Atom feeds directly in your Wordpress posts, pages, widgets or theme.  
     
    4848http://henryranch.net/software/syndicate-press/syndicate-press-releases/ 
    4949 
    50 1.0.15: Small performance update 
    51 Removed an external server call which was slowing down the admin page load. 
     501.0.16: New feature release and bug fixes<br> 
     51Added a new feature that allows the user to customize the format of the timestamp.<br> 
     52Fixed a bug in the shortcode definition of the feednames to include in a page.  SP now allows the user to define the feeds to include as follows: feedList=feedname <br> 
     53Updated the help tab with the new feedList example<br> 
     54Added directory path display when the cache permissions are incorrect.<br> 
    5255 
    53 1.0.14: Tiny bugfix release 
    54 Fixed spelling error in Syndicate Press linkback text 
     561.0.15: Small performance update<br> 
     57Removed an external server call which was slowing down the admin page load.<br> 
    5558 
    56 1.0.13: Documentation release 
    57 Clarified some documentation around the file permissions check 
     591.0.14: Tiny bugfix release<br> 
     60Fixed spelling error in Syndicate Press linkback text<br> 
    5861 
    59 1.0.12: Bug fix release. 
    60 Put exception handling around the file permissions check. 
     621.0.13: Documentation release<br> 
     63Clarified some documentation around the file permissions check<br> 
    6164 
    62 1.0.11: This is a new feature release. 
    63 Added support for bbcodes in the text widget. 
    64 Added a new check to make sure that the cache directories have the correct permissions. 
    65 Updated some of the descriptions in the admin page to make them clearer. 
     651.0.12: Bug fix release.<br> 
     66Put exception handling around the file permissions check.<br> 
    6667 
    67 1.0.10: This is a bug-fix release.  Fixed the following issues:  
    68 Failure to show feed items when "Show item description only when the viewer hovers over the item link." is selected. 
    69 Error upon extra spaces and commas in the filter fields. 
     681.0.11: This is a new feature release.<br> 
     69Added support for bbcodes in the text widget.<br> 
     70Added a new check to make sure that the cache directories have the correct permissions.<br> 
     71Updated some of the descriptions in the admin page to make them clearer.<br> 
    7072 
    71 1.0.9: Added the showImages parameter to the bbcode to enable display of feed images for all feeds included by that bbcode snippet.  i.e. [sp# feedname showImages=true] 
     731.0.10: This is a bug-fix release.  Fixed the following issues: <br> 
     74Failure to show feed items when "Show item description only when the viewer hovers over the item link." is selected.<br> 
     75Error upon extra spaces and commas in the filter fields.<br> 
    7276 
    73 1.0.8: Added ability to define inclusive and exclusive filters within the bbcode i.e. [sp# feedname include=keyword exclude=keyword] 
    74 Moved the custom formatting config out of the Display Options tab and into the new Custom Formatting tab 
     771.0.9: Added the showImages parameter to the bbcode to enable display of feed images for all feeds included by that bbcode snippet.  i.e. [sp# feedname showImages=true]<br> 
    7578 
    76 1.0.7: Fixed an image display bug.  Placed the cache control buttons at the top of the admin UI. 
     791.0.8: Added ability to define inclusive and exclusive filters within the bbcode i.e. [sp# feedname include=keyword exclude=keyword]<br> 
     80Moved the custom formatting config out of the Display Options tab and into the new Custom Formatting tab<br> 
    7781 
    78 1.0.6: Major admin page UI refactoring to utilize tabs.  Tabs make managing the plugin much easier! 
    79 Implemented first attempt at solving the go-daddy permanent redirect for rss feeds. 
     821.0.7: Fixed an image display bug.  Placed the cache control buttons at the top of the admin UI.<br> 
    8083 
    81 1.0.5: Removed an extra line break after the article title and prior to the article timestamp.   
     841.0.6: Major admin page UI refactoring to utilize tabs.  Tabs make managing the plugin much easier!<br> 
     85Implemented first attempt at solving the go-daddy permanent redirect for rss feeds.<br> 
     86 
     871.0.5: Removed an extra line break after the article title and prior to the article timestamp.  <br> 
    8288Now the look of the title and timestamp is more controllable by the user.  The article title still defaults to a  
    8389header2 level, but this can be removed in the plugin admin page. 
    8490 
    85 1.0.4: Ignoring empty lines in the the feed url box.   
     911.0.4: Ignoring empty lines in the the feed url box.  <br> 
    8692 
    87 1.0.3: Fixed a quote and slash escaping issue in the custom feed separator html and in the feed not found custom html. 
     931.0.3: Fixed a quote and slash escaping issue in the custom feed separator html and in the feed not found custom html.<br> 
    8894 
    89 1.0.2: Added an article link to the '...' when an article is truncated by Syndicate Press.  Automatically replacing the feed:// protocol designator with http:// 
     951.0.2: Added an article link to the '...' when an article is truncated by Syndicate Press.  Automatically replacing the feed:// protocol designator with http://<br> 
    9096 
    91 1.0.1: Added an 'Update Settings' button to the top of the Admin Page.  Fixed a bug where a space between the | character and the feed URL (when using a custom feed name) resulted in the feed URL not being found. 
     971.0.1: Added an 'Update Settings' button to the top of the Admin Page.  Fixed a bug where a space between the | character and the feed URL (when using a custom feed name) resulted in the feed URL not being found.<br> 
    9298 
    93 1.0: Initial release to the Wordpress plugin repository 
     991.0: Initial release to the Wordpress plugin repository<br> 
    94100 
    95101== Arbitrary section == 
  • syndicate-press/trunk/syndicate-press-plugin.php

    r538797 r565228  
    55Description: This plugin provides a high performance, highly configurable and easy to use news syndication aggregator which supports RSS, RDF and ATOM feeds. 
    66Author: HenryRanch LLC (henryranch.net) 
    7 Version: 1.0.15 
     7Version: 1.0.16 
    88Author URI: http://henryranch.net/ 
    99License: GPL2 
     
    6161if (!class_exists("SyndicatePressPlugin")) { 
    6262    class SyndicatePressPlugin { 
    63         var $version = "1.0.15"; 
     63        var $version = "1.0.16"; 
    6464        var $homepageURL = "http://henryranch.net/software/syndicate-press/"; 
    6565         
     
    9595            'inclusiveKeywordFilter' => '', 
    9696            'exclusiveKeywordFilter' => '', 
     97            'timestampFormat' => 'l F jS, Y h:i:s A', 
    9798            'cacheTimeoutSeconds' => 3600, 
    9899            'feedTitleHTMLCodePre' => '<h2>', 
     
    214215            return ""; 
    215216        } 
    216          
     217 
    217218        /* Filter callback which actually does the main work of the plugin. 
    218219                        * Will match syndicate press bbcodes in pages/posts and replace the bbcode with the referenced RSS feed content 
     
    234235            $availableFeeds = explode("\n", $configOptions['feedUrlList']); 
    235236             
    236             $content = ''; 
    237              
     237            $content = '';             
    238238        
    239239            $enableOutputCache = $configOptions['enableOutputCache']; 
     
    251251                foreach($bbCodeTagArray as $feedNameReference) 
    252252                {   
    253                     $feedNameReference = trim($feedNameReference);  
     253                    $feedNameReference = trim($feedNameReference);//,"\x7f..\xff\x0..\x1f");  
     254                    //echo 'pre exploded feed name ref: \''.$feedNameReference.'\'<br>'; 
    254255                    //ignore array element s that are just the bbcode text.  we don't need the bbcode text b/c the following text is the bbcode parameters as extracted by the sp bbcode filter 
    255256                    if(strpos($feedNameReference, '[') !== false) 
     
    277278                            $customConfigOverrides['showImages'] = $list[1]; 
    278279                        } 
     280                        else if(strpos($param, 'feedList') !== false) 
     281                        { 
     282                            $list = explode('=', $param); 
     283                            $feedNameReference = $list[1]; 
     284                        } 
    279285                    } 
    280286                    foreach($availableFeeds as $availableFeed) 
     
    286292                        } 
    287293                        //split the reference string on ',' (comma).  this is the feed reference list provided in the bbcode: [sp# feed1,feed2,feed3,etc...] 
    288                         $feedNameList = explode(',', $feedNameReference); 
    289                         //print_r($feedNameList); 
     294                        //echo 'feed name ref: '.$feedNameReference.'<br>'; 
     295                        $feedNameList = explode(',', $feedNameReference); 
     296                         
    290297                        foreach($feedNameList as $feedName) 
    291298                        { 
    292                             if(strpos($availableFeed, $feedName) !== false || (strtolower($feedName) == "all")) 
     299                            $feedName = trim($feedName); 
     300                            //print "Checking feedname: '$feedName' against available feed: '$availableFeed'<br>";  
     301                            if(strpos($availableFeed, $feedName) !== false || ($feedName == 'all')) 
    293302                            {     
    294303                                //print "Found requested feed: $availableFeed <br>";  
     
    301310                                } 
    302311                                $content .= $this->sp_getFormattedRssContent($availableFeed, $customConfigOverrides); 
    303                                 if($configOptions['feedSeparationHTMLCode'] != "") 
     312                                if($configOptions['feedSeparationHTMLCode'] != '') 
    304313                                { 
    305314                                    $content .= $this->sp_unescapeString($configOptions['feedSeparationHTMLCode']); 
     
    395404            if($permProblem) 
    396405            { 
    397                 $permProblem = "There may be a problem with your cache permissions:<br>$permProblem<br>Please set your cache permissions to rwxr-xr-x."; 
     406                $permProblem = "There may be a problem with your cache permissions:<br>$permProblem<br>Please set your cache permissions to rwxr-xr-x.<br>Your Syndicate Press cache directory is located here: ".$mainCacheDir; 
    398407            } 
    399408            return $permProblem; 
     
    659668                $parser->showArticlePublishTimestamp = $configOptions['showArticlePublishTimestamp']; 
    660669                $parser->allowMarkupInDescription = $configOptions['allowMarkupInDescription']; 
     670                if($configOptions['timestampFormat']  != '') 
     671                { 
     672                    $parser->useCustomTimestampFormat = true; 
     673                    $parser->timestampFormatString = $configOptions['timestampFormat']; 
     674                    $parser->timestampFormatString = $this->sp_unescapeString($parser->timestampFormatString); 
     675                } 
    661676                $parser->customFeedName = $this->sp_getCustomFeednameForUrl($url); 
    662677                if($parser->customFeedName == "") 
     
    851866                if (isset($_POST['syndicatePressMaxHeadlineLength'])) { 
    852867                    $configOptions['maxHeadlineLength'] = $_POST['syndicatePressMaxHeadlineLength']; 
     868                }               
     869                if (isset($_POST['syndicatePressTimestampFormat'])) { 
     870                    $configOptions['timestampFormat'] = trim(mysql_real_escape_string($_POST['syndicatePressTimestampFormat'])); 
    853871                }               
    854872                if (isset($_POST['syndicatePressUseDownloadClient'])) { 
     
    10481066        Cached feed expires after <input name="syndicatePressCacheTimeoutSeconds" size="10" value="<?php _e(apply_filters('format_to_edit',$configOptions['cacheTimeoutSeconds']), 'SyndicatePressPlugin') ?>"> seconds. (1 hour = 3600 seconds)<br> 
    10491067        </div> 
    1050         <label for="syndicatePressEnableFeedCache_no"><input type="radio" id="syndicatePressEnableFeedCache_no" name="syndicatePressEnableFeedCache" value="false" <?php if ($configOptions['enableFeedCache'] == "false") { _e('checked="checked"', "SyndicatePressPlugin"); }?>/> Disable - Request the feed for every view of the Syndicate Press page.  <em>This is NOT recommended!</em></label><br> 
     1068        <label for="syndicatePressEnableFeedCache_no"><input type="radio" id="syndicatePressEnableFeedCache_no" name="syndicatePressEnableFeedCache" value="false" <?php if ($configOptions['enableFeedCache'] == "false") { _e('checked="checked"', "SyndicatePressPlugin"); }?>/> Disable - Request the feed for every view of the Syndicate Press page.  <em>This is NOT recommended and may result in your server IP being banned by the publisher!</em></label><br> 
    10511069        Feed download mode:<br> 
    10521070        <div style="padding-left: 20px;"> 
     
    10761094        <div style="padding-left: 20px;"> 
    10771095        <label for="syndicatePressshowArticlePublishTimestamp_yes"><input type="radio" id="syndicatePressshowArticlePublishTimestamp_yes" name="syndicatePressshowArticlePublishTimestamp" value="true" <?php if ($configOptions['showArticlePublishTimestamp'] == "true") { _e('checked="checked"', "SyndicatePressPlugin"); }?> /> Show timestamp.</label><br> 
     1096            <div style="padding-left: 20px;"> 
     1097            Timestamp Format: <input name="syndicatePressTimestampFormat" size="50" value="<?php _e($this->sp_unescapeString(apply_filters('format_to_edit',$configOptions['timestampFormat'])), 'SyndicatePressPlugin') ?>"> &nbsp;&nbsp;Default: <?php $tfp = new TinyFeedParser(); echo '<b><i>'.$tfp->getDefaultTimestampFormatString().'</b></i>'; ?> <br>Example: The default format string create a timestamp like this: <i>Friday June 29th, 2012 04:12:01 AM</i> <br>For help with custom timestamp formatting, see <a href="http://php.net/manual/en/function.date.php" target="_blank">this documentation</a>.<br> 
     1098            </div> 
    10781099        <label for="syndicatePressshowArticlePublishTimestamp_no"><input type="radio" id="syndicatePressshowArticlePublishTimestamp_no" name="syndicatePressshowArticlePublishTimestamp" value="false" <?php if ($configOptions['showArticlePublishTimestamp'] == "false") { _e('checked="checked"', "SyndicatePressPlugin"); }?>/> Hide timestamp.</label><br> 
    10791100        </div><br>&nbsp;<br> 
     
    11451166        To insert feed contents into a Page or Post, use the following syntax:<br> 
    11461167        <div style="padding-left: 20px;"> 
    1147         [sp# all] - insert all of the feeds in the feed list<br> 
    1148         [sp# feedname] - insert only the feed with the given name<br> 
    1149         [sp# feedname1,feedname2,etc...] - insert the feeds with the given names<br> 
    1150         [sp# feedname1,feedname2 include=keyword1,keyword2] - insert the feeds with the given names and the given inclusive keyword filters<br> 
    1151         [sp# feedname1,feedname2 exclude=keyword1,keyword2] - insert the feeds with the given names and the given exclusive keyword filters<br> 
    1152         [sp# feedname include=keyword exclude=keyword] - insert the feeds with the given name and the given inclusive and exclusive keyword filters<br> 
     1168        [sp# feedList=all] - insert all of the feeds in the feed list<br> 
     1169        <i>In the following examples, <b>feedname</b> will match the name of a feed, or any word within the feed url</i><br> 
     1170        [sp# feedList=feedname] - insert only the feed with the given name<br> 
     1171        [sp# feedList=feedname1,feedname2,etc...] - insert the feeds with the given names<br> 
     1172        [sp# feedList=feedname1,feedname2 include=keyword1,keyword2] - insert the feeds with the given names and the given inclusive keyword filters<br> 
     1173        [sp# feedList=feedname1,feedname2 exclude=keyword1,keyword2] - insert the feeds with the given names and the given exclusive keyword filters<br> 
     1174        [sp# feedList=feedname include=keyword exclude=keyword] - insert the feeds with the given name and the given inclusive and exclusive keyword filters<br> 
    11531175        </p> 
    11541176        </div>         
     
    11931215        <b><u>Personalized support</u></b> 
    11941216        <p style="padding-left: 20px;"> 
    1195         If you would like personalized support from the Syndicate Press developers, you may contact us directly at sp&nbsp;[at]&nbsp;h&nbsp;e&nbsp;n&nbsp;r&nbsp;y&nbsp;r&nbsp;a&nbsp;n&nbsp;c&nbsp;h&nbsp;.&nbsp;n&nbsp;e&nbsp;t.<br> 
     1217        If you would like personalized support from the Syndicate Press developers, you may contact us directly at <b>sp&nbsp;[at]&nbsp;h&nbsp;e&nbsp;n&nbsp;r&nbsp;y&nbsp;r&nbsp;a&nbsp;n&nbsp;c&nbsp;h&nbsp;.&nbsp;n&nbsp;e&nbsp;t.</b><br> 
    11961218        <i>We request a donation to Syndicate Press for personalized support.</i> 
    11971219        </p> 
Note: See TracChangeset for help on using the changeset viewer.