fix Quick fix for the Social Counter Widget plugin I’ve been doing some charity work recently and as they will have a social presence the blog was in need of some social media buttons. I thought the Social Counter Widget plugin looked quite nice (after the slightly prettier Social Impact Widget decided
classes Enable delayed messages in Zend_Queue The default Zend_Queue DB implementation unfortunately does not allow you to pass a timeout value when saving a message on the queue. However not all is lost and you can easily extend the standard Zend classes to add that functionality. All you need
php Zend Application Resource Plugin Loading Issues Admittedly thinking while feeling feverish is slightly impaired, but it took me a little while to figure this one out… Trying to integrate ZF 1.11 with Doctrine2 to as per this article, I was trying to be a smart-ass and use TS_Resource_
authentication PHP_AUTH_USER and PHP_AUTH_PW is null Ok, so you’re trying to setup password protection on your website using HTTP authentication. Unfortunately despite the request for password working your authentication keeps failing. If you check the output of your script and the password and username variables are not populated as
code Multiple changes and a delete on same object in doctrine If you want to make several different changes to a doctrine record object you might find yourself slightly puzzled when it comes to deleting related objects. $user['Address']->delete(); $user['Address']->state(Doctrine_Record::STATE_LOCKED); (...) $user->save();``` It
gmt Zend_Date time part and GMT If you live in the UK you might have a surprise waiting in store for you if you use Zend_Date for the time part only. For a while I even thought this was a bug, however digging deeper has shown that actually it’
autload Autloading modular forms & models in Zend Framework 1.8 It’s not really obvious with the error messages you get, but using a thing like Form_Login does not work out of the box with a modular structure. Which is slightly surprising considering that it’s inside the default module. I have found
code Doctrine Many To Many With Extra Fields Recently I have started using Doctrine with Zend Framework. Most of the time it is great, but sometimes I get stuck on this or that issue. Most of my problems so far have been connected with the Many to Many relationship. Here are a
code Zend_Db_Select multiple table joins explained It sounds like a simple task – retrieve the result from a join SQL query. Unusually you can even find documentation on the official Zend Framework site explaining how to put together a query that will return the results from a JOIN query. Unfortunately when
lookaround Regex for Autolinking URLs For a recent project I was wanting to perform an exceptionally common task. Converting things that look like URLs in the text into clickable links. However wherever I’ve seen this implemented before I’ve always encountered the same annoying problem, namely the links
code Zend Framework Decorators - Labels and Checkboxes Very often it is the smallest things that annoy us the most. It took me a while to figure out why the placement parameter was not changing anything. I started of with the following: 'decorators' => array( array('Label'), array('ViewHelper') ) Unfortunately switching the
eclipse How to convert PDT projects into PHPEclipse projects If for some reason you decide to swap from one Eclipse based PHP IDE to another, rather than recreate the projects you can change their association, so that the project builders work correctly. This is basically what you need to do if you get
php How to use special characters in FPDF FPDF is a nice little library for php that allows you to create PDFs on the fly. It’s great for all sorts of document, among them invoices. Until you