Posts tagged code


There are 9 posts tagged with code.

If you are interested in "code" why not subscribe to the Atom feed or RSS feed?

Attribute Oriented Programming in PHP

The fourth talk at the Open Programming Language Miniconf 2010 was Peter Serwylo's presentation about Attribute Oriented Programming in PHP.


Notes on Preparing for PHP6

My notes on Ben Balbo's talk at Open Programming Language Miniconf 2010: Preparing for PHP6.


Logging the locking in SPIP

The rather hackish way I instrumented SPIP to record debugging information about its file locking to a remote syslog server.


Writing view decorators for Django

Using decorators to wrap and modify Django views is quick, easy, composable, and just about the most awesome thing I've seen in a while. It also takes a little bit of figuring out. Here's my explanation...


Authorising user actions in SPIP

One of the APIs that many SPIP plug-ins will need to use is `autoriser()` -- the function which determines whether a user should be permitted to perform a given operation. As I couldn't find any document on using this function, here are a few notes.


SPIP tags with multiple aliases

This post describes creating SPIP tags with multiple "names" (like #INCLURE and #INCLUDE) and taking the technique further to implement families of related tags.


Dynamic tags, fake arguments, and AST mangling in SPIP

Sometimes a dynamic SPIP tag (one evaluated at request time) needs details about the template, but this information is not available. This post describes a technique for passing data from the AST into the tag's static and dynamic evaluation functions.


A better way to control attributes in SPIP templates

This post describes a PHP function to replace SPIP's inserer_attribut and extraire_attribut filters with a single jQuery-inspired attr filter.


Creating custom tags for SPIP - Static tags

A short introduction to creating custom template tags in the SPIP content management system.