Using VERP with swiftmailer, symfony and exim
VERP (http://en.wikipedia.org/wiki/Variable_envelope_return_path) provides a method for handling bounced emails. This is especially useful when it comes to figuring out which emails failed to get delivered from your application/mail outs. This post covers how I got this working in symfony using swiftmailer to send the mail, and exim to deliver bounces back into symfony. The concepts shown can be applied to just about any combination of software though.
Continue readingHandling Uploaded file in symfony’s admin generator
When a file is uploaded using sfForm in the admin generator, by default the filename that's used is a random string, which can look bad in URLs. If you want to change this, it's not immediately obvious how - but it is incredibly simple.
Continue readingDate/Time Range Selector Widget for Symfony
I needed to create a date/time widget for use in an sfForm in a symfony project I was working on, and unfortunately there's not currently a widget that I could find to allow this. In this post I show how I solved this problem, creating a widget for selecting a date range, using the jquery date selector from sfFormExtraPlugin.
Continue readingTimico OSS Site Launched, Containing Symfony Plugins
I've launched http://oss.timico.net/ - which is an open source site for Timico. I've added a couple of plugins for symfony already.
-
http://oss.timico.net/svn/oss/symfony/TimicoMarkdownExtraPlugin/
- Includes Markdown Extra and a helper -
http://oss.timico.net/svn/oss/symfony/TimicoSwfChartPlugin/
- A helper for SWF Charts -
http://oss.timico.net/svn/oss/symfony/TimicoWikiPlugin/
- A wiki plugin allowing for custom storage backends (doctrine/propel/xml etc) and swappable renderers. This plugin is very unstable currently, as it is under development. -
http://oss.timico.net/svn/oss/symfony/TimicoServiceContainerPlugin/
- a simple wrapper around sfServiceContainer
Hopefully we'll be mirroring a few projects in need of public mirrors soon, and perhaps adding more of our own code.
Extending sfFileCache with Hashed Directory support
Unfortunately, sfFileCache doesn't scale well on certain file systems as it puts all of it's cached files in one location. This simple class adds support for hashing the directory name based on a the name of the item being cached. It wasn't worth a plugin, so I'm pasting it here.
Continue readingSending multipart email from a Task in symfony 1.4
I recently needed to send the result of an action in symfony via email daily. E-mail has changed slightly in symfony 1.3/1.4 - here's how I did it. I really don't like my solution at all, the use of get_partial() from within a Task seems very wrong to me - but I'm in a rush so it will do for now, I'd love to hear feedback
Continue readingEmbedded forms using Javascript with sfForm
I wanted to create a form that allowed me to dynamically add sub-forms via JS, without round-trips to the server. I had a bit of a google, but failed to find much of use - so I wrote my own. This article contains my code for a proof of concept, and a brief description of what it does. It is proof of concept, and done as an example, so code isn't done perhaps as I might do in a real configuration, but I hope it provides help to others.
Continue readingsfServiceDefinition – a brief introduction
Fabien has already introduced the symfony service container, and will be shortly releasing a post covering more of it. I was keen to get my hands dirty, so I've dived into the code and got a quick example working.
Continue readingYAML in PHP – fun with sfYaml
In a recent post about Symfony components - Fabien wrote about how the Symfony project (yes, that's right - a capital S now!) will be releasing more and more components. In this post I introduce sfYaml, a YAML parser for PHP - building on my previous blog post about routing.
Continue readingPlaying with symfony routing – without symfony
symfony 1.2 was quite an improvement over 1.0, one of the most important changes was improved decoupling between components. In this article we're going to put this to the test and have some fun with sfRouting.
Continue reading