Plugin Directory

Changeset 756963


Ignore:
Timestamp:
08/16/2013 02:28:38 AM (13 years ago)
Author:
sealsystems
Message:

6.3.1

  • Changed: Requires WordPress 3.6 or higher (Older installations please use version 6.2.1)
  • Added: Now handles new Apple RSS link formats
  • Fixed: Description of Mac Screenshots no longer reads iPhone Screenshots
  • Fixed: Recognition of Mac apps
  • Changed: Uses size_format instead of internal function (Requires WP3.6+)
  • Changed: Switch to WordPress included version of SimplePie
  • Fixed: Error displayed if you had the wrong mode tag in the asaf_atomfeed shortcode
  • Fixed: Cacheing of RSS Feed data

6.3.0

  • Changed: Apple has changed from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply)
  • REMOVED: LinkShare/linksynergy & DGM Affiliate Programs
  • Added: No Title element mode: Same as Regular except the title is omitted. (Handy for themes that remove formatting.)
  • Fixed: Screenshots not displaying because of a broken URL
  • Changed: Processing of elements order, there is now just SingleApp or ListOfApps
  • Changed: Order of elements in preferences (Collapsable items are now listed together)
  • Added: Icon support for iPhone 5S & iPhone 6
  • Changed: Simplified "Supported Devices" layout and settings
  • Changed: Rewrite the output routine that displays app elements.
  • Fixed: Game Center icon placement
Location:
app-store-assistant
Files:
4 deleted
4 edited
37 copied

Legend:

