Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ollybach

    (@ollybach)

    >This widget works great so far but is it possible to display Top Albums of a particular genre?

    as is: no

    >Will you be adding support for this soon

    there are no plans to do that.
    this widget was built quite some time ago for a particular need i had (i.e showing albums and whatnot of a particular artist).
    it was also the first wordpress plugin i ever built and it definitely is a bit convoluted in places. (i.e i would build this quite differently if i were to do this again today with the stuff i know now how wordpress does things)

    either way.
    the place to look at (if memory serves me right) is in ajax/get-json.php
    aon approx line 220 , you’ll find:

    $requesturl=''.$baseUrl.''.implode("&",$cUrlGetVars).'';

    which will construct the url sent to apple to get the relevant reults (which btw looks something like this

    https://itunes.apple.com/lookup?id=32940&country=GB&lang=en_us&explicit=Yes&entity=album,movie,podcast,audiobook,ebook,software,tvSeason,song&limit=200&version=2

    rather than the webobjects stuff you posted see: https://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html)

    if i were you and wanted to play with this stuff, i would do somthing like the following:

    ABOVE the $requesturl variable I was talking above, i would insert

    $cUrlGetVars = apply_filters('ilw_filter_request', $cUrlGetVars);

    now, in your themes functions.php add something like this to play around without having to mess around any further with the core files.

    add_filter('ilw_filter_request', 'my_ilw_request',10,2);
    	function my_ilw_request($cUrlGetVars,$postVars) {
    	/************************************************
    		change the vars as appropriate here depending
    		on whatever was posted etc
    	************************************************/
    
    	return $cUrlGetVars;
    	}

    the above should get you on the way i would have thought

    hope that helps

    Thread Starter dporchia

    (@dporchia)

    Thanks for the fast response. I’ll look into this and see what I can put together.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Support for Top Albums, Genre, etc?’ is closed to new replies.