Web server: Linux (Ubuntu on my dev setup), Apache, PHP 5.3, Symfony 1.4, Doctrine 1.2. Database server: Microsoft Windows 2008 Server, MS SQL Server Trying to get Symfony to talk to the database server has been a painful experience for the last few days. But perseverance has paid off. Lots of Googling with trial & [...]
Archive for the ‘Programming’ Category
Fixing odd characters
One of the biggest complaints that web developers have is their lack of control over end users. When will we be able to tell them a) not to paste Micosoft Word or b) if you must, paste it into something that doesn’t do formatting 1st. It has a nasty habit of converting quotes into “smart” quotes as [...]
Downloading SoundCloud Playlists
I like to have music while I’m coding. It breaks the silence while working alone at home. When I have music playing, it’s best if I don’t have to think about setting up playlists, which is why I used to listen to the radio. The radio has it’s limits though, not enough Ninja Tune I [...]
wp-block as a shortcode
In my last post I raved about the excellent plugin wp-blocks by Keir Whitaker and then went on to extend it a little. Time to extend it a little further, this time by adding a shortcode. Shortcodes are the handy square bracketed code snippets which conjure up more content and functionality direct from a page [...]
Getting a random wp-block by regex
If you’re used to developing with a CMS such as CMS Made Simple, you would be quite used to having blocks of content separate from the main content system. These blocks can be re-used through-out existing content and within the theme templates. One might even consider this a core function for a CMS. Sadly it’s [...]
Mimicking wordpress.com’s image resize URIs
To follow up from last night’s entry, I was determined to remove the intermediary step of my_resize_script.php. I’ve acheived this goal in the mod_rewrite rule, file name and query string now get passed on to timthumb.php. Updated rules: RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_URI} \.(gif|png|jpg|jpeg) RewriteCond %{QUERY_STRING} (w|h)=(.*)$ RewriteRule (.*) /full/path/to/timthumb.php?src=$1&%1=%2&%3=%4 [L] This will pass both [...]
Resize images on the fly without messing with image URLs
[EDIT: I've made this simpler with a follow up post: Mimicking wordpress.com’s image resize URIs] Exporting a wordpress.com site for use on a standalone wordpress.org install is a joy to set up. The export and import system are simple to use and give little or no issues. What is a problem is the automatic resizing [...]
Updating WordPress site URLs for different hosts
Why oh why does WordPress insist on storing the site URLs within the database? Every other project I can think of either keeps it in a config file or doesn’t bother with one and just works with whatever URL it finds itself on. This is most irritating when you have: more than one developer working [...]
How to get sfFormExtraPlugin working in Symfony 1.4 using Doctrine
I’m talking about this plugin: http://www.symfony-project.org/plugins/sfFormExtraPlugin For some reason, getting the plugin to work took a lot of Googling and some trial and error. So here is how I got it working. Hopefully I did this in the ‘correct’ way… cd plugins wget “http://plugins.symfony-project.org/get/sfFormExtraPlugin/sfFormExtraPlugin-1.1.3.tgz” tar zxvf sfFormExtraPlugin-1.1.3.tgz mv sfFormExtraPlugin-1.1.3 sfFormExtraPlugin cd .. ./symfony plugin:publish-assets cd [...]
Which Windows applications are used by this web developer?
This list is partly to remind myself what essential apps need to be reinstalled after a system wipe. But it does have me thinking, what do other web developers use on a daily basis? Web browsers: Google Chrome FireFox IE Opera Safari FireFox addons: Adblock Plus British English Dictionary ColorZilla Dummy Lipsum Firebug Html Validator [...]

