Tony Landis
Personal website of Tony Landis

21 Apr 07 SOAP Plugin for Smarty

This plugin for Smarty enables in-template access to SOAP services.

It requires the NuSOAP PHP class in your PHP include folder (ie: includes_path/nusoap/nusoap.php) or edit the path in the soap smarty plugin.

You may need to download the NuSOAP php class and place it in your PHP include path.

The smarty soap plugin function is shown after the fold.

Example SOAP Plugin Usage in Smarty Templates:

{soap assign=soapResponse


Tags: , ,

20 Apr 07 JSON Plugin for Smarty

JSON Plugin for Smarty

This is a simple plugin for Smarty to retrieve and parse JSON data into an object in Smarty. Requires the PECL JSON.php class or PHP 5.2.0.


  1. If your PHP version is < 5.2.0 and save it to your include path if it is not already there. If your PHP version is >= 5.2.0, this class is not needed, we will use the native function.
  2. Download the JSON Smarty Plugin PHP Function File (shown after the fold) as function.json.php in your smarty\plugins\ directory.

JSON Plugin Usage in Smarty Templates Files:


The $result variable now contains the parsed JSON data.


Tags: , , ,