Updates: PRO Version 3.3.6

As many users asked for more features or reported bug, updates come along:
Version 3.3.6 (Mar 20 2017): Degbug per page, Bugfixes

  • New Shortcode-Parameter:
    Prior to version 3.3.6 there was either debug=on or off for the whole page. Now you can set the debugmode at every shortcode by “debugmode=NUMBER”. NUMBER=2 shows some debug infos, NUMBER=10 all available debug infos.
  • Bugfixes:
    When using method=curlget with Pluginoption “Accept-Header” a fatal error resulted. And: Under some circumstances not set parameters caused WordPress-Notice-Errors.

Version 3.3.5 (Mar 3 2017): Curl, HTTP-Header, JSON, Cache

  • Connect API via curl:
    This Plugin tries to get JSON-data from an URL / API. The default for doing this is GET or POST done by the functions WordPress provides. Or by the basic PHP-functions. With this a 5th way comes into the game: curl. With curl you can do several authentication-ways for APIs and much more.
  • Try to heal JSON:
    Some APIs / URLs deliver invalid JSON (invalid in the sense PHP-libraries can’t handle it). This is due to invalid Characters before or after the first square or curled brackets. When setting “trytohealjson=yes” inside [jsoncontentimporter] those Characters are emoved from the JSON before used in the Plugin.
  • Caching via Shortcode:
    Before Version 3.3.5 all Cache-Settings were in the Plugin-Options and valid for all URLs. Now you can add “cachetime=120” in the [jsoncontentimporter] to set the cachetime for this Shortcode to 120 seconds – regardless of the settings in the plugin-option, even when caching is switched of there.
  • [jsoncontentimporterpro] inside a [jsoncontentimporterpro]
    Before Version 3.3.5 is was prohibited to use [jsoncontentimporterpro] inside a [jsoncontentimporterpro] to avoid infinite loops right from the start. As some users need this, this is now possible.

Version 3.3.4 (Jan 29 2017): XML-APIs, Bugfixies

  • Sometimes APIs deliver data in XML and not in JSON. If so add “inputtype=xml” as Shortcode-Attribute. Then the Plugin tries to convert XML into JSON: Switch on the full debugmode and you’ll see what JSON the XML-data is. Add a template for that JSON…
  • Fixing of some bugs: In WordPress-Debugmode some Notice-Messages occur.

