WordPress.org

Plugin Directory

Changeset 648984 for syndicate-press


Ignore:
Timestamp:
01/07/13 05:19:47 (15 months ago)
Author:
hranchFundi
Message:

1.0.21: New feature release
This release contains multiple new features...

  • Custom Formatting:

--- Feed and article title custom formatting now supports full html parameters such as the css style param and the javascript param
--- Added custom formatting to the article body

  • Article identification:

--- Added div id's to the articles. This div surrounds the article tite, timestamp and body content.

  • Support:

--- Added a feature on the support tab which will show the internal, global settings for SP so that an admin can include the settings in a support request email.

  • Documentation:

--- Added a reminder on the RSS Feeds tab that the site admin is fully responsible for following a feed publishers Copyright and Terms of Use.

Location:
syndicate-press/trunk
Files:
4 edited

Legend:

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

    r646387 r648984  
    22/* 
    33File: TinyFeedParser.php 
    4 Date: 12/31/2012 
    5 Version 1.9.8 
     4Date: 1/6/2013 
     5Version 1.9.9 
    66Author: HenryRanch LLC 
    77 
    88LICENSE: 
    99============ 
    10 Copyright (c) 2009-2012, Henry Ranch LLC. All rights reserved. http://www.henryranch.net 
     10Copyright (c) 2009-2013, Henry Ranch LLC. All rights reserved. http://www.henryranch.net 
    1111 
    1212 
     
    9595    var $articleTitleHTMLCodePre = '<h3>'; 
    9696    var $articleTitleHTMLCodePost = '</h3>'; 
     97    var $articleBodyHTMLCodePre = '<div>'; 
     98    var $articleBodyHTMLCodePost = '</div>'; 
    9799     
    98100    var $numArticles = 0; 
     
    580582                } 
    581583            } 
    582             $html .= "<p>\r\n"; 
     584            $html .= "<div id=\"articleDiv-".($currentArticleIndex-1)."\">\r\n"; 
    583585            if($article->image) 
    584586            { 
    585587                $html .= '<a href="'.$article->image->link.'"'; 
    586                 if($this->addNoFollowTag == 'true') 
    587                 { 
    588                     $html .= ' rel="nofollow"'; 
    589                 } 
    590                 $html .= '><img src="'.$article->image->url.'"></a>';//."\r\n";      
     588                if($this->addNoFollowTag == 'true') 
     589                { 
     590                    $html .= ' rel="nofollow"'; 
     591                } 
     592                $html .= '><img src="'.$article->image->url.'"></a>';//."\r\n";      
    591593            } 
    592594            $html .= $headerHtmlPre; 
     
    604606                $html .= 'title="Click to read article..."'; 
    605607            } 
    606             if($this->addNoFollowTag == 'true') 
    607             { 
    608                 $html .= ' rel="nofollow"'; 
    609             } 
     608            if($this->addNoFollowTag == 'true') 
     609            { 
     610               $html .= ' rel="nofollow"'; 
     611            } 
    610612            $html .= ' target=_blank>'.$article->title.'</a>'.$headerHtmlPost."\r\n"; 
    611613            if($article->subtitle != '') 
     
    619621                { 
    620622                    //$html = $this->addBrIfNeeded($html); 
    621                     if($this->useCustomTimestampFormat) 
    622                     { 
    623                         $html .= '<font size=-3>'.date($this->timestampFormatString, $article->pubTimeStamp).'</font>'."\r\n"; 
    624                     } 
    625                     else 
    626                     { 
    627                         $html .= '<font size=-3>'.$article->pubDateStr.'</font>'."\r\n"; 
    628                     } 
     623                    if($this->useCustomTimestampFormat) 
     624                    { 
     625                       $html .= '<font size=-3>'.date($this->timestampFormatString, $article->pubTimeStamp).'</font>'."\r\n"; 
     626                    } 
     627                    else 
     628                    { 
     629                      $html .= '<font size=-3>'.$article->pubDateStr.'</font>'."\r\n"; 
     630                    } 
    629631                } 
    630632                else 
     
    638640            if(($this->showContentOnlyInLinkTitle == 'false')) 
    639641            { 
     642                $html .= $this->articleBodyHTMLCodePre."\r\n"; 
    640643                if($article->description != "") 
    641644                { 
     
    646649                    $html .= $article->content."\r\n"; 
    647650                } 
     651                $html .= $this->articleBodyHTMLCodePost."\r\n"; 
    648652            } 
    649653            if($article->copyright) 
     
    657661                $html .= '<font size=-4>Last feed update: '.$this->feedUpdateTime.'</font>'."\r\n"; 
    658662            } 
    659             $html .= "</p>\r\n"; 
     663            $html .= "</div>\r\n"; 
    660664        } 
    661665        return $html; 
  • syndicate-press/trunk/php/TinyHttpClient.php

    r511917 r648984  
    22/* 
    33File: TinyHttpClient.php 
    4 Date: 2/28/2012 
    5 Version 1.3.2 
     4Date: 1/6/2013 
     5Version 1.3.3 
    66Author: HenryRanch LLC 
    77 
    88LICENSE: 
    99============ 
    10 Copyright (c) 2009-2012, Henry Ranch LLC. All rights reserved. http://www.henryranch.net 
     10Copyright (c) 2009-2013, Henry Ranch LLC. All rights reserved. http://www.henryranch.net 
    1111 
    1212 
     
    6464        "Host: $host\r\n" . 
    6565        $authorization .  
    66         "User-Agent: TinyHttpClient/1.1\r\n" . 
    67         //"User-Agent: Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101\r\n" . 
     66        //"User-Agent: TinyHttpClient/1.1\r\n" . 
     67        "User-Agent: Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101\r\n" . 
    6868        "Connection: close\r\n" . 
    6969        "\r\n"; 
     
    8787        "Connection: close\r\n" . 
    8888        "From: $from\r\n" . 
    89         "User-Agent: TinyHttpClient/1.1\r\n" . 
    90         //"User-Agent: Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101\r\n" . 
     89        //"User-Agent: TinyHttpClient/1.1\r\n" . 
     90        "User-Agent: Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101\r\n" . 
    9191        "Content-Type: application/x-www-form-urlencoded\r\n" . 
    9292        "Content-Length: " . strlen($data) . "\r\n" . 
  • syndicate-press/trunk/readme.txt

    r646387 r648984  
    55Requires at least: 2.8 
    66Tested up to: 3.5 
    7 Stable tag: 1.0.20 
     7Stable tag: 1.0.21 
    88 
    99Syndicate Press lets you include RSS, RDF or Atom feeds directly in your Wordpress posts, pages, widgets or theme.  
     
    4747 
    4848http://syndicatepress.henryranch.net/documentation/changelog/ 
     49 
     501.0.21: New feature release<br> 
     51This release contains multiple new features...<br> 
     52- Custom Formatting:<br>  
     53--- Feed and article title custom formatting now supports full html parameters such as the css style param and the javascript param<br> 
     54--- Added custom formatting to the article body<br> 
     55- Article identification:<br> 
     56--- Added div id's to the articles.  This div surrounds the article tite, timestamp and body content.<br> 
     57- Support:<br> 
     58--- Added a feature on the support tab which will show the internal, global settings for SP so that an admin can include the settings in a support request email.<br> 
     59- TinyHttpClient class:<br> 
     60--- Changed User-Agent to Mozilla to help more servers accept the client.<br> 
     61- Documentation:<br> 
     62--- Added a reminder on the RSS Feeds tab that the site admin is fully responsible for following a feed publishers Copyright and Terms of Use.<br> 
     63 
     64 
    4965 
    50661.0.20: New feature release<br> 
  • syndicate-press/trunk/syndicate-press-plugin.php

    r646387 r648984  
    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.20 
     7Version: 1.0.21 
    88Author URI: http://syndicatepress.henryranch.net/ 
    99License: GPL2 
     
    1414LICENSE: 
    1515============ 
    16 Copyright (c) 2009-2012 Henry Ranch LLC. All rights reserved. http://syndicatepress.henryranch.net/ 
     16Copyright (c) 2009-2013 Henry Ranch LLC. All rights reserved. http://syndicatepress.henryranch.net/ 
    1717 
    1818By downloading or using this software,  you agree to all the following:  
     
    4444  
    4545  
    46  Copyright 2009-2012  HenryRanch LLC   
     46 Copyright 2009-2013  HenryRanch LLC   
    4747 
    4848    This program is free software; you can redistribute it and/or modify 
     
    5959    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
    6060*/ 
     61 
     62 
     63 
    6164if (!class_exists("SyndicatePressPlugin")) { 
    6265    class SyndicatePressPlugin { 
    63         var $version = "1.0.20"; 
     66        var $version = "1.0.21"; 
    6467        var $homepageURL = "http://syndicatepress.henryranch.net/"; 
    6568         
     
    101104            'articleTitleHTMLCodePre' => '<h3>', 
    102105            'articleTitleHTMLCodePost' => '</h3>', 
     106            'articleBodyHTMLCodePre' => '<div>', 
     107            'articleBodyHTMLCodePost' => '</div>', 
    103108            'feedSeparationHTMLCode' => '<hr>', 
    104109            'addNoFollowTag' => 'true', 
     
    344349        } 
    345350         
    346         function sp_unescapeString($str) 
    347         { 
     351        function sp_unescapeString($str, $replaceDoubleQuotesWithSingleQuotesForTagParams=false) 
     352        { 
     353            if($replaceDoubleQuotesWithSingleQuotesForTagParams) 
     354            { 
     355                //$str = str_replace('"', '\'', $str); 
     356            } 
    348357            return stripslashes(stripslashes($str)); 
    349358        } 
     
    641650                $customConfigShowImages = $customConfigOverrides['showImages']; 
    642651                $customConfigLimitArticles = $customConfigOverrides['limitArticles']; 
    643         $customConfigTruncateTitleAtWord = $customConfigOverrides['truncateTitleAtWord']; 
     652                $customConfigTruncateTitleAtWord = $customConfigOverrides['truncateTitleAtWord']; 
    644653            } 
    645654             
     
    678687                $parser->showFeedChannelTitle = $configOptions['showFeedChannelTitle']; 
    679688                $parser->useCustomFeednameAsChannelTitle = $configOptions['useCustomFeednameAsChannelTitle']; 
    680                 $parser->feedTitleHTMLCodePre = $configOptions['feedTitleHTMLCodePre']; 
    681                 $parser->feedTitleHTMLCodePost = $configOptions['feedTitleHTMLCodePost']; 
    682                 $parser->articleTitleHTMLCodePre = $configOptions['articleTitleHTMLCodePre']; 
    683                 $parser->articleTitleHTMLCodePost = $configOptions['articleTitleHTMLCodePost']; 
     689                $parser->feedTitleHTMLCodePre = $this->sp_unescapeString($configOptions['feedTitleHTMLCodePre']); 
     690                $parser->feedTitleHTMLCodePost = $this->sp_unescapeString($configOptions['feedTitleHTMLCodePost']); 
     691                $parser->articleTitleHTMLCodePre = $this->sp_unescapeString($configOptions['articleTitleHTMLCodePre']); 
     692                $parser->articleTitleHTMLCodePost = $this->sp_unescapeString($configOptions['articleTitleHTMLCodePost']); 
     693                $parser->articleBodyHTMLCodePre = $this->sp_unescapeString($configOptions['articleBodyHTMLCodePre']); 
     694                $parser->articleBodyHTMLCodePost = $this->sp_unescapeString($configOptions['articleBodyHTMLCodePost']); 
    684695                $parser->showFeedMetrics = $configOptions['showProcessingMetrics']; 
    685696                $parser->showArticlePublishTimestamp = $configOptions['showArticlePublishTimestamp']; 
     
    705716                    $parser->showContentOnlyInLinkTitle = 'false'; 
    706717                } 
    707         if(isset($customConfigTruncateTitleAtWord)) 
    708         { 
    709             $parser->truncateTitleAtWord = $customConfigTruncateTitleAtWord; 
    710         } 
     718                if(isset($customConfigTruncateTitleAtWord)) 
     719                { 
     720                     $parser->truncateTitleAtWord = $customConfigTruncateTitleAtWord; 
     721                } 
    711722                if($parser->showContentOnlyInLinkTitle == 'true') 
    712723                { 
     
    842853                $parser->articleTitleHTMLCodePre = "<h4>"; 
    843854                $parser->articleTitleHTMLCodePost = "</h4>"; 
     855                $parser->articleBodyHTMLCodePre = "<div>"; 
     856                $parser->articleBodyHTMLCodePost = "</div>"; 
    844857                $parser->showFeedMetrics = 'false'; 
    845858                $parser->customFeedName == ""; 
     
    927940                if (isset($_POST['syndicatePressFeedUrlList'])) { 
    928941                    $configOptions['feedUrlList'] = apply_filters('feedUrlList_save_pre', $_POST['syndicatePressFeedUrlList']); 
    929                     //replace any occurrances of feed:// with http:// 
    930                     $configOptions['feedUrlList'] = str_replace("feed://", "http://", $configOptions['feedUrlList']); 
    931                     $configOptions['feedUrlList'] = trim($configOptions['feedUrlList']); 
     942          //replace any occurrances of feed:// with http:// 
     943          $configOptions['feedUrlList'] = str_replace("feed://", "http://", $configOptions['feedUrlList']); 
     944          $configOptions['feedUrlList'] = trim($configOptions['feedUrlList']); 
    932945                } 
    933946                if (isset($_POST['syndicatePressExclusiveKeywordFilter'])) { 
     
    939952                if (isset($_POST['syndicatePressFeedTitleHTMLCodePre'])) { 
    940953                    $configOptions['feedTitleHTMLCodePre'] = apply_filters('feedTitleHTMLCodePre_save_pre', $_POST['syndicatePressFeedTitleHTMLCodePre']); 
    941                 } 
     954          $configOptions['feedTitleHTMLCodePre'] = mysql_real_escape_string($configOptions['feedTitleHTMLCodePre']); 
     955        } 
    942956                if (isset($_POST['syndicatePressFeedTitleHTMLCodePost'])) { 
    943957                    $configOptions['feedTitleHTMLCodePost'] = apply_filters('feedTitleHTMLCodePost_save_pre', $_POST['syndicatePressFeedTitleHTMLCodePost']); 
    944                 } 
     958          $configOptions['feedTitleHTMLCodePost'] = mysql_real_escape_string($configOptions['feedTitleHTMLCodePost']); 
     959        } 
    945960                if (isset($_POST['syndicatePressArticleTitleHTMLCodePre'])) { 
    946961                    $configOptions['articleTitleHTMLCodePre'] = apply_filters('articleTitleHTMLCodePre_save_pre', $_POST['syndicatePressArticleTitleHTMLCodePre']); 
    947                 } 
     962          $configOptions['articleTitleHTMLCodePre'] = mysql_real_escape_string($configOptions['articleTitleHTMLCodePre']); 
     963        } 
    948964                if (isset($_POST['syndicatePressArticleTitleHTMLCodePost'])) { 
    949965                    $configOptions['articleTitleHTMLCodePost'] = apply_filters('articleTitleHTMLCodePost_save_pre', $_POST['syndicatePressArticleTitleHTMLCodePost']); 
    950                 } 
     966          $configOptions['articleTitleHTMLCodePost'] = mysql_real_escape_string($configOptions['articleTitleHTMLCodePost']); 
     967        } 
     968                if (isset($_POST['syndicatePressArticleBodyHTMLCodePre'])) { 
     969                    $configOptions['articleBodyHTMLCodePre'] = apply_filters('articleBodyHTMLCodePre_save_pre', $_POST['syndicatePressArticleBodyHTMLCodePre']); 
     970          $configOptions['articleBodyHTMLCodePre'] = mysql_real_escape_string($configOptions['articleBodyHTMLCodePre']); 
     971        } 
     972                if (isset($_POST['syndicatePressArticleBodyHTMLCodePost'])) { 
     973                    $configOptions['articleBodyHTMLCodePost'] = apply_filters('articleBodyHTMLCodePost_save_pre', $_POST['syndicatePressArticleBodyHTMLCodePost']); 
     974          $configOptions['articleBodyHTMLCodePost'] = mysql_real_escape_string($configOptions['articleBodyHTMLCodePost']); 
     975        } 
    951976                if (isset($_POST['syndicatePressFeedSeparationHTMLCode'])) { 
    952977                    $configOptions['feedSeparationHTMLCode'] = apply_filters('feedSeparationHTMLCode_save_pre', $_POST['syndicatePressFeedSeparationHTMLCode']); 
    953                     $configOptions['feedSeparationHTMLCode'] = mysql_real_escape_string($configOptions['feedSeparationHTMLCode']); 
     978          $configOptions['feedSeparationHTMLCode'] = mysql_real_escape_string($configOptions['feedSeparationHTMLCode']); 
    954979                } 
    955980                if (isset($_POST['syndicatePressFeedNotAvailableHTMLCode'])) { 
    956981                    $configOptions['feedNotAvailableHTMLCode'] = apply_filters('feedNotAvailableHTMLCode_save_pre', $_POST['syndicatePressFeedNotAvailableHTMLCode']); 
    957                     $configOptions['feedNotAvailableHTMLCode'] = mysql_real_escape_string($configOptions['feedNotAvailableHTMLCode']); 
    958                 } 
     982                  $configOptions['feedNotAvailableHTMLCode'] = mysql_real_escape_string($configOptions['feedNotAvailableHTMLCode']); 
     983        } 
    959984                 
    960                 update_option($this->adminOptionsName, $configOptions); 
    961                 $this->sp_clearFormattedOutputCache(); 
     985        update_option($this->adminOptionsName, $configOptions); 
     986        $this->sp_clearFormattedOutputCache(); 
    962987?> 
    963988            <div class="updated"><p><strong><?php _e("Settings Updated.", "SyndicatePressPlugin");?></strong></p></div>              
     
    10611086     <div class="tabbertab"> 
    10621087        <h2>RSS Feeds</h2> 
     1088        <b>IMPORTANT: As the site admin, you are fully responsible for adhering to all of the Copyright and Terms of Use restrictions for each feed that you syndicate.  You should check with the feed publisher to verify that you can legally syndicate their feed on your website.</b><br><br> 
    10631089        <b><u>List each RSS feed on a single line</u></b> 
    10641090        <div style="padding-left: 20px;"> 
     
    11751201        <b><u>Title formatting:</u></b><br> 
    11761202        <div style="padding-left: 20px;"> 
    1177         <em>You can use html tags to format the feed and article titles... i.e. &lt;h2&gt;title&lt;/h2&gt;</em><br> 
    1178         <input name="syndicatePressFeedTitleHTMLCodePre" size="20" value="<?php _e(apply_filters('format_to_edit',$configOptions['feedTitleHTMLCodePre']), 'SyndicatePressPlugin') ?>">Feed title<input name="syndicatePressFeedTitleHTMLCodePost" size="20" value="<?php _e(apply_filters('format_to_edit',$configOptions['feedTitleHTMLCodePost']), 'SyndicatePressPlugin') ?>"><br> 
    1179         <input name="syndicatePressArticleTitleHTMLCodePre" size="20" value="<?php _e(apply_filters('format_to_edit',$configOptions['articleTitleHTMLCodePre']), 'SyndicatePressPlugin') ?>">Article title<input name="syndicatePressArticleTitleHTMLCodePost" size="20" value="<?php _e(apply_filters('format_to_edit',$configOptions['articleTitleHTMLCodePost']), 'SyndicatePressPlugin') ?>"><br> 
     1203        <em>You can use html tags (including the css style parameter and the script parameter) to format the feed and article titles... i.e. &lt;h2&gt;title&lt;/h2&gt;</em><br> 
     1204        <textarea name="syndicatePressFeedTitleHTMLCodePre" style="width: 40%; height: 50px;"><?php _e($this->sp_unescapeString(apply_filters('format_to_edit',$configOptions['feedTitleHTMLCodePre']), true), 'SyndicatePressPlugin') ?></textarea>Feed title<textarea name="syndicatePressFeedTitleHTMLCodePost" style="width: 40%; height: 50px;"><?php _e($this->sp_unescapeString(apply_filters('format_to_edit',$configOptions['feedTitleHTMLCodePost'])), 'SyndicatePressPlugin') ?></textarea><br> 
     1205        <textarea name="syndicatePressArticleTitleHTMLCodePre" style="width: 40%; height: 50px;"><?php _e($this->sp_unescapeString(apply_filters('format_to_edit',$configOptions['articleTitleHTMLCodePre']), true), 'SyndicatePressPlugin') ?></textarea>Article title<textarea name="syndicatePressArticleTitleHTMLCodePost" style="width: 40%; height: 50px;"><?php _e($this->sp_unescapeString(apply_filters('format_to_edit',$configOptions['articleTitleHTMLCodePost'])), 'SyndicatePressPlugin') ?></textarea><br> 
     1206        </div><br>&nbsp;<br> 
     1207        <b><u>Article body formatting:</u></b><br> 
     1208        <div style="padding-left: 20px;"> 
     1209        <em>You can use html tags (including the css style parameter and the script parameter) to format the article body (content)... i.e. &lt;p&gt;body text&lt;/p&gt;</em><br> 
     1210        <textarea name="syndicatePressArticleBodyHTMLCodePre" style="width: 40%; height: 50px;"><?php _e($this->sp_unescapeString(apply_filters('format_to_edit',$configOptions['articleBodyHTMLCodePre']), true), 'SyndicatePressPlugin') ?></textarea>Article body (content)<textarea name="syndicatePressArticleBodyHTMLCodePost" style="width: 40%; height: 50px;"><?php _e($this->sp_unescapeString(apply_filters('format_to_edit',$configOptions['articleBodyHTMLCodePost'])), 'SyndicatePressPlugin') ?></textarea><br> 
    11801211        </div><br>&nbsp;<br> 
    11811212        <b><u>Custom feed separation code:</u></b><br> 
     
    12671298        <b><u>Community forum help</u></b> 
    12681299        <p style="padding-left: 20px;"> 
    1269         With over 5500 installations of Syndicate Press across the world, we are starting to get a fairly active forum where you can ask questions.   
     1300        With over 18000 downloads of Syndicate Press across the world, we are starting to get a fairly active forum where you can ask questions.   
    12701301        The Syndicate Press developers and testers regularly read the forum questions and respond with ideas and help.           
    12711302        </p> 
     
    12741305        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> 
    12751306        <i>We request a donation to Syndicate Press for personalized support.</i> 
     1307        </p>         
     1308        <b><u>Export Settings</u></b> 
     1309        <p style="padding-left: 20px;"> 
     1310        Click <a id="displayText" href="javascript:toggle('exportSettingsDiv');">here</a> to see all of your current Syndicate Press settings.  Copy the text and then include it in your support email.</b><br> 
     1311 
     1312<script language="javascript">  
     1313function toggle(elementId) { 
     1314    var ele = document.getElementById(elementId); 
     1315    var text = document.getElementById("displayText"); 
     1316    if(ele.style.display == "block") { 
     1317            ele.style.display = "none"; 
     1318        text.innerHTML = "show"; 
     1319    } 
     1320    else { 
     1321        ele.style.display = "block"; 
     1322        text.innerHTML = "hide"; 
     1323    } 
     1324}  
     1325</script> 
     1326 
     1327         <div id="exportSettingsDiv" style="display: none"> 
     1328         <h3>Your current Syndicate Press settings</h3> 
     1329         <textarea style="width: 95%; height: 300px;"> 
     1330            <?php  
     1331                 foreach($configOptions as $key=>$value) 
     1332                 { 
     1333                   print "$key = $value\r\n"; 
     1334                 } 
     1335            ?> 
     1336         </textarea> 
     1337         </div> 
    12761338        </p> 
    12771339     </div> 
Note: See TracChangeset for help on using the changeset viewer.