Unmodified
Added
Removed
  • app-store-assistant/tags/6.3.1/app-store-assistant.php

    r756516 r756963  
    22/*
    33Plugin Name: App Store Assistant
    4 Version: 6.3.0
     4Version: 6.3.1
    55Text Domain: appStoreAssistant
    66Plugin URI: http://TheiPhoneAppsList.com/
     
    2222// --------------------------------------------------------------------------------------
    2323require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-functions.php');
    24 require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc');
     24//require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc');
    2525require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-admin_functions.php');
    2626require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-amazon_functions.php');
  • app-store-assistant/tags/6.3.1/includes/app-store-admin_functions.php

    r756516 r756963  
    974974    $plugin_data = get_plugin_data( ASA_MAIN_FILE, false );
    975975
    976     if ( version_compare($wp_version, "3.3", "<" ) ) {
     976    if ( version_compare($wp_version, "3.6", "<" ) ) {
    977977        if( is_plugin_active($plugin) ) {
    978978            deactivate_plugins( $plugin );
    979             wp_die( "'".$plugin_data['Name']."' requires WordPress 3.3 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." );
     979            wp_die( "'".$plugin_data['Name']."' requires WordPress 3.6 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />(Older installations please use version 6.2.1)<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." );
    980980        }
    981981    }
  • app-store-assistant/tags/6.3.1/includes/app-store-functions.php

    r756516 r756963  
    540540    $app->mode = $mode;
    541541    $app->more_info_text = $more_info_text;
     542    if($app->kind == 'mac-software') $platform = 'mac_app';
    542543    $app->platform = $platform;
    543544    $element = "";
     
    690691        $platform = $mode.'_app';
    691692    }
    692    
    693     $last = $atomurl[strlen($atomurl)-1];
    694     if($last != "/") $AddSlash = "/";
    695     $RSS_Feed = $atomurl.$AddSlash."xml";
     693    $originalatomurl = $atomurl;
     694
     695    if(substr($atomurl,-7,7) == "rss.xml" || substr($atomurl,-8,8) == "rss.xml/") {
     696        if(substr($atomurl,-8,8) == "rss.xml/") $atomurl = substr($atomurl,0,-1);
     697    } else {
     698        $last = $atomurl[strlen($atomurl)-1];
     699        if($last != "/") $AddSlash = "/";
     700        $atomurl = $atomurl.$AddSlash."xml";
     701    }
     702   
     703    //$overidecache = true;
     704   
    696705   
    697706    //Check to see if feed is available cached
    698     $appStore_feedID = "appStore_rssfeed_".hash('md2', $RSS_Feed);
     707    $appStore_feedID = "appStore_rssfeed_".hash('md2', $atomurl);
    699708    $appStore_feedOptions = get_option($appStore_feedID, '');       
    700709   
    701     if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time()) {
     710    if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time() || $overidecache) {
    702711        $STAT = "REBUILT CACHE";
    703712        // Get Array of AppIDs for ATOM Feed
    704         $appIDs = appStore_getIDs_from_feed($RSS_Feed);
    705         $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $RSS_Feed, 'appIDs' => $appIDs);
     713        $appIDs = appStore_getIDs_from_feed($atomurl);
     714        $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $atomurl, 'appIDs' => $appIDs);
    706715        update_option($appStore_feedID, $appStore_feedOptions);
    707716    } else {
     
    712721    //Pair down array to number of apps preference
    713722    array_splice($appIDs, appStore_setting('qty_of_apps'));
    714 
    715723    //Load App data
    716724    $appListDisplay = '';
    717725    foreach($appIDs as $appID) {
    718726        //$appListDisplay .= "<hr><<<<<<<[$appID]>>>>>>><br />";
    719         if($appID == "" || !is_numeric($appID)) return;
     727        if($appID == "" || !is_numeric($appID)) return "This list is currently empty.";
    720728        $app = appStore_get_data($appID);
     729               
    721730        if($app) {
    722             if(stristr($mode, 'itunes')) {
     731            if($platform == 'itunes') {
    723732                $appListDisplay .= iTunesStore_page_output($app,$more_info_text,"ListOfApps",$platform).'<hr>';
    724733            } else {
     
    733742
    734743// ------------START OF MAIN FUNCTIONS-----------------
    735 function iTunesStore_page_output($iTunesItem, $more_info_text,$mode="internal",$platform="itunes") {
     744function iTunesStore_page_output($iTunesItem, $more_info_text,$mode="SingleApp",$platform="itunes") {
    736745    GLOBAL $is_iphone;
     746   
     747   
    737748    // Start capturing output so the text in the post comes first.
    738749    ob_start();
     
    898909    }
    899910    $app->more_info_text = $more_info_text;
     911    if($app->kind == 'mac-software') $platform = 'mac_app';
    900912    $app->platform = $platform;
    901913    $app->mode = $mode;
     
    983995    if(count($app->screenshotUrls) > 0) {
    984996       
    985             if($app->platform=="mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant);
    986             if($app->platform=="ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant);
     997            if($app->platform == "mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant);
     998            if($app->platform == "ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant);
    987999           
    9881000            // appStore-screenshots-iphone
     
    10231035            return $element;
    10241036        }
     1037       
    10251038        if($valid_Screenshots_iPhone) $element .= getAccordionCode ($elementLoop_iPhone, "appStore-screenshots-iphone", $displayMode,$title_iPhone);
    10261039        if($valid_Screenshots_iPad) $element .= getAccordionCode ($elementLoop_iPad, "appStore-screenshots-ipad", $displayMode,$title_iPad);
     
    14071420    $elementFileSize = '';
    14081421    if (!empty($app->fileSizeBytes)) {
    1409         $elementFileSize =  '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '.filesizeinfo($app->fileSizeBytes).'</li>';
     1422        $elementFileSize =  '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '.size_format($app->fileSizeBytes).'</li>';
    14101423    }
    14111424    $elementUniversal = '';
     
    14201433    $appCategory = $app->genres;
    14211434    $appCategoryPrime = $app->primaryGenreName;
    1422     $appCategoryList = implode(', ', $appCategory);
     1435    if(is_array($appCategory)) $appCategoryList = implode(', ', $appCategory);
    14231436    if (!empty($appCategory)) {
    14241437        $wordForCategories = sprintf( _n('Category', 'Categories', count($appCategory), appStoreAssistant), count($appCategory) );
     
    16461659}
    16471660
     1661function appStore_cache_seconds($seconds) {
     1662    return appStore_setting('cache_time_select_box');
     1663}
     1664
     1665
    16481666function appStore_getIDs_from_feed($atomurl) {
    1649     $last = $atomurl[strlen($atomurl)-1];
    1650     if($last != "/") $AddSlash = "/";
    1651     $urlEnd = 'xml';
    1652     $RSS_Feed = $atomurl.$AddSlash.$urlEnd;
    1653     $feed = new SimplePie();
    1654     $feed->set_feed_url($RSS_Feed);
    1655     $feed->init();
    1656     $feed->handle_content_type();
    1657     foreach ($feed->get_items() as $item):
     1667
     1668    add_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' );
     1669    $rss = fetch_feed($atomurl);
     1670    remove_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' );
     1671    if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly
     1672        // Figure out how many total items there are, but limit it to appStore_setting('qty_of_apps').
     1673        $maxitems = $rss->get_item_quantity( appStore_setting('qty_of_apps') );
     1674        // Build an array of all the items, starting with element 0 (first element).
     1675        $rss_items = $rss->get_items( 0, $maxitems );
     1676    endif;
     1677       
     1678    foreach ($rss_items as $item):
    16581679        $appID =  $item->get_id();
    16591680        $pattern = '(id[0-9]+)';
     
    16631684    return $appIDs;
    16641685}
    1665 
    16661686
    16671687function appStore_page_get_json($id) {
     
    19331953     return $string;
    19341954}
    1935 
    1936 function filesizeinfo($fs) {
    1937     $bytes = array('KB', 'KB', 'MB', 'GB', 'TB');
    1938     // values are always displayed in at least 1 kilobyte:
    1939     if ($fs <= 999) $fs = 1;
    1940     for ($i = 0; $fs > 999; $i++) {
    1941         $fs /= 1024;
    1942     }
    1943    
    1944     return ceil($fs)." ".$bytes[$i];
    1945 }
    19461955?>
  • app-store-assistant/tags/6.3.1/readme.txt

    r756516 r756963  
    55Requires at least: 3.6
    66Tested up to: 3.6
    7 Stable tag: 6.3.0
     7Stable tag: 6.3.1
    88License: GPLv3 or later
    99
     
    110110* Added: Shortcode tags can now overide the Store/Language chosen [Thanks crisf86]
    111111* Added: Option to add a position number for the results from a ATOM feed [Thanks 2020media]
    112 * Changed: Switch to included SimplePie
    113112* Changed: Sped up Reset of Featured Images (Using log system)
    114113* Changed: Accepted jpeg for images
     
    119118
    120119== Changelog ==
     120
     121= 6.3.1 =
     122* Changed: Requires WordPress 3.6 or higher (Older installations please use version 6.2.1)
     123* Added: Now handles new Apple RSS link formats
     124* Fixed: Description of Mac Screenshots no longer reads iPhone Screenshots
     125* Fixed: Recognition of Mac apps
     126* Changed: Uses size_format instead of internal function (Requires WP3.6+)
     127* Changed: Switch to WordPress included version of SimplePie
     128* Fixed: Error displayed if you had the wrong mode tag in the asaf_atomfeed shortcode
     129* Fixed: Cacheing of RSS Feed data
    121130
    122131= 6.3.0 =
     
    541550In Version 6.0.6 the Image system has been replaced. It is recommended that you clear the caches AFTER upgrading.
    542551
    543 In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply)
     552In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply). THIS VERSION REQUIRES WordPress 3.6 or later!!!!!
    544553
    545554== Note ==
  • app-store-assistant/trunk/app-store-assistant.php

    r756516 r756963  
    22/*
    33Plugin Name: App Store Assistant
    4 Version: 6.3.0
     4Version: 6.3.1
    55Text Domain: appStoreAssistant
    66Plugin URI: http://TheiPhoneAppsList.com/
     
    2222// --------------------------------------------------------------------------------------
    2323require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-functions.php');
    24 require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc');
     24//require_once(ASA_PLUGIN_INCLUDES_PATH.'simplepie.inc');
    2525require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-admin_functions.php');
    2626require_once(ASA_PLUGIN_INCLUDES_PATH.'app-store-amazon_functions.php');
  • app-store-assistant/trunk/includes/app-store-admin_functions.php

    r756516 r756963  
    974974    $plugin_data = get_plugin_data( ASA_MAIN_FILE, false );
    975975
    976     if ( version_compare($wp_version, "3.3", "<" ) ) {
     976    if ( version_compare($wp_version, "3.6", "<" ) ) {
    977977        if( is_plugin_active($plugin) ) {
    978978            deactivate_plugins( $plugin );
    979             wp_die( "'".$plugin_data['Name']."' requires WordPress 3.3 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." );
     979            wp_die( "'".$plugin_data['Name']."' requires WordPress 3.6 or higher, and has been deactivated! Please upgrade WordPress and try again.<br /><br />(Older installations please use version 6.2.1)<br /><br />Back to <a href='".admin_url()."'>WordPress admin</a>." );
    980980        }
    981981    }
  • app-store-assistant/trunk/includes/app-store-functions.php

    r756516 r756963  
    540540    $app->mode = $mode;
    541541    $app->more_info_text = $more_info_text;
     542    if($app->kind == 'mac-software') $platform = 'mac_app';
    542543    $app->platform = $platform;
    543544    $element = "";
     
    690691        $platform = $mode.'_app';
    691692    }
    692    
    693     $last = $atomurl[strlen($atomurl)-1];
    694     if($last != "/") $AddSlash = "/";
    695     $RSS_Feed = $atomurl.$AddSlash."xml";
     693    $originalatomurl = $atomurl;
     694
     695    if(substr($atomurl,-7,7) == "rss.xml" || substr($atomurl,-8,8) == "rss.xml/") {
     696        if(substr($atomurl,-8,8) == "rss.xml/") $atomurl = substr($atomurl,0,-1);
     697    } else {
     698        $last = $atomurl[strlen($atomurl)-1];
     699        if($last != "/") $AddSlash = "/";
     700        $atomurl = $atomurl.$AddSlash."xml";
     701    }
     702   
     703    //$overidecache = true;
     704   
    696705   
    697706    //Check to see if feed is available cached
    698     $appStore_feedID = "appStore_rssfeed_".hash('md2', $RSS_Feed);
     707    $appStore_feedID = "appStore_rssfeed_".hash('md2', $atomurl);
    699708    $appStore_feedOptions = get_option($appStore_feedID, '');       
    700709   
    701     if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time()) {
     710    if($appStore_feedOptions == '' || $appStore_feedOptions['next_check'] < time() || $overidecache) {
    702711        $STAT = "REBUILT CACHE";
    703712        // Get Array of AppIDs for ATOM Feed
    704         $appIDs = appStore_getIDs_from_feed($RSS_Feed);
    705         $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $RSS_Feed, 'appIDs' => $appIDs);
     713        $appIDs = appStore_getIDs_from_feed($atomurl);
     714        $appStore_feedOptions = array('next_check' => time() + appStore_setting('cache_time_select_box'), 'feedURL' => $atomurl, 'appIDs' => $appIDs);
    706715        update_option($appStore_feedID, $appStore_feedOptions);
    707716    } else {
     
    712721    //Pair down array to number of apps preference
    713722    array_splice($appIDs, appStore_setting('qty_of_apps'));
    714 
    715723    //Load App data
    716724    $appListDisplay = '';
    717725    foreach($appIDs as $appID) {
    718726        //$appListDisplay .= "<hr><<<<<<<[$appID]>>>>>>><br />";
    719         if($appID == "" || !is_numeric($appID)) return;
     727        if($appID == "" || !is_numeric($appID)) return "This list is currently empty.";
    720728        $app = appStore_get_data($appID);
     729               
    721730        if($app) {
    722             if(stristr($mode, 'itunes')) {
     731            if($platform == 'itunes') {
    723732                $appListDisplay .= iTunesStore_page_output($app,$more_info_text,"ListOfApps",$platform).'<hr>';
    724733            } else {
     
    733742
    734743// ------------START OF MAIN FUNCTIONS-----------------
    735 function iTunesStore_page_output($iTunesItem, $more_info_text,$mode="internal",$platform="itunes") {
     744function iTunesStore_page_output($iTunesItem, $more_info_text,$mode="SingleApp",$platform="itunes") {
    736745    GLOBAL $is_iphone;
     746   
     747   
    737748    // Start capturing output so the text in the post comes first.
    738749    ob_start();
     
    898909    }
    899910    $app->more_info_text = $more_info_text;
     911    if($app->kind == 'mac-software') $platform = 'mac_app';
    900912    $app->platform = $platform;
    901913    $app->mode = $mode;
     
    983995    if(count($app->screenshotUrls) > 0) {
    984996       
    985             if($app->platform=="mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant);
    986             if($app->platform=="ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant);
     997            if($app->platform == "mac_app") $title_iPhone = __("Mac Screenshots",appStoreAssistant);
     998            if($app->platform == "ios_app") $title_iPhone = __("iPhone Screenshots",appStoreAssistant);
    987999           
    9881000            // appStore-screenshots-iphone
     
    10231035            return $element;
    10241036        }
     1037       
    10251038        if($valid_Screenshots_iPhone) $element .= getAccordionCode ($elementLoop_iPhone, "appStore-screenshots-iphone", $displayMode,$title_iPhone);
    10261039        if($valid_Screenshots_iPad) $element .= getAccordionCode ($elementLoop_iPad, "appStore-screenshots-ipad", $displayMode,$title_iPad);
     
    14071420    $elementFileSize = '';
    14081421    if (!empty($app->fileSizeBytes)) {
    1409         $elementFileSize =  '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '.filesizeinfo($app->fileSizeBytes).'</li>';
     1422        $elementFileSize =  '<li class="appStore-filesize">'.__("File Size",appStoreAssistant).': '.size_format($app->fileSizeBytes).'</li>';
    14101423    }
    14111424    $elementUniversal = '';
     
    14201433    $appCategory = $app->genres;
    14211434    $appCategoryPrime = $app->primaryGenreName;
    1422     $appCategoryList = implode(', ', $appCategory);
     1435    if(is_array($appCategory)) $appCategoryList = implode(', ', $appCategory);
    14231436    if (!empty($appCategory)) {
    14241437        $wordForCategories = sprintf( _n('Category', 'Categories', count($appCategory), appStoreAssistant), count($appCategory) );
     
    16461659}
    16471660
     1661function appStore_cache_seconds($seconds) {
     1662    return appStore_setting('cache_time_select_box');
     1663}
     1664
     1665
    16481666function appStore_getIDs_from_feed($atomurl) {
    1649     $last = $atomurl[strlen($atomurl)-1];
    1650     if($last != "/") $AddSlash = "/";
    1651     $urlEnd = 'xml';
    1652     $RSS_Feed = $atomurl.$AddSlash.$urlEnd;
    1653     $feed = new SimplePie();
    1654     $feed->set_feed_url($RSS_Feed);
    1655     $feed->init();
    1656     $feed->handle_content_type();
    1657     foreach ($feed->get_items() as $item):
     1667
     1668    add_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' );
     1669    $rss = fetch_feed($atomurl);
     1670    remove_filter( 'wp_feed_cache_transient_lifetime' , 'appStore_cache_seconds' );
     1671    if ( ! is_wp_error( $rss ) ) : // Checks that the object is created correctly
     1672        // Figure out how many total items there are, but limit it to appStore_setting('qty_of_apps').
     1673        $maxitems = $rss->get_item_quantity( appStore_setting('qty_of_apps') );
     1674        // Build an array of all the items, starting with element 0 (first element).
     1675        $rss_items = $rss->get_items( 0, $maxitems );
     1676    endif;
     1677       
     1678    foreach ($rss_items as $item):
    16581679        $appID =  $item->get_id();
    16591680        $pattern = '(id[0-9]+)';
     
    16631684    return $appIDs;
    16641685}
    1665 
    16661686
    16671687function appStore_page_get_json($id) {
     
    19331953     return $string;
    19341954}
    1935 
    1936 function filesizeinfo($fs) {
    1937     $bytes = array('KB', 'KB', 'MB', 'GB', 'TB');
    1938     // values are always displayed in at least 1 kilobyte:
    1939     if ($fs <= 999) $fs = 1;
    1940     for ($i = 0; $fs > 999; $i++) {
    1941         $fs /= 1024;
    1942     }
    1943    
    1944     return ceil($fs)." ".$bytes[$i];
    1945 }
    19461955?>
  • app-store-assistant/trunk/readme.txt

    r756516 r756963  
    55Requires at least: 3.6
    66Tested up to: 3.6
    7 Stable tag: 6.3.0
     7Stable tag: 6.3.1
    88License: GPLv3 or later
    99
     
    110110* Added: Shortcode tags can now overide the Store/Language chosen [Thanks crisf86]
    111111* Added: Option to add a position number for the results from a ATOM feed [Thanks 2020media]
    112 * Changed: Switch to included SimplePie
    113112* Changed: Sped up Reset of Featured Images (Using log system)
    114113* Changed: Accepted jpeg for images
     
    119118
    120119== Changelog ==
     120
     121= 6.3.1 =
     122* Changed: Requires WordPress 3.6 or higher (Older installations please use version 6.2.1)
     123* Added: Now handles new Apple RSS link formats
     124* Fixed: Description of Mac Screenshots no longer reads iPhone Screenshots
     125* Fixed: Recognition of Mac apps
     126* Changed: Uses size_format instead of internal function (Requires WP3.6+)
     127* Changed: Switch to WordPress included version of SimplePie
     128* Fixed: Error displayed if you had the wrong mode tag in the asaf_atomfeed shortcode
     129* Fixed: Cacheing of RSS Feed data
    121130
    122131= 6.3.0 =
     
    541550In Version 6.0.6 the Image system has been replaced. It is recommended that you clear the caches AFTER upgrading.
    542551
    543 In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply)
     552In Version 6.3.0 Apple has switched from LinkShare to PHG (Apply Here: http://affiliate.itunes.apple.com/apply). THIS VERSION REQUIRES WordPress 3.6 or later!!!!!
    544553
    545554== Note ==
Note: See TracChangeset for help on using the changeset viewer.