Today’s date has a lovely palindromic quality to it:
01022010
Cool.
php projects, javascript, and… stuff.
Today’s date has a lovely palindromic quality to it:
01022010
Cool.
I have just started to use the Zend_Feed related components in earnest and am really liking the Zend_Feed_Writer (new to ZF 1.10.0). So what I wanted to do was created an RSS feed file is one didn’t exist and then keep updating that file as-and-when new items came in. Seems a really easy and simple thing to do, right? That, unfortunately, has not been my experience.
I have to say that to documentation seems quite lacking on the ZF site (for all the the Feed components, really, not just the Writer). Because of that, what follows may be idiotic and there really is an easy way. If so, I hope that you will post up a comment and let me know because I’d love to learn!
On with what I did…
Continue reading ‘Adding new items to RSS feed – it shouldn’t be this hard!’
If you’re not sure about Zend_Form’s decorators, what they are or how to use them, then Matthew Weier O’Phinney has the webinar for you:
http://www.zend.com/webinar/Framework/webinar-leveraging-zend_form-decorators-20091216.flv
It’s a great introduction to decorators, how to implement them and how to do slightly more complex things with them. Well worth a watch!
A while ago I wrote a post on how to use the Prototype js library to make elements on your page have the same height.
For those too lazy to read that post, it can be summarised something like this:
Continue reading ‘Same height for elements – now with jQuery goodness!’
Just ran a bit of SQL on Oracle and this was the oh-so helpful error message I got back:
Warning: ociexecute() [function.ociexecute]: OCIStmtExecute: ORA-00932: inconsistent datatypes: expected BINARY got BINARY
So you’re expecting a binary value and what you got was a binary value, but that’s inconsistent with the binary value you were expecting to be binary?!
So I’ve finally finished the book! OK, I finished it a couple weeks ago but haven’t had a chance to post up a review yet. Of course, I had every intention of finishing it a lot earlier considering I was flying for nine hours to the States and then another few hours on to Mexico – and the journey back again! – but that really was just wishful considering I was travelling with my two year old son. Oh well!
On with the book review…
The book, as the title makes it plainly obvious, is about developing your team in relation to working with PHP. It’s aimed at, well, pretty much anyone who has an interest in developing or working in a team, be it managers who need to set up and manage teams or developers working within a team who want to improve their work flow and procedures, or anyone in between. It does this by giving an overview on several subjects, but doesn’t go as far as to tell you that you must do x, y or z. This is understandable, though, as every team is different and the book acknowledges this.
The other day I had a new book sent to me called PHP Team Development, written by Samisa Abeysinghe and published by Packt Publishing. Unfortunately, it arrived at work when I was on holiday so I haven’t been able to have a look at it yet. :-/ However, I’m back today and have the book in my hands (well, not literally, of course, else typing would be much more difficult), so am looking forward to diving in to it.
Hopefully have a bit of a review posted up here some time soon!
Sometimes you come across hidden little gems in the Zend Framework that save you time, even if that’s just down to the amount of text you need to type. The Zend_View holds one of these little gems…
Did you know that you can use the short php open tags and echo tag in your view scripts, and you don’t even need to have this turned on in the php.ini file?
So you can have things like:
<? $this->viewHelper(); ?>
and:
<?= $this->variable; ?>
instead of:
<?php $this->viewHelper(); ?>
<?php echo $this->variable; ?>
Might not seem a lot, but when you have a lot of view scripts to write then you can save quite a few key strokes.
It’s able to do this, even if you have short_tags off (as it should be!) because Zend_View uses a stream to open and seek through the view script – Zend_View_Stream.
On creating a rather large form recently, I was in the need to have some kind of hint to the user about what format the content should take on several input boxes. I could have done this with a description under the form element, but a more accepted way to do this, it seems, is to have a ‘hint’ in the element itself. You know the kind of thing I mean; a value, usually quite a light grey colour, that is present until you click in to the form element and then is disappears. I also wanted to do this as a jQuery plug-in because, well, why not?
I think we can all agree that URL shortening services are great and are very handy to tidy up those long and obnoxious links. However, a lot of the time people simply forget to use them, or often don’t know about them in the first place. I’ve noticed this in a blog system I wrote using Zend Framework. On one hand I love that people post messages, but on the other it annoys me that they may supply a link that is so long it breaks the formatting of the page, or looks just plain ugly.
So what are my options? I could train everyone who posts blogs on the system to use a url shortening service or I could manually tweak all the links myself. As solutions they are not very practical at all; I don’t have the time to change any/all links myself, and I certainly don’t have enough patience to train everyone! So an automatic way of doing things is needed, and the filtering in Zend Framework comes to the rescue!
Continue reading ‘Shorten urls automatically with a Zend Framework filter’