CategoryPHP

PHP Library Creator

There are numerous tedious tasks to perform in order to get a modern PHP library built. The bulk of the work is of course spent on developing the library’s functionality, but often a barrier to separating code out into separate libraries is the initial step of creating the library and getting it integrated with existing code.

PHP Library Creator attempts to make the prep work on new libraries less time consuming. For installation instructions check it out on github. If you want to see a preview of it in action watch the video below.

SilverStripe Twig

As a long time developer of SilverStripe applications and websites, I have often found myself fighting against SilverStripe’s template engine. Its syntax is beautiful but its implementation poor.

SilverStripe Twig enables the use of Twig in SilverStripe. For those who haven’t used Twig before, Twig is an excellent template engine created by the founder of symfony Fabien Potencier and many collaborators. Twig is well tested, actively supported, feature rich template engine with an extension system.

Check it out on github for installation instructions and a user guide.

PHP 5.3 JSON Pretty

For those who work often with JSON in PHP, PHP 5.4 came out with some nice new options for the json_encode function. In particular JSON_PRETTY_PRINT which outputs JSON in a more human readable format.

Unfortunately for those of us stuck with PHP 5.3 for whatever reason, we don’t have this option available.

In comes this simple JSON Pretty service to the rescue:

$jsonPretty = new Camspiers\JsonPretty\JsonPretty;

echo $jsonPretty->prettify(array(‘test’ => ‘test’));

JSON pretty can have an array as input or a JSON string, and the result with be pretty human readable JSON.

You can find the source and installation instructions on github.

AutoLinks 1.7

Today I released an update for the Vanilla 1 extension AutoLinks, to 1.7 from 1.6.
It mainly contains changes to the YouTube embedding code. It improves privacy, enables HTML5 and allows the videos to scale to lower resolutions.

With regards to the privacy improvements, normally when you visit a page that has a YouTube video on it, YouTube (Google) sets cookies to gain what some people consider to be personal information. It’s nothing serious but I don’t think it’s good default behaviour when the person hasn’t even viewed the video.
So if you update to the new AutoLinks, YouTube will not use cookies unless the user actually plays the video.

Amazon4All 2.0

Introduction:

This is an update for a script called Amazon4All by Jaap. The original website is here.
I made updates to it recently for a client and thought I might as well release it since the original project hasn’t been updated since 2009.
All credit goes to the original developers, I’m just keeping it up to date with the latest APIs and cleaning up a bit.

Basically it is a PHP script that interacts with the Amazon API to allow developers to integrate Amazon stuff on their own websites.

Changelog:

2012-01-09 – 2.0

  • Added support for Spanish and Italian results
  • Updated API version to 2011-08-01 from 2009-03-31
  • Removed a lot of unused/private code
  • Fixed PHP warnings
  • Formatting
  • Doctype is declared for better HTML rendering

Below this line is Jaap’s changelog, above it is SubJunk’s.

2009-11-29

  • Added Italian language

2009-11-05

  • Separated the AWS requesting part to aws.php

2009-08-27

  • Removed a lot of old outdated messages from this list
  • Added the $tab variable in all echo statements so all HTML is indented properly
  • Added printing a simple HTML-header to have utf8 rendered correctly

2009-08-26

  • Got simplexml object printing working
  • Script will now create cache directory itself

2009-08-16

  • Always use signed request, started adding better time measurement

2009-08-12

  • Added the comments for 20090804 and 20090812 and tested the caching and I am going to try to put the script online

2009-08-04

  • Rewrote the scripts to make the new version (with signing) more like the old version so that the caching would work again but didn’t test it yet, this also made show_url work again
  • Refixed the do/du problem for used products (which had gone after going back to an old version) and added the (server) locale functionality to the signed version

2009-06-23

  • Added the signing that Amazon requires from 20090815

2006-03-09

  • Did put English first in the $Alanguage array again and added the comment
  • Added the Portuguese translation

2004-11-14

  • Norwegian translations by Bjoern Boerresen added

2004-09-20

  • Thanks to Dr. Jan-Hendrik Doerner for correcting some of the German translations

2004-07-20

  • Removed the slashes after the server URLs so the slash can be used within a string

2004-07-15

  • Added some things that Wim Roffel suggested

2004-04-08

  • UK modes added
  • Japanese locale enabled
  • More search types added

2002-08-16

  • Initial release

© 2014 Spirton

Theme by Anders NorenUp ↑