Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Adam D

    (@adamdionne)

    Good idea! I will add that in an update ASAP.

    Plugin Author Adam D

    (@adamdionne)

    Hi Matthijs,

    If that is correctly in your post’s/page’s custom fields, you should just be able to add any AppStore Lookup shortcode to that post and see what you’re looking for.

    Where to add the appId in the post: https://i.imgur.com/ag9opRZ.png

    Example of what to add to the post after that:

    [asl_icon]

    Let me know if that sorts you out, and if you have additional questions, check out the more in-depth examples at https://adamdionne.ca/appstore-lookup-plugin/ or drop me a line directly via the site.

    Thanks!
    -Adam

    Plugin Author Adam D

    (@adamdionne)

    The image caches can be turned off in settings by deselecting TimThumb. This will slow down page loads, but that is the only impact. HOWEVER, Apple’s API has a request limit, after which they will temporarily block you. This is why the caching of that request data [the ones that start with asl_####] happens by default and doesn’t have an option to be turned off in the plugin.

    If you delete the cache files (or indeed the entire cache folder) everything will work just fine, but they will be regenerated as visitors come to the site, which is not what you are wanting.

    That said:

    If you really want to turn off the API caching, and you’re willing to deal with periodic outages if your site hits the request limit, you can go into asl.php at line 403 and replace this:

    function asl_get_content($url) {
    
    	// add cache directory if not exists
    	$cacheDir = dirname(__FILE__).'/cache';
    
    	 if($cacheDir){
    			if(! is_dir($cacheDir)){
    				@mkdir($cacheDir);
    				if(! is_dir($cacheDir)){
    					$this->error("Could not create the file cache directory.");
    					return false;
    				}
    			}
    	 }
    
    	//vars
    	$mins = asl_setting('json_cache');
    	$cache = dirname(__FILE__).'/cache/asl_'.md5($url).'.txt';
    	$current_time = time(); $expire_time = $mins * 60; $file_time = @filemtime($cache);
    	//do we use the cache or the file?
    	if(file_exists($cache) && ($current_time - $expire_time < $file_time)) {
    		//echo 'returning from cached file';
    		return file_get_contents($cache);
    	}
    	else {
    		$content = asl_fopen_or_curl($url);
    		file_put_contents($cache, $content);
    		return file_get_contents($cache);
    	}
    }

    with the much simpler:

    function asl_get_content($url) {
    		$content = asl_fopen_or_curl($url);
    		return file_get_contents($content);
    }

    If your site gets a lot of traffic and makes a lot of requests, you may see temporary issues where you won’t get app data.

    Plugin Author Adam D

    (@adamdionne)

    Hey,

    The list is created using the following structure by default:

    <ul class="asl-screenshot-list">
    		<li class="asl-app-screenshot"><img src="LINK"  alt="App Screenshot" width="480"/></li>
    </ul>

    You can use the asl-screenshot-list and asl-app-screenshot classes in your theme’s style.css to customize the look. To remove the bullet points, try:

    ul.asl-screenshot-list { list-style-type:none; }

    To answer your second question:

    Unfortunately, the Google Play store doesn’t have a convenient Search API like Apple does, so I don’t have anything for that right now. I am still looking into options for putting a plugin together for that at some point.

    Plugin Author Adam D

    (@adamdionne)

    Hey jcoleman71,

    In version 1.3.2, a missing appId will no longer cause the page to stop loading. Instead, we’ll now load around it as though all is well, and any content will just be left blank.

    It doesn’t redirect to a 404; in the post loop or list of apps (as you have) that would make it redirect the entire page if one app id was mistyped or the app pulled from the store. The rest of the content on that page would be unavailable until you removed the shortcode, and there would be no clear indication of what app id was the issue.

    A future version will likely include some sort of error logging to notify the site admin when app ids are not working.

    Hope this helps!

    -Adam

    Plugin Author Adam D

    (@adamdionne)

    Hm, good point. That error message will definitely cause problems in the post loop.

    I will push out an update this week that will make that message a little more friendly and stop it from breaking everything.

    Plugin Author Adam D

    (@adamdionne)

    For that you are at the mercy of the app itself. iTunes automatically rounds the corners so many app developers will leave the app icon square.

    I recommend using CSS’ border-radius property to match the rounded corners
    The actual radius value will depend on the size you are setting.

    Plugin Author Adam D

    (@adamdionne)

    v1.3.1 is up and contains a fix for this issue.

    Plugin Author Adam D

    (@adamdionne)

    Thanks!

    I see where the problem is and will fix as soon as possible. Should be an update very soon.

    Plugin Author Adam D

    (@adamdionne)

    The appId can most easily be found by looking up the app in iTunes Connect (if it’s your app) or using the iTunes Link. You can copy the link address through the drop down arrow next to the app’s price in iTunes.

    The iTunes link contains the id:

    URL: https://itunes.apple.com/ca/app/yelp/id284910350?mt=8
    ID: 284910350

    Plugin Author Adam D

    (@adamdionne)

    Hey,

    I’ll look into this ASAP.

    If you remove the id= from the short code does it work? You shouldn’t require it as long as appId is set for that post.

    Plugin Author Adam D

    (@adamdionne)

    Hi,

    The first step is to create a custom post attribute. You can do this on a specific post by putting it in the Custom Fields.

    Name must be appId, and the value is your App ID, eg: 476468390.

    After that, the shortcodes for that post no longer require the id= attribute, and can be used simply as follows: [asl_icon]. You can still use other shortcode parameters as usual.

    Using this feature also automatically adds an App Smart Banner to your page for the appropriate app.

    Note: As of WordPress 3.1, the Custom Fields box is hidden by default, but is accessible by the Screen Options tab at the top of the page.

Viewing 12 replies - 1 through 12 (of 12 total)