You are browsing the archive for coding.

Active Module Based Config with Zend Framework

January 4, 2010 in Zend Framework

I’ve recently taken to using Zend Framework for a project that I needed to bring up to date. I won’t go into the pros and cons of choosing a framework as there are many much more qualified people who have done a much better job of this subject than I would or could. So Instead [...]

php: processing raw Post / Get Values

January 21, 2009 in PHP

I just added a jquery plugin to call head requests, but because you are not doing a get or post request php won’t convert the values that are sent back to their form. To get around this we have to use the php://input stream ( is that the right word?) which is handy for a [...]

Buzzword of the Day: Hijax

January 13, 2009 in Buzzword of the day, Web Development

Came across this today: being 01:58 on Wednesday January the 14th 2009 .. i declare Today’s Buzzword of the day: HIJAX Basically when you replace links in a page to perform ajax instead and update content instead of refreshing, that’s Hijax. Visit http://domscripting.com/blog/display/41 for more info

php: smarty assign content plugin

January 12, 2009 in Smarty

I needed to assign a block of content to a variable instead of just a value.. so i set about creating this plugin function smarty_block_assign_content($params, $content, &$smarty) { $smarty = clone($smarty); //Copy the original class, so there's no garbage variables after we finish if(!isset($content)) return; if (!isset($params['var'])) { $smarty->trigger_error("assign_content: missing 'var' parameter", E_USER_WARNING); return; } [...]

php: Menu Classes

January 12, 2009 in PHP

Recently I’ve been working on my own framework (we’ve all done it i’m sure) and part of this was a menu handling system. The basis really is simple, we have a menu item which really is just link and text. That menu item could have children, could be active and/or be selected. In this case [...]

php: Insert element at specific Index of Array.

January 11, 2009 in PHP

In a recent project I’ve been undertaking I’ve made a menu class set and sometimes i just wanted to say to add this to an array, but in a certain position. PHP does this easily via $array[position] = "newdata"; But unfortunately this is not so good if you only wanted to insert the newdata into [...]

Long Night of Editing

January 6, 2009 in Personal

Recently it seems that i’ve been suffering with a distinct lack of enthusiasm for any sort of coding. I’ve been trundling through the latest site (http://www.gamers.uk.net) which is been working well for the most part.. Over the last few days I’ve not really wanted to do any sort of work on it at all or [...]

jQuery image Preloader

January 6, 2009 in jQuery Plugins

– New version with Callbacks now available – Recently I looked into preloading images via Javascript. I found all the usual ones which require you have a list of all the images you wish to preload. For me though, specifying the images is rather annoying. Also I much prefer CSS roll overs to Javascript ones [...]