How to use Slots in Symfony.
Symfony Slots are ways to set simple data in one template, and have it displayed in another. It’s helpful if, for example, you want to set the Title in the layout from a controller actions view. Rather than ramble on about Symfony Slots, I’ll blast through how Slots are used [...]

Continue reading

,

This post is presuming that you …

have Symfony 1.2+
have models set up
have some sort of admin area set up, albeit without file uploads

This is *not* about storing file data in the database, it is about storing file *locations* in the database. The actual file data will be stored on the filesystem.
So lets get file uploads [...]

Continue reading

,

Oh WOW you really do forget how much of a headache getting Visual C++ ready to use is. Fixing these errors is so majorly counter-intuitive, and from the point of view of someone who programs in C++ once in a blue moon it’s a total pig when you want to spend an evening programming then [...]

Continue reading

, ,

If you’re in a template in Symfony, and you have your output escaping enabled, one thing that bugged me was when I tried to do this:

$my_model->getMyOutput(’param1′,’param2′);

The output would be escaped - for example I’d get “<b>this is bold</b>” rather than “this is bold“. The usual $my_model->getRaw(’MyOutput’) didn’t help, as it doesn’t accept parameters (actually I [...]

Continue reading

,

Something that doesn’t bring up an instant result is MooTools Select Element Children.
Again, this is part of my all-of-the-sudden drive to put things that don’t give me a Google insta-answer on my blog.
What you’re looking for is:

var childEl = $(’parent_element’).getElement(’#child_element’);

Or alternatively

var parentElCollection = $$(’#parent_element’);
parentEl = parentElCollection[0];
var childEl = parentEl.getElement(’#child_element’);

Continue reading

I’ve decided to post all the silly little things that I do and the resolutions to them.
If you’re coming across something like “A is Null” in MooTools - specifically MooTools Morph - make sure that you’re not passing a collection of elements.
For example, $$(’#element_identifier’), whilst only returning one element, will actually return a collection (albeit [...]

Continue reading

Blimey, exhausted after PHP UK Conference.  No idea how the speakers have managed to have their pre-conf, then speak, then have a post-conf! I suspect there will be many PHP developers passed out on the streets of London later tonight.
While it’s all fresh in my mind though, I just wanted to make a few notes [...]

Continue reading