Version 3.3.3 (Jan 28 2017): New features

  • To display Google-Drive-Spreadsheets in WordPress requires one new feature: The Google-Drive-Spreadsheet-JSON comes with lots of “$” in the JSON. twig does not like that as “$” ist a key-char for twig/PHP. So the easy solution is to replace all “$” in the JSON by “_symbol_dollar_”. Hence in the twig-Code also “_symbol_dollar_” has to be used. see Example here
  • You can pass GET- (and POST-) variables via WordPress to the Plugin and then to the API to do things like search. Yet one plugin-user wanted to use an GET-Array (e.g. “http://…?…&filter[[postcode]]=abc”): This updates adds the handling of this. see Example here

Version 3.3.2 (Jan 20 2017):

  • twig-extension “dateformat” extended: Before only unix-timestamp-data could be used with that. Now common date- and times-formats in the JSON-data can be displayed depending on the timezone and language See example here.

Version 3.3.1 (Jan 14 2017):

  • Convert JSON to another feed, XML, JSON whatever: This can be done by defining a twig-template and display the result by adding “?show=oc” or “&show=oc”. See example here.
  • twig-extension “dateformat”: Now date and times can be displayed depending on the timezone and language (not in twig-default possible, but with this extension). See example here.
  • New shortcode “urlgetaddrandom”: If set to “yes” the plugin adds random number to every GET-URL-request. This is to change the JSON-URL and for busting a API cache.
  • Plugin ok with WordPress 4.7.1

Version 3.3.0 (Dec 18 2016):

  • Sort JSON with Twig-templateengine-extension sortbyjsonfield: Rearrange the JSON you get from the API by this.
  • “raw”-retrieve API/JSON: Use direct http-GET/POST instead of WordPress-GET/POST. Some APIs don’t want the WordPress-GET/POST as some WordPress-Data is added by WordPress in the header.
  • If all licences are in use somewhere else: Show this – in earlier versions you can’t see that the plugin-activation fails because of this.
  • Improved switching off of wpautop: Try this if you get unwanted linefeeds in your output.
  • Usage if Twig-Code in the WordPress-editor improved: Before Twig-Syntax-quotationmarks are converted to their HTML-Code- this is corrupting the Twig-code and leads to an error.

Version 3.2.2 (Oct 29 2016):

  • JSON-Feeds are pairs of keys and values. If the key in an JSON-Feed uses @ or ! the twig-template engine can’t handle this. This update makes this working:
    Use “_symbol_at_” or “_symbol_exclamationmark_” in the twig-template for the @ or ! character.
  • When copypasting example-code for the plugin, often wrong / invalid quotation marks are inserted. Result: Invalid shortcode attribute-values like url. This update filters removes invalid quotation marks at the beginning and end of an attribute-value.

Version 3.2.1 (Sept 20 2016):

  • Bugfix using the JCI-widget.
    You can insert JSON-data into the widget-sidebar in two ways.
    One is using the JCI-widget (a bug there is fixed by this update) or via Text-widget and the usual shortcode as used on pages.

Version 3.2.0 (Sept 18 2016):

Version 3.1.2 (July 22 2016):

Version 3.1.1 (July 2 10 2016):

  • Bug fix at urlparam-usage fixed (only one urlparam was possible due to bug, now as many as needed are possible)

Version 3.1 (June 10 2016):

Version 3.0.4 (May 18 2016):

  • bug fixed

Version 3.0.3 (May 18 2016):

  • If you want to use a searchform and asking the answer from a JSON-API in the background here’s the way: create a searchform in a twig-template followed by the JSON-data. Use {urlparam.”name of variable to be searched”} to insert the search-text in the form
  • Plugin is ok with WordPress 4.5.2
  • some php-installations do not have the PHP-function mb_check_encoding: then a alternative funtions comes into the game

Version 3.0.2 (April 25 2016):

  • Bugfixes for errorhandling: defect JSON-feeds cause display of user-errormessage (defined in options)
  • Improved debug mode: switching from text- to visual-mode in the wordpress-editor might destroy your twig template.
    Advice: Use the template-manager whenever possible, avoid encapsulating the template at the shortcode directl
  • POST-requests: add method=”post” as shortcode-parameter. Then the JSON-feed is retrieved via POST (instead of GET).
  • handling of shortcode-parameter “fileext”: If fileext starts with an “?” the value is added to the url as parameter, not as file-extension.
    E.g. define fileext=”?apikey=007″ and you can pass such data like api-keys to the JSON-feed.

Version 3.0.1 (March 23 2016):

  • Bugfixes for widgets and twig handling
  • Better check of twig-template: Display errors in debug mode
  • Update: If you use Version 3.0.0, update please.
  • Update: If Version 2.0.17 is working, this update is not a must. Nevertheless you should update at some time 😉
  • In very rare cases:
    – If the plugin is first seems activated, then is deactivated with an error: Just reactivated the plugin and all should be good.
    – If you get an error “can’t install update” read here (deletes some may be ramining files and folders from version 3.0.0).

Version 3.0.0 (March 6 2016):

  • Lot’s of fixes and improvements like empty cachefolder, debugmode, templatenames
  • Twig-templateengine possible: Earlier versions used a proprietary templateengine created only for this plugin. From Version 3.0.0 on you can use the famous Twig-templateengine
  • Update: If Version 2.0.17 is working, this update is not a must. Nevertheless you should update at some time 😉

Screenshots Version 3.0.0:

JCI PRO Version 3.0.0: check installation

JCI PRO Version 3.0.0: check installation


JCI PRO Version 3.0.0: options

JCI PRO Version 3.0.0: options

Version 2.0.17 (Feb 26 2016):

  • Set header of JSON-http-API-request: Added two inputfields at plugin-options for “Accept” (e.g. “application/json”) and User-Agent.

Version 2.0.16 (Jan 24 2016):

  • Now the errorcode of the JSON-feedserver is checked.
    The problem before was: If the JSON-feedserver responds with an error (404, 500 etc.) this code was taken as JSON. Most of the time is is no JSON and the display failed. If caching was on, the failure was cached and the service was out of order.
    Now: The plugin checks the errorcode of the JSON-feedserver. If there is a 4xx or 5xx error the plugin searches for a valid cachefile to use this instead of the bad serverresponse.
  • Path of cached files fixed, importaint if you use the caching-feature of this plugin: The old version stored the cached JSON-feed at the wrong place. This is fixed with this version.
  • minor improvments for security- and compatibility-reasons

Version 2.0.15 (Dec 6 2015):

  • new template-syntax for parsing “unnamed arrays”:
    Prior to 2.0.15 the plugin was unflexible in parsing JSON like {“images”: [“IMG1″,”IMG2″,”IMG3”]}.
    Now the template-syntax “{images.jcix:left##right##number##}” shows the items 1…number (if number=-1: all) of the array and adds “left” and “right” before and after the JSON-value.
  • bugfixing and improving of “{key:ifNotEmptyAddLeftRight:…}”: Now all chars can be used there. And the delimiter (see below) is changeable.
  • Cleanup of template: If some items of the template aren’t filled “{..}” is remove at the end of parsing. If you want to keep an “{” or “}” in the output, mask it in the template like “/{“
  • new plugin-option “Delimiter”:
    JSON-value manipulators like “ifNotEmptyAddLeftRight” or the “jcix-syntax for unnamed arrays” require an delimiter (e.g. {KEY:ifNotEmptyAddLeftRight:left##right##no##})
    If another delimiter instead of “##” should be used (if “##” is part of left or right…), set another delimiter in the plugin-options and use it in the template.

Version 2.0.14 (Nov 22 2015):

  • some Bugfixes:
    – Caching: Problems with very long URLs fixed with md5
    – ifNotEmptyAddLeftRight: Fixed a problem when JSON-Value is numeric
    – Improved removing of unused {…} fields if JSON-value is empty (e.g. also JSON-Values containing “#”…)
  • new feature:
    – new shortcode “loopwithoutsubloop”: If set to “y” by “loopwithoutsubloop=y” the JSON parser loops arrays without a subloop/subloop-array. This helps with some JSON-feeds.
    – Set oauth-Bearer-Code in Plugin options: Value is passed to JSON-Feed (some APIs need that)
    – Template: If you want to have “{” or “}” in the output code, mask them with “/”: “/{” or “/}”

Version 2.0.13 (thank you Rod):

  • FIX: Bug in regular expression regarding “dodisplayonlyif” Shortcode fixed (one char removed…)

Version 2.0.12 (thank you George):

  • see Plugin-option: Switch for how to match values when using Shortcodes “filterresultsin” or/and “filterresultsnotin”: Either exact matching or regular expression matching. Default is regular expression matching. E.g.: When passing value “3” the regular expression matching is ok with “3”, “33” or “1234”. If you want exactly “3” this would require “^3$”. Or switching to exact matching, when “3” really matching only “3”.

Version 2.0.11 (thank you Layth and George):

  • {…:datetime,”d/m/Y”,0}: Problems with “/” fixed
  • Problems fixed when using [jsoncontentimporterpro] serveral times on one page

Version 2.0.11:

  • {…:datetime,”d/m/Y”,0}: Problems with “/” fixed
  • Problems fixed when using [jsoncontentimporterpro] serveral times on one page

Version 2.0.10:

  • Multisite Usage: Now WordPress-Multisite-Installations are supported.
  • Shortcode-Parameter “urlparam”, “pathparam”, “fileext”: Dynamic setting of JSON-URL -deactivated by default, must be switched on in plugin -option
  • Sorting JSON: JSON like  [{“id”:”13″}, {“id”, “54”}] (array of objects) can be sorted by the Shortcode-Parameter “sortfield=id”. Plus: “sortorderisup=yes” and “sorttypeisnatural=yes” adds more options.
  • Filter JSON: From JSON like  [{“id”:”13″}, {“id”, “54”}] (array of objects) items can be removed (filterresultsin=”id=13″) or only those how match are displayed (filterresultsnotin=”id=13″)
    By filterresultsin=”id” the value if “id” can be passed via GET or POST through ?id=val….
  • Shortcode “dodisplayonlyif“: E.g. dodisplayonlyif=”key=test” means, that a GET or POST  must give a input variable key with value test.
  • Shortcode requiredfieldsandvalueslogicandbetweentwofields: If “yes” the “#” separated datafields are AND-connected (default is OR)
  • Content manipulator
    {street:purejsondata}: pass the unchanged JSON-value
    {street:ifNotEmptyDelFromEnd:startright,length}: Remove chars starting from the end
    {number:round,digits,up}: Round a number
  • Some minor bugfixes like handlng of “$”

PS: Thank you Rod, Layth, George, Kevin, Lucas for inspiring me and the plugin!