One quick thought of my own on the new Apple iPad
So I just spent my lunch hour catching up with my neglected feedreader (tip: never let your feeds pile up over an Apple event!) and I haven’t seen anyone else raise this point, so here goes.
I don’t know about you, but personally my 16Gb iPhone is mostly full of music. There are a few odd podcasts, less than a hundred photos, and a couple-dozen apps, but for the most part—70, 80-percent—it’s music that takes up the space.
And that makes sense for what I use it for—as a phone, a portable music player, a games device and, occasionally, a camera.
Now consider the new Apple iPad, which comes in 16Gb, 32Gb and 64Gb sizes. If its primary target market is folks sat on their sofa, idly surfing the web, dealing with emails or playing games, does music really fit into that usage profile? I can’t imagine that the built-in speakers are that much cop, plus if you’re moving the thing around you’re hardly experiencing the optimal listening experience. Earphones? Not convenient, not like being able to slip your iPod or iPhone into your pocket when you need to get up and go somewhere. And anyway, who doesn’t have some other means of listening to music?
So what is going to take up all that flash drive space? It has various “Productivity” apps—word processing, spreadsheets, and so forth—but those don’t take up much space. iBooks? Again, they’re mostly text, they don’t need the space either.
So it’s got to be apps…
...and lots of them. Is Apple betting on the iPad to drive even more growth in App Store sales than they’ve already seen with the iPhone and iPod Touch?
And if you have trouble keeping track of a few dozen apps on your iPhone, how will you cope with a few hundred on an iPad?
Potential EE add-ons: What would you like first?
- Categories:
- ExpressionEngine, Macintosh, Personal
- Tags:
- Published:
- 2:56pm on Tuesday 9th February, 2010
Partly because I really don’t know, but mostly because I haven’t got anything else to write about this week for Project 52, here is a list of potential ExpressionEngine add-ons I plan to build—and I’d like you to tell me which to do first.
Of course, it’s entirely possible that someone has already done any or all of these and I just haven’t found them yet… in which case please point me in the right direction and save me a ton of unnecessary work!
Related fieldtype dropdowns
If you ever have a client with thousands of pages (or products or whatever) that wants to use related entries, the default dropdown format isn’t very useful for them. This add-on will replace some or all related fieldtypes with those snazzy “search as you type” Ajax-powered search fields. Neato!
Ree-Categorize
Can’t make an ExpressionEngine add-on without a double-e pun, right? This idea is an extension to the current way categories work when you delete one that has entries; instead of just leaving a bunch of orphaned entries, it will prompt you to re-categorise them.
Category Image URL Fieldtype
Hopefully a simple one, this—lets you use a helpful file manager fieldtype for the Category Image URL field. At the moment it’s just a text field, which is not exactly helpful for non-technical clients. Replacing it with something like the nGen File Field file upload tool would be very handy if you rely on category imagery.
Mac OS X Dashboard Widget
Okay, this last one isn’t exactly an EE add-on, but I find it very handy. It’s a dashboard widget for Mac that just lists all the latest comments on any of your pages, and lets you click through to edit or delete them. It’s very useful if like me you don’t get to see any ‘new comment’ emails until you get home but want to stay on top of comment spam. I guess it could also be used to keep a count of things like caught spam or Akismet’s tally too.
Cast your vote now
Alright, I’m not actually taking votes, but I’d be interested to see what people think of these potential add-ons, and if there’s a clear winner I’ll make that my priority for development. Tell me what to do, please…
Reading List 2009
Just as I have done for the last two years, I’ve been carefully recording my reading material. 2009’s repository was Nathan Borror’s excellent new web app, Readernaut - and the final total is a not completely unimpressive thirty.
Fiction
Still trying to improve my consumption of “classic” literature, I slogged through Midnight’s Children last year, which was not an easy read but ultimately rewarding. The only other book that really made an impression was the excellent high-concept novel, The Time Traveller’s Wife.
- My Favourite Wife (Tony Parsons)
- The Time Traveller’s Wife (Audrey Niffenegger)
- Good Omens (Terry Pratchett, Neil Gaiman)
- Revolutionary Road (Richard Yates)
- By Design (Richard E Grant)
- A Matter For Men (David Gerrold)
- Farnham’s Freehold (Robert A Heinlein)
- Time For The Stars (Robert A Heinlein)
- Ysabel (Guy Gavriel Kay)
- Midnight’s Children (Salman Rushdie)
- The Magicians (Lev Grossman)
- Requiem for a Dream (Hubert Selby Jr)
- Nation (Terry Pratchett)
eBooks
As I’ve been travelling a lot this year, I occasionally found that I didn’t have the bag space to fit a book into my overnight bag. Thus, eBooks on iPhone have made their first appearance on my reading list.
- The Adventures of Sherlock Holmes (Arthur Conan Doyle)
- The Curious Case of Benjamin Button (F Scott Fitzgerald)
- A Princess of Mars (Edgar Rice Burroughs)
Non-fiction
- The Audacity of Hope (Barack Obama)
- Outliers (Malcolm Gladwell)
- Droidmaker (Michael Rubin)
Droidmaker, the story behind the birth of movie special effects and George Lucas’ role in that art’s genesis, was actually a free PDF recommended by Michael Heilemann of Binary Bonsai, but I’d certainly pick it up for a coffee table book if I saw it in the shops. It was an excellent geek read.
Fantasy
Yet more fantasy to pad out my reading list. This year I discovered Robin Hobb, and I’m slowly slogging through her various trilogies. Looking forward to Joe Abercrombie‘s new book, due out sometime in 2010.
- Best Served Cold (Joe Abercrombie)
- Tigana (Guy Gavriel Kay)
- Assassin’s Apprentice (Robin Hobb)
- Royal Assassin (Robin Hobb)
- Assassin’s Quest (Robin Hobb)
- Ship of Magic (Robin Hobb)
- The Mad Ship (Robin Hobb)
Graphic Novels
I re-read Watchmen before going to see the (excellent, faithfully adapted) film in March.
- Watchmen (Alan Moore, Dave Gibbons)
- World War Hulk (Greg Pak)
- Batman: The Killing Joke (Alan Moore, Brian Bolland, John Higgins)
- Batman: Arkham Asylum (Grant Morrison)
Highlights of 2009
Despite reading more than in 2008, it’s difficult to pick out any real standout books from the preceding lists. The Time Traveller’s Wife was clever but ultimately forgettable; Midnight’s Children was impressive but hard work. So no real recommendations from me, just a reaffirming of my intentions to actually read some more “proper” literature in the coming twelvemonth.
My World of Warcraft
I don’t often mention things I do in my spare time on this blog, but this week I’m going to make an exception and talk about the only game that I could really claim to play: World of Warcraft.
Now I’m not much of a gamer
I have Call of Duty 4 but never play it, and a couple of Lego games on the Wii, but I’ve never really dedicated all that much of my life to completing video games. There’s no reason I couldn’t get myself a Playstation or Xbox, but I tend to think that taking over the living room television to kill terrorists or trash Liberty City is kind of unfair to my wife, who prefers to use the telly in the evening for what is, to be fair, its intended purpose.
So, no real console, and as a Mac user I’m not exactly blessed with a wide selection of computer games to choose from.
Luckily one of the few games to get a Mac conversion is Blizzard’s runaway success, World of Warcraft.
For The Horde!
I originally started playing in late 2008 after avoiding it for years, and was immediately sucked in by the immersive world, rewarding progression and social interaction. Sucked in a little too far, as it turns out; when I found that I was spending more time reading strategy guides and wowwiki entries on DPS gearing than I was enjoying the game, I uninstalled it and cancelled my account. I didn’t want to be one of those guys with spreadsheets full of cross-referenced armour points, committed to four hours a night raiding. I left my Level 53 Priest on his horse in Un’Goro Crater and quit.
Last year I went back, but this time it’s different. I don’t care about gear and quick levelling - no addons for me this time around - the only reason to play is for the fun of it. And whatever its detractors might say about geeks pretending to be elves, it is a lot of fun; it’s got that perfect balance of carrot and stick to constantly have you questing after the ever-so-slightly-better weapon or piece of armour, and the satisfaction of bringing down a particularly troublesome bad guy with the help of a random bunch of people willing to stop what they are doing and help out a stranger is better than any Xbox achievement.
Of course, the real reason for this post is that I wanted an excuse to use the new, embeddable Armoury viewer and show off my current main character:
I’ve kind of reached something of a platform now that he’s Level 80. Once you hit that top level it gets harder and harder to avoid needing to know your stats if you want to progress, but I really don’t want to be constantly comparing armour bonuses and running the same dungeons over and over for that elusive cloak. I did my first raid today (until latency overcame me and I had to drop out), but that becomes even more a time-suck.
Still, Cataclysm comes out this year, bringing with it two completely new races to play. Oh, and destroying the World As We Know It as well, which should go some way to eliminating the boredom that is just starting to creep in.
How to make a quickstart folder for your projects
- Categories:
- Productivity
- Tags:
- Published:
- 12:15pm on Thursday 14th January, 2010
Here’s a simple little tip to save a few precious seconds each time you sit down to start work on a website project.
Bookmark This
This is certainly true for me, and probably true for all web developers—when you are working on a project, there is a set of sites and URLs that you need to have open. For me this usually means:
- The project to-do list in Basecamp
- The site on my localhost
- The site’s control panel
- phpMyAdmin
- The ExpressionEngine documentation
- php.net (for looking up the occasional function or when I can’t remember those damn date formatting letters)

Now you could just open up each site as-and-when you need it, but one trick that I’ve discovered is to place all of those links into a folder on your browser’s Bookmarks Toolbar (I keep mine under a master folder named “Clients”). Now when you sit down to work on something, go to that folder and Ctrl-click on it (Cmd-click on Mac) or select the “Open All in Tabs” option. This shortcut will open up every link in the folder as a new tab; with just one click, your browser is now set up with everything you need to get started on that project.
Development vs. Live
This technique can be extended to cover Development vs. Live environments too. Perhaps when working with the live site you need to add your Plesk control panel or links to other third-party services that you are using—just include any frequently accessed sites in the relevant folder, and you’re one click away from being ready to work.
So there you have it
A simple way to save yourself a little wasted time while you work on the Next Big Thing™.
New Year’s Resolutions // Project 52
- Categories:
- Blogging, ExpressionEngine, Freelancing, Personal, The Site
- Tags:
- Published:
- 4:39pm on Tuesday 5th January, 2010
Perhaps I should feel bad that last year’s “Resolutions” post is still languishing in my Drafts folder, not so much unfinished as barely started. But 2009 kept me so busy that I barely had time to think, let alone blog. That is something I intend to change in 2010.
2009
Last year was the first working directly for the Amsterdam office at Booking.com, and the regular travel that entails means that my carbon footprint has taken on Sasquatch-like proportions. I also managed to squeeze in a third trip to South By South West in March, and a holiday in the Lake District before it all went under water.
2009 was also my busiest freelance year ever, although (happily) that actually meant fewer actual clients. Working with other local freelancers like Digital Spoke and Creative Freedom meant I could concentrate on what I do best - which, this year, has been exclusively ExpressionEngine development. I even managed to make it to the first ever EECI conference in Leiden in October, where I met old friends and took far too many notes.
2010 Resolutions
- Less freelance work. While I’ve definitely learned a lot about what ExpressionEngine can do this year, and the extra money has been nice, I’m going to try to cut down on freelance work this year to spend more time with my family and on projects around the house.
- Get fit. A side-effect of spending all my time in front of a computer has been a general deterioration in my health - this year will be spent getting back in something resembling shape. Of course, being a geek this may involve gadgets and web apps; more on this topic when I start my Geek’s Guide To Getting Fit later this month.
- Update this site. Not a redesign, but this site badly needs some attention. It’s still running EE 1.6.5 for God’s sake! When I launched it last January I had a to-do list of remaining tasks that has only grown as I’ve neglected it in favour of paying work.
- Less travel. No SXSW for me this year, and probably no conferences other than work ones.
And finally on the list of New Year’s resolutions…
Project 52
My friend and talented artist Anton Peck launched Project 52 late last year. From the site:
Project 52 is a personal challenge geared toward getting fresh content on your website. The goal is to write at least one new article per week for one year.
If you ignore the flurry of activity in October following my trip to the EECI conference, I only managed a paltry seventeen posts last year, so this year I’ll be joining over 600 other people and writing a lot more on this blog as my contribution to Project 52. I already have several juicy ideas lined up for you lucky people, including a complete rewrite of my simple PHP shopping cart script so I have somewhere to direct the people who still send me weekly support request emails over five years after I wrote the damn thing. (And massive congratulations to Anton for kick-starting this project. Over 600 people - that’s more than thirty-thousand new pieces of content!)
So that’s the plan
Less work, more exercise, less travel, more writing.
I’m quite looking forward to 2010.
Jonathan Longnecker - From Design To Dynamic: Rapid Development with ExpressionEngine
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 12:30pm on Monday 26th October, 2009
Jonathan Longnecker is a developer with fortyseven media. He discussed the tips and tricks they use to quickly build new ExpressionEngine sites.
Slides and code examples from the talk are on Jonathan’s site.
Introduction
- The problem is that EE developers are too awesome. Add-on development has exploded, and functionality and usefulness is really amazing. Structure is a great example of this.
- We typically use 15+ addons for every site, with the same kind of templates and global variables
- The solution is to set up a sandbox site where the core and all add-ons are kept up-to-date. Add some default templates and global variables, a weblog for content, and some sweet tricks and you have the ability to rapidly build out new sites
- We will be adding new things to it as we find great add-ons
Add-Ons
- LG Addon Updater
- LG htaccess Generator: Generates your .htaccess file, removes index.php and much, much more
- LG Add Sitename: Enables Control Panel admin page title replacements, client logo
- LG TinyMCE: Not convinced it’s the best choice, and it’s not good with pasted text. Turn off source formatting, spans and brs, take out the image upload, add blockquote
- SL Developer Info: Lists all weblogs, templates, and other useful developer shortcuts. Give it it’s own custom tab in your nav bar
- ImgSizer: Resizes and crops intelligently and creates thumbnails; make sure you create a “sized” directory in your images folder
- Solspace’s Freeform
- FieldFrame: Changes the way you can put together certain types of content
- nGen File Field
- Structure: Radically changes the way you handle content pages and navigation. Scared of using it initially as I thought it would lock me into certain way of developing templates, but it really has potential to speed up certain parts of your site; secondary static pages are a lot faster to set up
Tips and tricks
- In your Template Preferences, turn on save template revisions (I use five) for added protection from mistakes, and always save templates as files
- Create a “content” weblog with custom fields - meta keywords, meta description, a body (TinyMCE field type), and images (an FF Matrix). A sweet trick invented by AJ Penninga is to set up your images as a FF Matrix with a File field, title, radio group of sizes, radio group for crop height (optional), and dropdown for alignment. Then to insert the image add
{image_1},{image_2}, etc. in the body content. Your content template then uses LG_Replace to loop through the matrix images and replace those tags with the images inside the{images}tag - Create a client member group with access to file uploads, Structure and weblogs
- Create global variables: I use html_head (containing doctype, static meta tags, favicon link, etc.), html_closing, jquery, javascript, rss (just your RSS links), and stylesheets
- Create templates in site and _global groups: footer, header, nav (containing Structure’s
nav_maintag), sidebar (using Structure’snav_subtag) and content (using Structure’stitle_trailtag to build theelement) - Keep the
tag inside each template so you can add a dynamic CSS id or class to it - Replace the default homepage with a list of what’s been installed and configured on the sandbox site
- Moving servers is now faster than installing a new site, as the sandbox site is ready to go - just copy the database and files over and amend the config.php settings
Jonathan ended with a live demonstration of creating a new site from scratch, using Structure to create pages and place them in the site IA really quickly, generate automatic navigation, and use Structure’s Listings feature to attach weblog entries to a page (a la a design portfolio). Structure makes it impressively easy to re-order navigation items.
Jamie Pittock - The Art Of Proactive Parenting
- Categories:
- Business, ExpressionEngine, Freelancing
- Tags:
- Published:
- 12:27pm on Monday 26th October, 2009
Jamie Pittock is Operations Director for Nottingham-based Erskine Design. He discussed effective ways to develop ExpressionEngine sites that increase understanding and remove uncertainty for your clients.
Jamie’s slides can be viewed on SlideShare.
Managing client expectations
- Design your content model around the client’s existing content - take example content from client, and identify the fields, types and field names needed
- WYSIWYG - clients come wanting total control of their content. They are proposing a solution before you understand their problem. Often they just have specific issues. Designers get lazy and clients shouldn’t design
- You need to think about how you would write this content. Create a template to give to their content creators. nGen File field is the best solution for files at the moment
- Live Demo: The new ed_imageresizer plugin from Erskine does image resizing on the fly and caches results. It will be available soon
- Don’t always have to give the client what they ask for. e.g. No WYSIWYG, just multiple images/captions/alignment fields for main body and extended text. We use Textile. What if they want more images? You can only design and model content based on what the client tells you at the time. Don’t be afraid to tell the client that
- Audience comment: “Publishing online is not creating Word documents.”
- Influence and advise client using size of fields, instructions, options available
- Make it fun. Clients need to enjoy managing their site. Make them feel like designers. Enable them to do something they never thought they’d be able to do. Make it feel less like work (and less like Word)
Improve the Control Panel
- #8 Signpost using tabs. Make tabs for things the client needs access to
- #7 Remove what isn’t needed. Current dashboard is laughable; get rid of notepad, bulletins, comments, etc. Same on Edit tab - opportunities to remove confusion - remove trackback column, comment count, etc.
- #6 Improve usability. Add hover dropdown on edit tab, install Edit Tab AJAX extension
- #5 Add extra content. Add extra columns to Edit page (e.g. Categories)
- #4 Content Previews. Use Live Look. Fix the Publish page buttons and kill the default ‘Saved’ page using the Publish Tweaks extension
- #3 Use jQuery to change stuff. For example, change the label for the title field on Publish page depending on the weblog they are using. Avoid client confusion. Remove Options checkboxes dynamically. Tiny changes can make a difference to client understanding
- #2 Use field instructions. Include image dimensions, or more complex details. Use jQuery or extensions to add additional detail. Say how content will be displayed
- #1 Create a new theme. This is a lot of work. Does this breach the license agreement? Don’t know, maybe
Q&A
How much training do you provide?
No documentation - we create videos and offer staff training. It’s important to bring the client in as early as possible and get them using EE.
It was also interesting to note that Erskine keep their templates under an /assets/templates/ folder (outside of the system folder).
Paul Burdick - Add-On Development: EE Expects That Every Developer Will Do His Duty
- Categories:
- ExpressionEngine, PHP
- Tags:
- Published:
- 12:24pm on Monday 26th October, 2009
Paul Burdick is the ex-CTO of EllisLab, and now works as Lead Developer for ExpressionEngine add-on shop Solspace.
Download Paul’s slides here in PDF form: http://bit.ly/addons_eeci2009.
All about add-ons
- What are add-ons? There are three types - extensions, modules and plugins
- Extensions extend basic EE functionality, allow you to interpose your own code. Developers are extending the idea by adding their own hooks in their modules. Typically extensions don’t have a database table, but do have settings in the Control Panel
- Modules are the “mighty workhorses” of EE. They typically have a Control Panel area, database tables, and their own template tags
- Plugins have no settings and no install process. They offer text manipulation via template tags or custom fields
- On Devot:ee the add-ons currently break down as 51% plugins, 35% extensions, 15% modules
- EE 2.0 will introduce Accessories - tools, references and abilities that go at the bottom of the CP. They can have database tables, and use View files. Defaults include Learning, Notes, Tips
Developing add-ons
- Necessary skills you will need to be an add-on developer: PHP (learn at php.net, w3schools, and Zend), SQL (note that Active Record is part of EE 2.0)
- View files are HTML with PHP in, and are used in EE 2.0 (they can also be used in 1.6.x with Solspace’s Hermes). They are much easier to write than using the Display class
- Build your UI in static HTML/CSS/JavaScript first before converting to View files. It’s easier to test that way, and specialist UI developers don’t need to know PHP
- jQuery is available by default in EE 2.0 (although it’s not the best way to learn JavaScript). EE 2.0 also makes it easy to use other JS libraries
- Never, ever just start coding! Don’t just write code and release it. Do research - look at previous releases, how are big companies doing it, What are your required features
- There are a lot of add-ons that do not need to exist. The Query module, or JavaScript+AJAX can do a lot
- Is a module required? Could an extension do it? Or a plugin that outputs weblog data?
- Tell a story - how would a user do this? What would Apple do? Eliminate steps, follow your instincts
- Map out features - major, minor, and “icing”
- Include your own hooks for future expansion
- Database structure - plan your tables, with separate ones for preferences and data. How does your add-on interact with EE’s own tables? Normalization - eliminate data duplication
- Use specific, sensical field names
- Use indexes
- When naming template tags, give them a good name, and describe the parameters and variables in the comments. Explain what each one does
- Make tag name simple and obvious. I want to be able to read the template and know what it does. No abbreviations
- Parameters - use prefixes to namespace parameters and group functionality
- Variables - there should be no ambiguity and no abbreviations. Name variables the same as their corresponding database field, then you can just loop through a query result row to find and replace. Prevent collisions in variables.
- Underscores are recommended
- Get feedback - revise your add-on spec until solid
Building an add-on
- Break the Control Panel page into sections: Data (create, modify, delete); Preferences/Settings/Permissions (copy preferences is a handy tool to provide); Actions - recount records, cache management; display the version number and documentation link
- Keep it simple - build what is necessary and no more
- Build it in HTML/CSS/JavaScript first; use a view file, put the PHP into the HTML (not the other way around), and ignore IE6 (EE 2.0 and Solspace do)
- Have goals and milestones not deadlines. Don’t release software until you think it’s ready
- Writing code - follow the EllisLab developer guidelines! Comment well and properly. EE code has jokes and ASCII art in it
- Sanitize and escape everything. Assume all data is tainted - sanitize and escape at the query, not at the top of your class
- Abstraction - use twice, write once. Create libraries - reduces work and mistakes
- Simplify - bail out of the process first, as soon as you find a problem, do the actual work second
- Reduce database work. Multiple queries are okay; validate, check pagination with a COUNT query, and only then retrieve data
- Consider using a Model to abstract queries
- Per page load caching - use
$SESS->cache[‘modules’][‘module_name’][some_cache’] = array();to cache query results, preferences, etc. Use a reference - If you need weblog data, just use the Weblog module -
include()it and call its methods - Provide tools for keeping things tidy - remove old data/caches, optimize tables (regularly or provide a button to do so)
Debugging and improving performance
- Debugging and performance are the same thing
- Turn on error reporting - no PHP errors ever!
- Turn on SQL queries - review your queries, check CP, settings, tags in templates - eliminate duplicate queries!
- Are certain queries necessary on every page load? Validate and check cache. Evaluate queries for performance - to improve things, try adding a WHERE clause on an indexed field, and remove extraneous JOINs
- De-normalization - duplicate data to reduce work. Abstract methods for data consistency
- Learn about MySQL performance - mysqlperformanceblog.com is a good resource
- Turn on Template Debugging - what code is taking the longest to run? You can add debug entries in your code, e.g. before and after a query or loop, using
$TMPL->log_item(); - Embeds are heavy - they run all the “new page” queries for each one. Automated actions - slow down your add-on. Use AJAX instead
- Use
trigger_error()to throw errors for deprecated code - Ask for help. Often just discussing a problem will lead to a solution
Ryan Irelan - Ten Ways To Supercharge Your EE Development
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 11:31am on Monday 26th October, 2009
Ryan Irelan works for Happy Cog West, and is also responsible for EE Screencasts, the EEInsider site, EE Help Chat, and the EE Podcast. He is working on an ExpressionEngine book that will cover EE 2.0.
Follow along with Ryan’s slides over on SlideShare.
Top Ten Tips
- #10 Pre-package your EE install. Install and configure your favourite add-ons, setup system preferences, create default weblogs, configure your favourite tab arrangement, enable extensions and modules, and setup default members and groups. Export it all into a SQL file and zip up the files = default EE installation. I’ve converted all this into a shell script
- #9 Use Version Control. It adds an extra layer of security, as well as version tracking. Happy Cog West uses a remote database due to the difficulty of merging database schema changes; all staff/management/designers use Subversion
- #8 Config Variables. You can use config.php to store other configuration variables (e.g. you can put FieldFrame paths in it). EE will honour config variables over the database value. There is a list of config variables on the ExpressionEngine Wiki
- #7 Avoid Add-On Insanity. There are sites that use too many add-ons, making itdifficult to figure out what has happened when something goes wrong. Find more creative solutions to problems (e.g. you don’t need an add-on just for a “Tweet this” link)
- #6 Optimize Now (And Later). Make use of the disable parameter as you code (i.e. don’t plan to go back and add it later). EE also has ‘extreme traffic overrides’ - you can disable all tracking as a quick fix to site traffic problems. Solspace offer a site evaluation service
- #5 Become Fantabulous. Add as many tabs as you need to get to the stuff you use regularly. You can even save edit filters as tabs
- #4 Developer Add-Ons FTW. SL Developer Info and Pur Developer add pages or links to your Control Panel full of developer-specific information. LG Add Sitename allows you to display server time settings in the header
- #3 Keep An Eye On The User. Make it easy for the user, not for you. Set up default tabs for users, use custom field groups for content instead of one catch-all group, keep the control panel as clean as possible, remove the formatting bar and dropdown, turn off the url title field, turn off dates if they’re not important. Don’t have to tell clients “Don’t worry about it” if they never see it!
- #2 Try Structure. It’s a free module; I didn’t try it for a long time, but now I have I’m really impressed
- #1 Take A Chance. Step outside your comfort zone with your tools; try writing an extension
Q&A
What do you recommend for deployment?
Tried Capistrano, Git+Capistrano, but not found a magic bullet for that - would love to hear if anyone has one.
Why do you work with a remote database?
Only with team, not on solo projects; it’s slow using remote db, but stops conflicts.
Have you had issues with performance on related entries?
Yes, we have had to write custom queries sometimes.
Is the use of config.php variables automatic or does the developer have to code for that?
EE does the check, but you do have to code for it yourself in your add-on.
Leevi Graham - How to start developing your own add-ons
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 11:27am on Monday 26th October, 2009
Leevi Graham runs Newism in Australia, and has developed more than 25 add-ons over the last two years. His first and most profitable add-on was LG Better Meta, and Leevi was named 2008 Add-on Developer of the Year on Devot:ee.
Download Leevi’s slides (PDF) here: http://bit.ly/efYkA, or watch the video of his presentation on Vimeo.
About Add-Ons
- Plugins render front-end tags. They are simple to build, offer custom field text formatting, use a single file, have no Control Panel administration, no settings, and can’t process forms. 99% of plugins are for the front-end
- Modules are 50/50 front-end and back-end. It is easy to upgrade a plugin to a module; they can process form submissions, use multiple files, but have no settings
- Extensions let you “take control” of EE. They extend existing tags or the control panel, have a built-in settings form, and are all done through EE’s built-in hooks. Extensions must be activated to use, and don’t offer tag parsing. Hook registration can be complex for beginners
- Hooks hook into the core EE processing, and there are over 170 of them. An extension’s class method is called when it’s hook is executed; you can see which hooks are used where on Devot:ee
- Your code should always check whether someone else has already used the same hook
- If you are developing a combined extension and module, I recommend you put settings specific to the extension into the extension, rather than in the parent module
- Add-Ons combine extensions, modules and plugins. This means lots of files in different locations, with dependencies on one another
- Where to find add-ons: Official repository (144), the EE forums (?), Devot:ee (480), GitHub (114)
- For help developing add-ons, there is documentation and a list of hooks on the EE site
- If you put your code on GitHub, community has adopted the xxx.my_addon_name.ee_addon naming convention
Leevi’s Development Process
- I’ve started providing templates and themes incorporating the add-on so that users can see that the add-on works, rather than struggling to work through the code themselves
- Always end extension classes with
_extto prevent class naming conflicts - Documentation is important; it’s the most boring job, but if you do it properly and provide examples, your support requests will more than halve
- If an add-on is worth writing, it probably should be for sale - so charge for your extensions
- But without releasing free stuff initially, I wouldn’t be in the position I’m in now, so it’s a balancing act
- Currently offers email-based support (Brandon Kelly uses GetSatisfaction)
- Free LG or NSM add-on licenses for everyone at EECI2009!
Q&A
Is it worth spending the time to build a payment system handler so you can sell?
Yes - you might spend a week building something, but you can then use that to sell for years.
Leslie Camacho (EllisLab President) noted that lots of hooks were stripped out of EE2.0 for the beta phase to limit developers and reduce bug report complexity.
Michael Boyink - Quoting and Planning ExpressionEngine Projects
- Categories:
- Business, ExpressionEngine, Freelancing
- Tags:
- Published:
- 11:24am on Monday 26th October, 2009
Michael Boyink is a consultant and trainer who has been working with ExpressionEngine since 2002. He discussed his process for planning and quoting on EE projects.
Watch Mike’s presentation over on Vimeo.
Pitching and quoting EE
- I pitch EE as a commercial product that has people working on it for a living, paid tech support staff, security, and great community
- You don’t need to know the size of a site to quote for it any more. Now we need to know how many weblogs/channels it will have. All other aspects - fields, groups, templates - all depend on the number of channels
- There are always other pieces is of content that don’t fit
- Look through the site and identify unique content types
- Other things that add complexity: complex content types, IA complexity, frontend complexity, people, the server environment
- Also: don’t forget project management, other things that need to be done in the project (e.g. content importing)
- Come up with a range of project hours, then give it a gut check - does it feel right? Come up with a final cost. Billing by hours is bad - the better you are, the less you can charge
- I usually give a ballpark figure so the client can decide whether they want the full quote/proposal
Office walls
- Everything goes up on a project wall - the quote, a site map, content and designs. With everything in front of you it is easy to spot issues (e.g. the
- design doesn’t accommodate the content, or IA issues)
- Post new versions over the top of old ones; kind of paper-based version control. Never take anything off the wall
- Build deep content first so the client can start entering their data earlier
- The project board is a good way to jump back into a project after time away
Q&A
Do you charge ongoing costs?
Don’t do it, in fact I sell against it in proposals, and don’t charge for doing upgrades.
How do you do training?
Offer a visit, screencast, or documentation. Clients usually prefer on-site visit.
How do you charge for licenses?
The client buys the license, so they own it.
Who should populate the content?
We can do it, but it’s better - and good training - for the client to do it.
Do you ever customise the Control Panel?
No, never needed to; sites either don’t need it done, or there isn’t the budget for it.
What add-ons do you use or recommend?
Don’t really use them - I’m very careful to keep EE as clean as possible to be ready for 2.0.
Brandon Kelly - Make A Market Out Of Our Community: The Whys and Hows of Selling Add-Ons
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 11:21am on Monday 26th October, 2009
Brandon Kelly is an ExpressionEngine add-on developer, responsible for the extremely popular FieldFrame and Playa extensions. He spoke on the importance of commerciality in add-on development.
You can watch a video of Brandon’s talk on Vimeo.
On commercial add-ons
- Got into ExpressionEngine at the beginning of 2008, releasing Playa in April 08 (it won Devot:ee extension of the year). Gypsy was released in December 2008, and FieldFrame in March 2009
- Supporting and working on these add-ons was starting to feel more like a job
- Decided to charge for Playa 2 - $69 seemed like a good number to choose ;)
- Released Wygwam for $29 in September 2009
- Making enough money now to support myself, so going full-time freelance at the end of 2009
- There are lots of free add-ons; we need to change this. Only really simple things should be free
- It pays to sell. Maybe this is a unique siutation to EE; WordPress users won’t pay for anything
- Get paid because you deserve it - you’re never done when you release a popular add-on
- It is easier to support paid add-ons - there are less but better users, more knowledgeable requests, and you feel more obliged to help
- Pricing: Wait until you’re finished before setting a price. Play customer - you’re picking a price that the customer will want to pay
- Effort != Value. Find a price point that feels right
- Marketing: an entry on Devot:ee and a forum post might be fine for free add-ons, as someone else will try it and talk about it more. But you can’t do this with paid add-ons; you need to put something together for your users. Be excited! If you’re not, what do you need to change to have a product you are really excited about
- Playa is a great example for how to set up a site to sell an add-on
- Buy advertising on EE fansites
Q&A
Ever had any issues with piracy?
Not bothered - the time needed to combat it is more than the time stolen in support.
Leslie Camacho: What do you want EllisLab to do for add-on developers?
Would be nice to be able to advertise add-ons on the official site, but ultimately it’s up to the individual developer to market their add-ons themselves.
Why make Wygwam?
I received several requests to make a WYSIWYG editor for FieldFrame. Wygwam represents the first time I’ve made an add-on that wasn’t to solve my own problem.
How do you sell online?
Using a hacked version of Simple Commerce module.
What do you think about an Add-On Store?
Would be good, maybe. But it would need good quality control.
How long do you spend on support?
About 10-15 hours per week.
What happens if you decide to give up?
One of the benefits of selling add-ons is that you don’t want to give up. But probably another commercial developer would take over my add-ons.
Will you accept commissions from agencies?
Possibly, but I have a big backlog of ideas already.
How do you develop?
Frontend first - HTML, CSS, and JavaScript - before looking at the backend.
Any plans to integrate add-ons that compete?
No - competition is a good thing.
Veerle Pieters - Designing and Using The New EE 2.0 Interface
- Categories:
- Design, ExpressionEngine
- Tags:
- Published:
- 10:16am on Monday 26th October, 2009
Veerle is a highly-respected designer and blogger, and runs Duoh! with her husband Geert Leyseele.
Watch Veerle’s talk on Vimeo.
The Design Process
- I was asked to design the new EE 2.0 interface
- The brief: tabbed menu, the ability to remove and add tabs, save space, make it more professional and less bloggy, fluid layout, smooth edges and softness, customisable GUI, inline demos, and user shortcuts
- The design process: I was thinking in terms of tasks and levels. Keep it simple. It is better to start designing for beginner users, then the UI can be adapted for experts (rather than the other way around). The current EE Control Panel is overwhelming with options and features
- Thinking about IA rather than design
- Screenshots demonstrating iterations on the CP homepage, admin page, file upload preferences, and templates page
- The Publish page will have a “Writing Mode” - a lightbox that covers the entire page, hiding all non-writing tools
- Delivered the PSD files to EllisLab and thought the job was done. But then I decided to make a more sombre, grey theme with hot pink higlights. It was eventually chosen as the default for EE 2.0
- If you use the highlight colour for every clickable element, there is no hierarchy
- Still talking to EllisLab to finalise design touches - correct usage of highlight colour, rounded CSS3 corners, transparent PNGs, typography, spacing
Q&A
What about IE6 support?
(Derek Allard) IE6 is not officially supported for the Control Panel.
Derek Allard - Standing On The Shoulders Of Giants
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 10:13am on Monday 26th October, 2009
Derek Allard is EllisLab’s Technology Architect, and discussed how community shapes development at EllisLab.
Download the slides of Derek’s talk here (PDF): eeci2009_derek_allard_slides.pdf.
EllisLab’s Development Process
- Fell into teaching about web technology; spent 10 years freelancing and teaching
- How did we get the idea for Image Editor? EE 2.0 was supposed to be feature-neutral, but we’re trying to make EE work the way you work. Feature ideas come from the developers, the staff, blogs, but most often from the forums. We need compelling user-stories to justify new features, and they need to fit into our vision for EE
- We use Subversion, but have experimented with Git. There are eight people contributing to the EE codebase now
- EllisLab have adopted the Scrum methodology to run development; they work from a priority list, assign time estimates (using the PlanningPoker site to compare blind estimates from developers); tasks are assigned to whoever wants to work on it
EE 2.0’s Image Editor
- For Image Editing, we looked at other implementations, particularly non-web - EE 2.0 was heavily influenced by Mac OSX
- Live Demo: the new Image Editor features multiple upload directories, Quick Look-style popups, multi-select rows with the keyboard, download multiple files as a ZIP archive, auto-update the UI with no page reload, crop/resize/rotate/flip tools. We’ll be adding other tools like watermarking eventually
- Needed to integrate it into the Publish page - inspired by CoverFlow, initially I created an animated popup at the bottom of the screen. EPIC FAIL - unintuitive, set unrealistic expectations, so it was scrapped
- Came up with a much better interface. Work within constraints of bandwidth, thumbnails, natural flow, needed to work with keyboard navigation
- Live Demo: Publish page integration features paging, only loads images that are visible on the screen, caches thumbs, uses a custom File fieldtype - FieldFrame is an official part of EE 2.0
- Extensions will be packaged in their own folders (language, views, etc. all in the same place)
- Release and Review process - are we happy, is the community happy? All aspects of EE are under this scrutiny
Q&A
Is there edit history for images?
No, edits are destructive.
Can we upload multiple files?
Will be able to upload a zip archive of files, but not multiple files at once. There are security implications with using a Flash uploader to do that.
Is there any way to store data with image files (e.g. copyright)?
No.
Simon Collison - Five Years Of Quiet Revolution
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 10:10am on Monday 26th October, 2009
Simon Collison is the Creative Director of Erskine Design, and discussed his personal history of using ExpressionEngine.
Watch or download Simon’s slides from Slideshare.
My EE History
- ExpressionEngine lets us meet wishlists from clients. As a tool it creates possibilities
- Background is from building static sites, then using Mambo and MovableType (“crap”)
- Moving to a dynamic, database-driven site for the first time is exciting
- Became a designer at Agenzia, using and hacking pMachine a lot
- Sold the use of EE 1.x for the Libertines website on the strength of the possibility for community interaction
- As EE was developed, the tools we needed started to come out in each release. EllisLab were listening
- Convinced Friends of ED to include ExpressionEngine in the Blog Standards Solutions book
- Agencies and individuals such as Solspace and Mark Huot started to use it as the backbone of their work
- Jamie Pittock launched the first EE fansite, Jambor-ee, and Mike Boyink’s Train-EE was providing tutorials. We started to have places other than the official forums where the community could share their knowledge
- The Frieze magazine project was a big test of EE; sixteen years of magazine archives, complex content models, and demonstrated the power of the Multiple Site Manager module
- EEInsider and Devot:ee appeared to share more community information
- Some add-ons become indispensable - Erskine need Playa and other commercial add-ons in their work
- When building a website, it’s wrong to be limited by the technology you use. With EE, we can design sites with an awareness that we can make it happen
- The ability to (re)design the admin interface ourselves is important
- We are building our own Ad Server module
- EllisLab hired Erskine Design to design and develop the demo site that will be included with 2.0
- The tools coming out in EE 2.0 are what we’ve been waiting for, but we need to spend time with 2.0 before we’ll be comfortable using it for client work
The future of ExpressionEngine
The future of EE should be to meet the needs of developers and clients. Simon covered the points he believes EE should consider as it grows past the 2.0 milestone.
- Adopt common developer methods
- Have robust first-party modules
- Provide on-going support for vital add-ons
- Enable development staging and delivery
- Provide Un-Simple Commerce!
- Reintroduce the Advisory Board
- We need more demos and better example sites
“The quiet revolution is over. If we work smart as a community, we’re in for a great ride.”
Leslie Camacho - Foundations: ExpressionEngine 2.0
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 10:01am on Monday 26th October, 2009
Leslie Camacho, the President of EllisLab, described the journey to EE 2.0.
You can watch or download Leslie’s keynote presentation at Vimeo, and his slides can be found on Slideshare.
The Journey
- This week brings the cone of silence to an end, and sets the foundation for the next 5-6 years
- The original pMachine Pro site was built by Rick Ellis for Nancy Sinatra, and ran on PHP3
- The community that grew up around pMachine Pro was using it as a CMS, not as a blogging tool
- The EllisLab team all come from a freelance background; it’s very much a tool “by web developers, for web developers”
- ExpressionEngine has never been called a CMS internally; we call it a “web publishing platform”
- We underestimated the amount of work 2.0 would take; version 1.6.8 has 168,000+ lines of code and hundred of add-ons
- Some example sites running EE: Vodafone Mobile Clicks, SEED, A List Apart, BMI Music, Change.gov, Frieze magazine, Leiden University
- These aren’t websites, they are custom web applications. Our CMS needs to bridge with other solutions, tight integration is a necessity. EE is used as a framework
- Success for web developers means the ability to deliver custom web applications. The line between website and web application is disappearing
- Foundation > Features. EE 2.0’s foundation is that it is the best commercial CMS, proven in the market, and CodeIgniter is a highly-praised framework (Rasmus Lerdorf, inventor of PHP, says it is the best)
- So EE + CI = next generation web publishing
ExpressionEngine 2.0
- EE 2.0 has over 50 new features, a new UI, image editing and a file manager
- EE 2.1 will return to the normal EllisLab development cycle, and will be a performance/stability/security release
- Pricing: $149 non-commercial license, $299 commercial license, $50 to upgrade from 1.6.3+, and a $99 freelancer license for up to 5-man web shops to use on their own sites
- Also introducing corporate licensing and support
- 1.6.8 will be available to download with every 2.0 license
- Via a video clip of CTO Derek Jones: 2.0 will have custom fieldtypes, an iPhone control panel, and be released on December the 1st 2009
- An exclusive look at EE 2.0 will start on EEInsider on Monday 26th October
Q&A
Will modules in 2.0 just be able to make calls directly into the CodeIgniter API/modules?
(Derek Allard) Yes.
How much will Multiple Site Manager cost?
Haven’t yet decided for MSM. Corporate license will be expensive.
jQuery for the Control Panel Considered Harmful
- Categories:
- ExpressionEngine, JavaScript
- Tags:
- Published:
- 3:55pm on Saturday 24th October, 2009
Okay, it’s not actually harmful—in fact it’s rather awesome—but you’ll not get any blog traffic without a provocative title, right? What it can be is a pain-in-the-ass when working offline due to the default settings.
The jQuery for the Control Panel extension is not a first-party extension (it was created by the clever folks at nGen Works), but it does come bundled with ExpressionEngine and is invaluable (and often a requirement) for other add-ons. Unfortunately, the extension’s default settings are to load the jQuery library and UI from Google’s centralised repository for JavaScript libraries; this means that if you don’t have a working internet connection—you’re working on the train or a plane, say, or trying to perform a live code demo at a tech conference with patchy wifi—you’ll get nothing but a spinning icon and no JavaScript.
Pros and Cons
Loading code from Google’s servers obviously has some fantastic advantages. The response time is likely to be super-fast with 100% uptime; it’s a different domain to the rest of your site, so downloads can happen in parallel; and if the user has visited a different site using the same library they will have the file cached, speeding up your overall load speed.
But this is the Control Panel we’re talking about! Most of the benefits listed above are irrelevant, particularly if your CP admin team is a small one (indeed, for many sites it may just be one individual). And for development, where you may often be working offline, it can be crucial to have jQuery working properly in all environments.
Therefore I recommend that, when installing jQuery for the Control Panel, you also:
- Download the latest version of jQuery core and UI from the official jQuery website (zipped or not is up to you, depending on how often you find yourself stepping through JavaScript code at runtime)
- Change the Settings for the extension to point to your local files
If you are also using jQuery on your website front-end, you can even just point the extension to the front-end’s file (for example, mine lives at /j/jquery.js—save those extra characters where you can!)
Now you can work on the train, on a plane, or in a blackout—or run a live demo of ExpressionEngine while hundreds of geeks hose the wifi connection—safe in the knowledge that jQuery is always going to load when and where you want it. Just don’t forget to update it whenever a stable new version is released.
I believe EllisLab should consider bundling the latest version of jQuery within the .zip of EE (maybe in the cp_themes folder?) and default the extension settings to point to that file instead of Google.
Retain the distributed advantage
There are ways that you can host your own JavaScript library but still retain (most of) the advantages I mentioned above when using Google’s repository. I can’t help you with Google’s uptime (but what does that matter if your own site is down? All you need to worry about is your own uptime, really) but the other benefits are easy enough to duplicate.
- Serve your site assets—which might include images and stylesheets as well as your scripts—from a different subdomain on your own site, e.g. assets.example.com. It’s easy enough to configure your server to point the subdomain at the same location as the rest of the site, but you get the benefit of parallel downloads.
- Use Stephen Lewis’ SL_Combinator extension to minify, combine and zip your scripts (and stylesheets) for the front-end site. The result is one single, cacheable file for your users, and you can still refer directly to the jQuery library from the back-end.
Summary
I hope this helps you avoid the annoyances of interrupted work or embarrassing beachballing on stage if you’re trying to work with jQuery as part of the ExpressionEngine Control Panel. It’s a fantastic library and extension; if it were not for this one little issue it would be perfect.
How to update ExpressionEngine when your system folder is outside the web root
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 9:14am on Saturday 22nd August, 2009
While they make it possible for you to move your main ExpressionEngine installation folder outside of the web root, EllisLab have neglected to allow for that possibility in their update scripts. This article shows you how to fix it with a couple of simple edits.
Given that there is even a blog entry on the EE site on the topic, you might have thought it would be accounted for in the version update script packaged with each new version. Unfortunately though the update instructions and the script itself ignore the possibility that you have moved your /system/ folder outside of the web root.
How to update EE, revised
First, ignore the instruction to copy system/update.php into your existing /system/ folder; instead, copy it into your web root folder (where your admin.php and path.php files are). It is now reachable at www.example.com/update.php - but it doesn’t work because the paths are wrong.
Editing update.php
Open update.php in your text editor. We are going to import the path information used by the rest of the site and update the paths needed for the update to run.
Add this line to the start of the file (beneath the copyright message):
require_once(’./path.php’);
Next, at the top of the file there are a series of definitions:
define(‘EXT’, ’.’.$path[‘extension’]); define(‘PATH’, ’./’); define(‘PATH_DB’, ’./db/’); define(‘PATH_CORE’, ’./core/’); define(‘PATH_LANG’, ’./language/’); define(‘PATH_MOD’, ’./modules/’); define(‘PATH_EXT’, ’./extensions/’); define(‘PATH_PI’, ’./plugins/’); define(‘CONFIG_FILE’, ‘config’.EXT);
Let’s update them to use the correct path information:
define(‘EXT’, ’.’.$path[‘extension’]); define(‘PATH’, $system_path); define(‘PATH_DB’, $system_path . ‘db/’); define(‘PATH_CORE’, $system_path . ‘core/’); define(‘PATH_LANG’, $system_path . ‘language/’); define(‘PATH_MOD’, $system_path . ‘modules/’); define(‘PATH_EXT’, $system_path . ‘extensions/’); define(‘PATH_PI’, $system_path . ‘plugins/’); define(‘CONFIG_FILE’, $system_path . ‘config’.EXT);
We’re almost done, but there’s just one more place where the path is hardcoded and needs to be fixed. In the Update() class method update_manager(), we need to use the path information one more time. Change these lines:
function update_manager()
{
global $DB;
Here's the revised version:
function update_manager()
{
global $DB, $system_path;
$this->update_dir = $system_path . ‘updates/’;
We’re just overriding the path to the update directory with the correct path.
Now load the update script at www.example.com/update.php to run the update with no problems, despite your /system/ root not being where it ‘should’ be.
This should be in the EE trunk
Hopefully EllisLab will eventually make this hacking unnecessary and incorporate these changes into the official release, but in the meantime if you’re a security-conscious developer I hope this was useful.
ExpressionEngine: Scrippets for FieldFrame, too
- Categories:
- ExpressionEngine, Film
- Tags:
- Published:
- 1:44pm on Wednesday 17th June, 2009
Following yesterday’s work to convert the Scrippets plugin for ExpressionEngine, it was simple to turn it into a new field type for Brandon Kelly’s excellent FieldFrame extension.
If you’ve not used FieldFrame before, you are missing out on some serious EE goodness. It extends the default set of field types, including many straightforward fields—checkboxes, radio buttons, etc.—plus many, many more contributed by other developers.
And now there’s one more
The Scrippet field type works in exactly the same way as the standalone plugin, except that you enter your plaintext script content in its own separate field in the Control Panel.
Then you simply refer to your field (by whatever name you have given it in Custom Fields) in your template, and the formatting is automatically applied:
{exp:weblog:entries weblog=“blog”}
<h2>{title}</h2>
{script_extract}
{/exp:weblog:entries}
The parameters are the same as for the {exp:scrippet} plugin (see my previous entry for details), and you also need to either link to or include the CSS from scrippets.css as well.
It works as part of the FF Matrix fieldtype as well, so you can post tables of script snippets to your heart’s content. Grab the files from GitHub as per normal.
What is GitHub? GitHub is a web application that uses the version control software Git to allow its members to manage their code online. I am hosting the files for this article there so that any bugfixes or improvements I make can be found in one central location.
New ExpressionEngine Plugin: Scrippet
- Categories:
- ExpressionEngine, Film, Writing
- Tags:
- Published:
- 11:27am on Tuesday 16th June, 2009
Here’s a little piece of formatting niceness that will be handy for anyone with an interest in film or scriptwriting. The Scrippet plugin converts your plain text screenplay extracts into nicely-formatted script blocks.
Based on an original idea by screenwriter John August, most of the work on Scrippets was done by Nima Yousefi for the original Wordpress plugin. I’ve simply taken that code and adapted it for use in ExpressionEngine.
Installation and Usage
To install the Scrippet plugin, grab the plugin and stylesheet from my GitHub repository. Copy the pi.scrippet.php file into your /plugins folder.
Unfortunately, ExpressionEngine doesn’t offer an easy way to dynamically load additional stylesheets, so for now you can either attach the scrippets.css stylesheet to your template, or copy-and-paste the CSS rules from that file into your existing site stylesheet.
To use the plugin, wrap your unformatted screenplay extract in {exp:scrippet}{/exp:scrippet} tags:

{exp:scrippet}
INT. CARGO LOCK
The Queen spins at the sound of door motors behind her. The
parting doors REVEAL an inhuman silhouette standing there.
Ripley steps out, WEARING TWO TONS OF HARDENED STEEL. THE
POWER LOADER. Like medieval armor with the power of a
bulldozer. She takes a step…the massive foot CRASH-CLANGS
to the deck. She takes another, advancing.
Ripley’s expression is one you hope you’ll never see… Hell
hath no fury like that of a mother protecting her child
and that primal, murderous rage surges through her now,
banishing all fear.
RIPLEY
Get away from her, you bitch!
{/exp:scrippet}
Parameters
There are a few optional parameters available to use with the {exp:scrippets} tag:
width- Sets the width (in pixels) of your scrippet blockbg_color- Sets the background colour of the block; you can use hex values, colour keywords, or RGBa valuestext_color- Sets the text colour; possible values as perbg_coloralignment- Valid values areleftorcenter; blocks withalignment=“center”will be centered on the page
The default appearance of the scrippet blocks is black text on a pale yellow background, 400 pixels wide.
Formatting options
Styles are applied to the text according to how it is formatted:
- Scene headings start with either “INT”, “EXT” or “EST” and are all capitalised
- Transitions end with a colon (e.g. “CUT TO:”) or can be a few hard-coded other options (e.g. “FADE TO BLACK”)
- Characters will be in ALL CAPS followed by a single new-line
- Parantheticals will be wrapped in parentheses, obviously
- Dialogue comes straight after a character or paranthetical element
- and Action is anything that doesn’t fall into any of the above categories
You can also include some additional formatting by using standard Textile markup for **bold text**, *italicised text* or _underlined text_.
Future developments
Another obvious use-case for this would be as a new field type for Brandon Kelly’s FieldFrame extension, and when I have a few spare minutes I’ll throw that together too.
What is GitHub? GitHub is a web application that uses the version control software Git to allow its members to manage their code online. I am hosting the files for this article there so that any bugfixes or improvements I make can be found in one central location.
Review: FTPOnTheGo and TouchTerm SSH for iPhone
- Categories:
- Freelancing, iPhone
- Tags:
- Published:
- 3:51pm on Friday 12th June, 2009
During our last family holiday, any serious client website issues meant a quick trip to the nearest town and an hour in the public library to use the creaky old PC they helpfully provide for vacationing web designers. This year, though, I can work directly on the server with my two new favourite iPhone apps: FTPOnTheGo and TouchTerm SSH.
FTPOnTheGo

The file handling capabilities of the iPhone have always been a little underwhelming, making the killer feature of FTPOnTheGo—downloading, editing, and uploading files—that much more impressive. But let’s start at the beginning.
The app sensibly opts to use the standard iPhone UI library rather than introduce their own graphical lexicon, so it all feels very natural and the learning curve is shallow. An unexpected addition is the presence of short YouTube “how to” videos available right in the app, which serve to introduce the basics to new users.
Simply provide a server address, username and password (or select from your bookmarked connections) to connect to a server either by FTP or SFTP. Once connected, you can browse through the files and folders; sort by name, size or date; upload pictures from your phone; create new files or folders; and rename, delete, move or save existing files. It’s also possible to use your iPhone as a Web or FTP server and share files from it, although I haven’t needed to use that feature yet.
But the real lifesaver for any web developer away from his desk is the file editing. Click a file then click the ‘Edit’ button to launch a basic text editor with support for Find/Replace, encoding changes, and usable in either portrait or landscape mode. When you’re finished editing, simply click ‘Save’ to upload the file back to the server.
While it’s obviously not the optimal device on which to code (and I’d like to see a more customised keyboard to make it easier to access commonly used keys such as angle brackets, plus the obvious enhancement of syntax highlighting) the text size is small enough to fit a sensible amount of text on the screen, and the ‘go to line number’ feature makes navigating large files easy enough.
The app is also chock-full of user settings, including a choice of folder icons (Vista, XP, Mac or “Old School”), fine control over the font used for file editing, and several granular security options. You can also set a master password for the whole app to protect your login information.
TouchTerm SSH

Of course sometimes simple FTP access isn’t enough to solve a server problem—what if you need to stop or start a service, or… well, my ssh-fu doesn’t extend to much beyond that, but for those who need it, the ability to connect directly to your server and run commands remotely might be a lifesaver.
There are a handful of SSH apps available on the iTunes App Store, but luckily the best is also the cheapest. TouchTerm SSH allows you to connect through either a stored connection or “One-Time Connection,” and also offers the option to either save or forget passwords. It also includes management of key pairs if you prefer to use those rather than passwords.
Connecting presents you with the standard monospaced-font-on-black Terminal/Console interface, with some neat iPhone-specific features. As you might expect the handset can be rotated to use in either landscape or portrait mode. Keys that you often need access to—Ctrl, Alt, Tab, Esc, the arrow keys—are presented along the top of the screen, or can be displayed permanently as a transparent overlay, allowing you to see what you’re typing as you work. The keyboard also works in the same way, and is surprisingly usable even with multiple lines of text behind it.
There’s a bit of a latency problem while typing (as there can sometimes be over SSH normally), but there’s also a fantastic setting that allows you to buffer your command(s) in a standard iPhone textbox before sending the whole line over the wire. It also maintains a history of the text you have sent, so accessing previous complicated commands is a doddle.
There’s not much more that can be said about an SSH client, except to mention that TouchTerm also boasts an impressive array of settings, including fine control over the appearance of the various elements, and security/encoding settings.
These apps are great value for money
TouchTerm SSH is only £0.60 ($0.99 on the US store), which amazes me considering the kind of people who are likely to need a fully featured SSH app. FTPOnTheGo is a little pricier at £3.99 (probably $5.99 in the US, at a guess), but for the peace of mind they bring when away from home they are definitely recommended for any iPhone-touting web developer.
Benchmarking Array Indexes for String Comparison
- Categories:
- PHP
- Tags:
- Published:
- 2:59pm on Friday 8th May, 2009
I’ve been doing some work recently on a custom search engine and, as you might imagine, that involves a fair amount of string comparison and manipulation. When the first iteration of the search module was returning results after eleven minutes I started looking seriously at PHP and MySQL optimisations; queries are down to a few seconds now, but there are still savings to be made, and this week I’ve been testing the various ways to compare parts of strings.
Reducing Function Calls
My basic goal was to reduce the number of function calls, particularly those within large loops. Everyone knows tricks like setting the length of a loop outside of the actual check statement, and if you’ve read up on any PHP benchmarking you’ll know that some forms of loops are quicker than others:
// This is bad
for ($x = 0; $x < count($myArray); $i++)
{
// Do something
}
// This is better
for ($x = 0, $size = count($myArray); $x < $size; $i++)
{
// Do something
}
// This is best
$x = 0, $size = count($myArray);
while ($x < $size) {
// Do sometthing
$x++;
}
So my assumption was that removing function calls equals faster code. My loops were pretty well optimised—what about my string comparisons?
String Comparison Functions
I needed to compare subsections of strings, so I was using a lot of substr(), but I realised that where I knew the position of the start and end of the substring, I could use array indexes instead! So this:
if (substr($str, 0, 2) === $test) { ... }
Became this:
if ($str[0] . $str[1] === $test) { ... }
After congratulating myself for discovering this handy shortcut and optimisation trick—getting rid of that function call had to be faster, right?—I decided I should probably check that it was actually the improvement I assumed it was.
Benchmarking Results
The results are actually surprising. In tests, the substr() call is actually faster for strings of three or more letters; using pseudo-array indexes is only really worth doing if you’re comparing at most one or two characters.
It surprised me that the concatenation operations were so much slower than the substr() function call (at least 50% slower)—I was really expecting it to be a much faster way of comparing strings.
So, the lesson is that array indexes are useful for strings, but only really when you’re comparing a single character (where you can see a drop in execution time of around two-thirds)—otherwise, stick to substr().
Ada Lovelace Day: Grace Hopper
- Categories:
- Blogging
- Tags:
- Published:
- 3:34pm on Tuesday 24th March, 2009
When I signed the pledge for Ada Lovelace Day and agreed to publish a blog post on an influential woman in technology on March 24th, it seemed like a good idea. Easy enough to achieve, and something I could contribute to, however indirectly, for my daughters.
This was a rather rash decision, as it turns out; now on the day itself, I find myself struggling to find a suitable subject.
It is not as if I do not know any women working in technology. There are plenty of women that I have met or worked with; off the top of my head, any one of Carolyn, Leisa, Vero, Lea, Veerle, Glenda or Molly would probably make a perfectly good subject. But for me the sticking point is the “in technology” part—being a web designer (or usability person, or content person, or just a web maven in general) just doesn’t feel like it’s really “technology”.
So I figured I would buck the trend that has seen people like Ann and Christian blog about their contemporaries, and instead look back at someone who had an impact in the tech sector when it was in its infancy.
The Mother Of Computers
“Amazing” Grace Hopper was a maths graduate and teacher at Vassar College in NY. The first woman to ever earn a Ph.D. in Mathematics from Yale, she left her comfortable job during the war to volunteer with the US Navy, and it was there that she made her mark on the future of computing.
Hopper was one of the first programmers to work on the new Harvard IBM Mark I computer, a 50-foot-long behemoth capable of a staggering three calculations per second (!), and after the war she opted to stay on at Harvard and continue working in the nascent programming field. It was while working on the new UNIVAC computer that she developed the first ever language compiler, which later became the programming language COBOL. Hopper’s idea was that programs could be written in a language closer to English than machine code or assembly language.
Later she drove the implementation of standards for testing computer systems and languages (yay, standards!) that were later adopted and administered by the National Office of Standards and Technology.
Aside from the delicious irony of her win as the first “Man of the Year” award from the Data Processing Management Association in 1969, Grace Hopper also has an annual award, a ship, a road, a park and a data processing centre named after her. The official advisory council on the recruitment and retention of women at Microsoft is named “Hoppers” in her honour, and she has been called “The mother of computers”—but, if anyone has heard of her, it is usually because of one particular event that occurred relatively early in her career.
The first computer bug
While working at Harvard on the IBM Mark II, a moth was found to be stuck in one of the relays that formed part of the machine, causing her to remark that they were “debugging” the system. While it is not certain that the term computer bug is solely attributable to Hopper, she certainly brought the term into popular usage. (The moth is still on display in the group’s log book at the Smithsonian.)
Grace Hopper died in 1992 at the age of 85. Almost until the end of her life, she was active lecturing and speaking at universities and computer seminars on the importance of change. As she said, “the most damaging phrase in the language is ‘We’ve always done it this way.‘“
“Our young people are the future. We must provide for them. We must give them the positive leadership they’re looking for ... You manage things; you lead people.”
[Sources: Wikipedia, Biographies in Naval History. Photos from Wikipedia.]
South By South West 2009
- Categories:
- SXSW
- Tags:
- Published:
- 10:01am on Friday 20th March, 2009
Thanks to a four-hour layover in Dallas Fort Worth, I’m able to take the opportunity to write up my notes and thoughts on the rest of 2009’s South By South West while it’s still fairly fresh in my mind. Hopefully a lack of sleep and too much coffee will not overly affect my, uh, you know. That thing. Being good. With words.
Saturday (Day 2)
Friday was a late one after Dan Rubin‘s Watchmen outing (despite an automatic knee-jerk reaction to any deviations from the comic book, I actually really enjoyed it; I want to see it again before giving a full review, though). The weather wasn’t great either—cold and rain I have at home, Austin!—but once safely inside the Austin Convention Center, the upgraded infrastructure coped admirably well with the 10,000 attendees’ wifi requirements.
The afternoon keynote, by Zappos CEO Tony Hsieh, was extremely inspiring, although guaranteed to frustrate anyone without a direct line to the people able to really drive the kind of change described by Hsieh and implemented by him at Zappos. The stories he told about how their staff live and breathe the company culture and values, and how the steps that his team have taken to build a brand that will bring happiness, were great, and once the video is up on SXSW it should be required viewing for company MDs anywhere.
The worst panel I saw this year was Designing For Irrational Behaviour, which was oddly pitched between interface design talk and psychology lecture. The self-confessed tech noob college professor would have been great to listen to in the right context (i.e. college), but really struck a bum note for most of the attendees in the panel; I wasn’t alone in feeling bad for the panelists as their room haemorrhaged people throughout the scheduled hour.
I had assumed that Building Your Brand would have been at least a little relevant for someone looking for business brand tips, but instead it was purely focused on social media personal brand management. I seemed to be in the minority by not having a clue who any of the people up on stage were (okay, I know of Loic Le Meur through the LeWeb conference, but by name only), but it was an entertaining panel anyway—not least due to the presence of live Twitter search up on the jumbotron, allowing both those in the audience and around the world to participate and/or trade insults in real-time. I even got to join in—well, you can’t let someone get away with a statement like “Twitter is the new phone” without calling them on it, can you?
Sunday (Day 3)
Whenever I start to feel guilty about sunning myself in Austin on the company tab, I remind myself that I’m voluntarily spending my entire weekend working. It’s 10am on Sunday, but I’m learning about Interface Lessons From Games. Commitment, right?
There are some talks that you just know are going to be great, and Jared Spool never fails to deliver. His Journey To The Center Of Design show, complete with human bell curves and a bold takeaway (“User Centered Design is dead” according to Jared), was a definite highlight of the conference.
I also sat in on the iPhone Development panel, hoping to learn how easy it might be to build a native application. The Objective-C development platform doesn’t look too depressingly complex, and the IDE makes it easy to drag-and-drop interface elements to wire up your app quickly (ah, now I see where Atlas comes from!), but it was disappointing to hear that effectively everything they talked about is probably going to become redundant as soon as Apple releases the next version of the SDK. Still, it’s an area I plan to investigate in the medium term.
After failing to get into any of the smaller panels in the afternoon, we ended up listening to Gary Vaynerchuk do his thing in the large ballroom. I love what the guy does, and completely respect his commitment to his passion, but I don’t think I could deal with him in person every day…
(Some) Geeks (kind of) Love Bowling
My third year at SXSW bowling (and I believe its fourth year overall) was substantially more subdued than past events, with barely half the lanes in use and a much smaller concentration of geeks than last year. It was a pity that it was up against so many other parties that night (including the Facebook and Tumblr parties), and I hope that Bryan can rebuild it to its previous heights for next year, as it was always a highlight of the week for me.
Monday (Day 4)
Now in its third year, the Browser Wars session was a frank exchange of views and opinions by representatives of Mozilla, Opera, Chrome and Internet Explorer. The moderator asked some tough questions, particularly of Microsoft’s Chris Wilson, but it was great to hear about the kinds of things that they are thinking about, particularly concerning how the specs get debated and agreed. The IE discussion continued at the WaSP Annual Meeting where Aaron Gustafson summed up the work that Microsoft have been doing this year concerning version targeting—Craig Cook asked why IE8’s “IE7 compatibility mode” is subtly different from IE7 itself, and apparently they (MS) plan to fix all the bugs still relating to those discrepancies.
I had another great lunch at Iron Cactus with the guys from EllisLab (plus a few other EE enthusiasts), and later Derek Allard took us through a demo of ExpressionEngine 2.0. All I can say is, wow—it is so much more than just a port of EE 1.6 to the CodeIgniter framework. Some of the features they have added (many with great jQuery-powered interactions, Derek’s been busy!) are going to cut development time in half when you’re setting up that new EE project. I can’t wait until it comes out, and what I’ve seen means I really don’t care what the price uptick ends up being—I want this CMS!
After most of the regular sessions had ended, Alex Jones from Refresh Austin led a Core Conversation on Energising Communities. It was great to have the opportunity to participate as part of a smaller group, and there were some really interesting discussions with people from Refresh Denver and some UK-based groups too.
Tuesday (Day 5)
If there is one word that sums up SXSW this year, that word would have to be: Twitter. In virtually every panel, every conversation, and on every corner, Twitter was being heralded as the saviour of the internet. Me? I don’t think it’s jumped the shark quite yet, but it’s certainly putting on its water-skis.
The Guy Kawasaki keynote really didn’t appeal, so instead I went to the Mad Men on Twitter panel, which was really good. I’m a big fan of Mad Men, and an admirer of what I had always assumed was a carefully managed media campaign on Twitter, so I was really surprised to learn that the people behind the multitude of Mad Men characters living on the social network have absolutely nothing to do with AMC or the PR firm for the show. Of course, it’s no coincidence that many of the people who spotted the opportunity and value in twittering as their favourite characters work in the PR and marketing industry, but as @PeggyOlson pointed out it’s still surprising that more production companies (or even writers) aren’t making use of Twitter to extend their brand and character development to a sub-section of fans.
Apple’s James Craig closed out my final day of the conference with an interesting look at Universal Design, and a reminder that accessibility can often have a much bigger impact than simply making your site or app [more] usable for visitors with disabilities. Nothing new, perhaps, but sometimes you just need reminding that there are many simple steps that you can take to make life easier for people.
Summary
I had yet another great year in Austin; despite the initially poor weather it brightened up eventually, and staying right on 6th St (with Derek, Paul and Mike) really made for an ideal central location, convenient for both the Convention Center and the parties. Speaking of parties, yet again they were awesome—97bottles Happy Hour, South By North West, and the MediaTemple closing party were chock-full with friends old and new. And I finally made it to a Breakfast with Dustin at the IHOP, which ticks off another experience on my list of “quintessential American places to visit.”
I should also thank Andrea Schwandt-Arbogast for putting up with me for large amounts of the time and hanging out all week—you rock, and I probably won’t show that photograph to too many more people. ;)
Roll on SouthBy 2010. [original photo by Lan Bui]
SXSW 2009, Day 1
- Categories:
- SXSW
- Tags:
- Published:
- 8:05pm on Sunday 15th March, 2009
Based on my experience of previous years, I was expecting the Friday of SXSW to be largely a waste of time—but this year actually featured some great sessions.
Everything you know about web design is wrong
Dan Willis of Sapient drew parallels between the dawn of modern cinema (cf. Birth of a Nation, probably the only time you’re going to see the Ku Klux Klan at a web conference) and our industry’s slow discovery of the grammar of modern web design.
It was largely interesting, and Willis did point to some emerging trends as possible candidates for how things could or should change—random voyeurism, self-aware content, user-created content, ambient awareness and experiential content—but ultimately had no answers. And who couldn’t have told us that the web is different from print?
Unnatural experiments in web design
In the same ballroom, Paul Annett from Clearleft explored some of the cool hidden treasures people are putting into their designs. Starting from FedEx’s hidden arrow and the bear in the Toblerone logo, he ran through a laundry list of interesting techniques in use on the web; Silverback‘s parallax scrolling backgrounds, We Bleed Design‘s endless scrolling paint stripes, and Skittles’ recent social media experimental homepage, among others.
His point, ultimately, was that adding hidden treasures to your design can surprise and delight users, and the natural feeling of wanting to share your discovery naturally translates into high visibility and pseudo-viral marketing for your site or product.
Meet me at SXSW
- Categories:
- SXSW
- Tags:
- Published:
- 4:04pm on Tuesday 10th March, 2009
It’s been entertaining watching normally quiet blogs spring to life this week, as SXSW attendees try to remind the community that they have something worthwhile to say. Here’s one more.
In fact I have very little to say about SXSW besides linking to my post from last year about how to disable visual voicemail on the iPhone, in case any other UK iPhone owners have forgotten how to do it - and if you see me please come and say hello!
Party harty
Some of the places I plan to be are the 97bottles happy hour, the bowling, SXNW, the EllisLab party, the British Booze-Up and the MediaTemple closing party, among others. I’ve got HappyHour.org and Adactio Austin safely installed on my phone, and will be having a closer look at this impressive list of resources tomorrow before catching the early train to Heathrow first thing on Thursday morning.
We’re staying right on 6th, in an apartment about a block from the convention centre - a significant improvement on my first South-By, when we made the mistake of selecting the Days Inn, over a mile-and-a-half up the interstate. I’m looking forward to some late mornings with such a short walk to get to the panels.
See you all there!
Four tips for making more money while staying local
- Categories:
- Business, Freelancing
- Tags:
- Published:
- 5:18pm on Wednesday 4th March, 2009
John Nunemaker of Ordered List recently wrote about the effect that the current state of the economy is having on his company, and by extension the web development industry. Like many other colleagues, John and Steve have found that business has actually picked up over the last six months; however, one point that John made got my attention:
Every piece of work that we are commissioned to do comes from the reputations that Steve and I have built online. Geographically, our closest client to date was almost 100 miles away. Our clients find us online and we work remotely for them, which opens up far more opportunities than if we focused on the local chamber of commerce. Recently, someone asked me what the market was like in South Bend. My response was, “I don’t know.”
While there are some lucky companies or individuals that have the influence or reputation to work solely online, there are many of us who must rely on local connections and affiliations—and it’s that aspect of freelancing that I want to look at here, with four tips for improving your income while staying local.
1. Make local connections
The number one piece of advice for finding work locally is to make contact with as many other local web designers or developers as possible. They are not the competition, to be either resented (in the case of big, successful agencies) or pitied (omg they still use tables for layout?!); instead see every local web worker as a potential partner, outsourcer or contractor.
By creating—or being part of—a local network of tried and trusted suppliers, you will be able to take on more, and more varied, work than when working alone. Finding other designers or developers with complementary skillsets to your own lets you confidently pitch for work outside your comfort zone, safe in the knowledge that your local “Flash guy” or “Joomla guru” is available to take on what you can’t handle. And by making yourself available to other local companies or individuals, especially if you are a specialist in a hard-to-find area, you will quickly find yourself swamped with requests.
One of the best ways to get in touch with other web professionals in your area is to join a community group such as Refresh. There are Refresh groups in many major cities across the US and UK, or there will be many other diverse user groups and professional associations meeting regularly in your area. And if there isn’t a group that suits your needs—why not start one yourself?
I started Refresh Cambridge in 2006 when I moved to the city, and since then almost 300 people have joined the mailing list or attended the monthly sessions. And in return for the investment of my time and energy in setting up the group, I have made dozens of strong connections with other Cambridge-based freelancers, which in turn has led to several lucrative projects—work that I would never have landed without those local connections.
Participating in a mailing list or speaking at a local event is also a great way to promote yourself as an expert in your field, so grab every opportunity to share your skills or help out other people—you never know what opportunities it might lead to.
2. Find your neighbours online
The second way to make sure you are never far away from what is happening nearby is to join your local community online. By that I mean you should find the online social spaces where your geographical neighbours can be found.
I’m a big fan of Twitter, but until recently most of the people I followed and interacted with were not even on the same continent as me, let alone in the same city. That has now changed, and—partly as a result of Refresh and the naturally high geek quotient on Twitter—I am now also following and speaking with many people in my local area, both within and outside of the web industry. Simply by being myself I can effectively advertise my presence and areas of expertise to a local audience.
Other opportunities for local online participation might be your town/city forum, local newspaper forums, or other local interest groups with web presences. I’m certainly not suggesting spamming your services all around your corner of the web, but a well-placed forum signature or consistently helpful advice about the web can position you as a local expert and the guy to turn to when anyone needs any design or development work carrying out.
3. Participate in offline community
Another way to make connections within your local community is to get involved with offline community projects or groups. Many business blogs recommend joining your local Chamber of Commerce or Rotary Club, but there are often opportunities in other, less business-oriented, arenas. Attend classes at your local community centre or school, or volunteer with community groups or your local church, and you’ll meet many locals outside of your normal social circle, all of whom could be a potential client or referral.
I volunteer as a governor at my local school, which—in addition to providing me with the chance to think about something other than web development once in a while—has introduced me to a circle of people, all of whom are active in their community, and all of whom now know their friendly neighbourhood web designer! These kinds of connections are worth far more than an expensive advert in your local newspaper; there’s nothing like word of mouth recommendations for bringing in work.
(I should point out that none of these opportunities will work for you if you approach them at all cynically, with an eye for a fast buck—if you’re going to join groups or volunteer your time, do it for the right reasons. The fact that it may also help your business is a bonus, but it shouldn’t be your sole motivation.)
4. Search engine optimisation
Finally, what about some practical advice to finish with? If you want to attract local clients, there are some simple steps you should take to optimise your blog or portfolio site to capture local searches. As with any SEO, think about the sort of searches people might be performing. For me, this might mean:
- “cambridge web design”
- “web designers in cambridge”
- “cambridgeshire web development”
- “web design near cambridge”
and various other arrangements of those key search terms. My website should include pages optimised for those various target phrases, but it’s also worth considering your alternative target market: other web designers. Include specific technologies and systems in your optimisation—and often there is much less competition for SERP’s places than for the more popular phrases above—and open yourself up to traffic from industry colleagues looking for help with your favourite platform.
I experienced this myself recently, when I was contacted by a local information architect looking for some help with an ExpressionEngine project. He had searched online, and apparently I was the only relevant result for “expressionengine cambridge” (albeit via an old page that only mentioned EE in the footer). Needless to say, I will shortly be adding a dedicated ExpressionEngine entry to my freelance site to ensure that I don’t miss any similar opportunities.
Summary
While it is true that the internet has broken down borders and removed the need to only deal with clients in your immediate area, there is still a great deal of opportunity to be had right outside your front door. By participating in both the online and offline life of your home town, you will open doors that can lead to rewarding—and profitable—relationships.
Really Simple JavaScript toTitleCase() Implementation
- Categories:
- JavaScript
- Tags:
- Published:
- 9:46am on Friday 13th February, 2009
Googling for a quick answer to a problem I was having, I noticed today that there are no really simple solutions listed in the search results to a JavaScript implementation of toTitleCase() (the natural partner to the existing String methods toLowerCase() and toUpperCase().
So I made this one.
JavaScript TitleCase method
It’s not incredibly clever, but it does what I needed it to, and will probably be sufficient for your needs 90% of the time. The script extends the JavaScript String type with a new toTitleCase() method, which simply converts all the words in the string to their title-cased (i.e. the first letter is capitalised) equivalent. It effectively ignores words that are already upper-cased, and works fine with strings that include numbers.
String.prototype.toTitleCase = function () {
var A = this.split(' '), B = [];
for (var i = 0; A[i] !== undefined; i++) {
B[B.length] = A[i].substr(0, 1). »
toUpperCase() + A[i].substr(1);
}
return B.join(' ');
}
Include the above snippet in your script somewhere, and you can then call the method in the same way as the other String functions:
var s = "This is a sentence."; var t = s.toTitleCase();
Neat and simple, and sufficient for most of your JavaScript title-casing needs.
New ExpressionEngine extension: Cachebuster
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 8:06am on Wednesday 4th February, 2009
Ever find yourself explaining to a client (for the umpteenth time) how to press F5 so they can see the changes you just made to their site? If you’re being responsible in terms of performance by setting far-future expiry dates on your site assets, clearing the cache is often necessary to pick up minor tweaks to CSS or JavaScript - but rather than deal with yet another email from a confused client, wondering why their site layout is broken, I thought I’d find a way to automate this step.
Who ya gonna call?
Cachebuster is a new ExpressionEngine extension that allows you to automatically append a variable to your external CSS or JavaScript files. Changing this variable when you update a file tells your visitor’s browser that it is a new file and should be re-downloaded, instead of using a cached version. For a full explanation, see Stefan Hayden’s post on CSS Caching from 2006.
Installation
As this extension relies on hacking the core EE files, it is NOT recommended for mission-critical sites or applications. However, if you are confident that you can maintain the necessary hack (including when upgrading) you shouldn’t have any problems. (If you forget to upgrade, the extension will fail silently.)
Hacking a new hook
Open the /system/core/core.output.php file and locate the following lines (around line 272 in EE1.6.5):
/**—————————————————- /** Fetch the buffered output /**—————————————————-*/ echo $output;
We are going to add a new hook for our extension to allow us to manipulate the HTML output just prior to sending it to the browser. Add the new lines shown below:
/**—————————————————-
/** Fetch the buffered output
/**—————————————————-*/
// MGP Cachebuster 030209: Added new hook to do stuff with
// the final browser output
if (isset($EXT->extensions[‘before_display_final_output’]))
{
$output = $EXT->call_extension('before_display_final_ »
output’, $output);
}
echo $output;
We also need to make sure we can refer to the $EXT object - scroll up to the start of the display_final_output() function (around line 94) and add $EXT to the declared globals on the first line of the function:
global $IN, $PREFS, $TMPL, $BM, $DB, $SESS, $FNS, $LOC, $EXT;
Installing the extension
Installing the Cachebuster extension is exactly the same as installing any other extension:
- Copy the
ext.cachebuster.phpfile into /system/extensions - Copy
lang.cachebuster.phpinto /system/language/english - Visit your Extensions Manager and enable the new extension
Using the Cachebuster
When you visit the Settings page for the Cachebuster extension, you will see five fields:
- Current version – This is the version number that will be appended to CSS or JS files to force visitors to load the latest version instead of a cached version
- Apply version numbers to CSS files – Choose whether you want to control CSS files
- CSS filenames – A comma-separated list of stylesheets you want to affect (either with or without the ”.css” extension)
- Apply version numbers to JavaScript files – Choose whether you want to control JavaScript files
- JavaScript filenames – A comma-separated list of external scripts you want to affect (either with or without the ”.js” extension)
Every time you make a change to a CSS or JavaScript file and upload it to the live website, you can now login to the Cachebuster extension settings and increment the version counter. Any files flagged for inclusion will have that number appended to their filename:
<link rel=“stylesheet” type=“text/css” href=”/css/layout.css »
?v=42”>
Feedback and bug reports
There are a few obvious drawbacks to this version 1.0 of the extension. The most obvious one is the need for a hack to the core EE files - hopefully EE2.0 will introduce new hooks we can use without the need to hack.
The extension also appends the version number to every file (or at least those listed in the settings); this means that even if you have only edited one file, incrementing the version number will force visitors to download every file as if it were new. Of course, for true speed tweaks you should be concatenating your stylesheets and script files, so you should only have one or two external files at most.
If you have any suggestions for how to improve Cachebuster, please either comment below or on the GitHub Wiki for Cachebuster.
What is GitHub? GitHub is a web application that uses the version control software Git to allow its members to manage their code online. I am hosting the files for this article there so that any bugfixes or improvements I make can be found in one central location.
Show, don’t tell - Hitchcock’s Rear Window masterclass
If you’ve ever opened up a book on screenwriting, one of the cardinal rules drummed into writers is: “Show, don’t tell.” Film is a visual medium — if you want to convey some information, it is far better to communicate that information visually than have a character spell out what you want the audience to know. (A truism exploited by Mike Myers in the Austin Powers films, where all story exposition is delivered — with a straight face — by a character aptly named Basil Exposition.)
Phyllis is afraid of dogs? Then write a scene where she has to deal with an overly friendly mutt — but definitely don’t have her mention to someone else: “Hey, you know what? I’m really frightened of dogs.” It sounds forced; unnecessary verbiage that could have been avoided through better writing.
Forty seconds of perfect cinema
Hitchcock was a master of visual storytelling, and there is no better example of this “show don’t tell” philosophy than the introductory shot of James Stewart in the classic Rear Window.
With not a word of dialogue or voiceover, the audience has been told:
- Our hero’s name
- The most important aspect of his character (at least with respect to the plot) — a broken leg has confined him to a wheelchair
- How he sustained that injury, capturing a shot of a dramatic motor-racing crash
- Which tells us the type of man he is: a risk-taker
- What he does for a living, and how good he is at it — would an enthusiastic amateur have their photo on the cover of a Paris fashion magazine?
Communicating all that information verbally, and in a way that didn’t seem forced or unnatural (“Why, good morning Mr Jefferies — it won’t be long before you’ve recovered from that terrible accident at the racetrack where you broke your leg; you’ll be back to work as a famous risk-taking photographer in no time!”
), would have required several conversations with conveniently ignorant minor characters. Hitchcock manages it in forty seconds and one camera move.
Genius.
If you’re interested in more Hitchock
I highly recommend the Hitchcock Box Set, which has fourteen of his greatest films — Vertigo, The Birds, Marnie, Frenzy, Topaz, The Trouble With Harry, Torn Curtain, Psycho, Family Plot, Saboteur, Shadow Of A Doubt, The Man Who Knew Too Much and Rope, in addition to Rear Window — and is available for an incredible sub-£20 on Amazon or in the shops. All the DVDs come with great extras, too.
Or, if you want to improve your writing, I also recommend the On The Page podcast, hosted by script consultant Pilar Alessandra. Each week Pilar and guests discuss various aspects of the “craft and business of screenwriting” and answer listeners’ questions. Despite the occasional LA-specific suggestions, it’s always an entertaining 45 minutes of discussion and advice.
SXSW Countdown - a dashboard widget for OS X
If you’re heading to Austin, Texas in March for geek spring break (otherwise known as the South By South West interactive festival) you’re probably counting down the days already. What? You’d love to have something to help scratch that itch? Well, say no more - I have just the thing!
And it only took twenty minutes
Creating an OS X dashboard widget is simplicity itself. First, find some helpful instructions written by someone who know what they are doing. Next, open Dashcode and find that one of the pre-existing widgets is a countdown widget, meaning all you have to do is re-arrange the canvas elements and make some new graphics. Photoshop. Export. Rinse and repeat until satisfied with the result.
How to install your SXSW widget
If you’re not using Mac OS X, why are you still reading? There’s nothing for you here.
Mac users - download the archive below, unzip it, and double-click the SXSWCountdown.wdgt file to install it on your Dashboard. Position it front-and-centre, and check back regularly to watch the days tick down!
Reading List 2008
This time last year (and with a little help from All Consuming) I looked back at the books I had read over the past twelve months. 2007’s haul was an impressive forty-four books; in 2008, however, I overdosed on door-stop fantasy novels bringing the total down to a less respectable twenty-six.
No Stalgia
Unlike last year, I did not re-visit any old favourites this time. I also read very few non-fiction books (at least compared to last time around). Here’s the full list.
Fiction
I’m still trying to fill the gaping classic literature-shaped holes in my reading record. The year started off well, with some Kingsley Amis and Mary Shelley, but then somehow took a left-turn into modern lit before becoming bogged down in turgid epic fantasy.
- The Transit of Venus (Shirley Hazzard)
- Lucky Jim (Kingsley Amis)
- Last Exit to Brooklyn (Hubert Selby, Jr)
- Frankenstein (Mary Shelley)
- American Gods (Neil Gaiman)
- No Country For Old Men (Cormac McCarthy)
- Last Argument of Kings (Joe Abercrombie)
- Dead Air (Iain Banks)
- Atonement (Ian McEwan)
- Starship Troopers (Robert A Heinlein)
- Maskerade (Terry Pratchett)
- Little Brother (Cory Doctorow)
Comic books
Not very many graphic novels this year, but Watchmen is definitely on my reading list this year before the film comes out in March.
- 1602 (Neil Gaiman)
- The Complete WildC. A. T.s (Alan Moore)
Enormo-fantasy novels by George RR Martin
I’m a huge fan of quasi-historical fantasy author Guy Gavriel Kay, and discussions of the “you might also like” variety on the official GGK forums almost always turned up George RR Martin as a recommendation, so I finally took the plunge and dived into his epic “A Song Of Ice And Fire” series. And very good it is too.
- A Game of Thrones
- A Clash of Kings
- A Storm Of Swords Part 1: Steel And Snow
- A Storm Of Swords Part 2: Blood And Gold
- A Feast for Crows
Non-fiction & autobiography
A bit of web design, a little screenwriting, some drug-fuelled debauchery, every bit of science known to man, and the saviour of the 21st century…
- Building Findable Websites: Web Standards SEO and Beyond (Aarron Walter)
- Blink: The Power of Thinking Without Thinking (Malcolm Gladwell)
- Save The Cat! The Last Book on Screenwriting You’ll Ever Need (Blake Snyder)
- Web Form Design: Filling in the Blanks (Luke Wroblewski)
- The Principles of Beautiful Web Design (Jason Beaird)
- Slash (Slash)
- A Short History of Nearly Everything (Bill Bryson)
- Dreams From My Father (Barack Obama)
Top Picks
Without a doubt the best book I read last year was Bill Bryson’s A Short History of Nearly Everything, an exploration of just about every branch of science for the benefit of the uneducated everyman. It’s that rarest of things - an approachable science book; it does for science what Sophie’s World did for philosophy.
Aside from Short History, I also rated Last Exit To Brooklyn (by Hubert Selby Jr, the author behind Requiem For A Dream); and Barack Obama’s first book, Dreams From My Father, was also a good read - I hadn’t realised that it was written so long ago, when Obama was around my age in fact.
For 2009 I’ll be tracking my reading as per usual, although I have a feeling I’ll be using the excellent Readernaut this time around.
Fun and games and audio and video with HTML5
- Categories:
- HTML
- Tags:
- Published:
- 10:35am on Tuesday 6th January, 2009
If you’re the sort of person that enjoys poking around in other people’s code, you’ll have already noticed that this site is built with HTML5, the latest and greatest and very much still in-progress flavour of HTML. As Jeremy noted the other day, that decision has placed me in pretty lofty company this week, with UX London and An Event Apart both launching in the last few days and boasting the same stripped down doctype.
Choosing HTML5 was an easy decision
There have been a fair few articles written on the impending ascendancy of HTML5 as the de-facto standard for the web over the next few years. Back when I was curating Digital Web, we published an article comparing XHTML2 and HTML5 - the author, David Andersson, confidently declared that ”HTML5 will be the future of the web”, and given the evidence it was difficult to disagree with him. A List Apart also published a preview of HTML5, and in September last year Ian Hickson gave a fantastic demo of HTML5 features at Google.
So, there seemed little reason not to make the move to HTML5, not least because as far as I could tell one could do so by simply starting to use a much easier-to-remember doctype - everything else was icing, and I could introduce actual HTML5 features as and when they were supported by browsers. My freelance portfolio also uses HTML5, but is otherwise indistinguishable from HTML5 - but for this site, I decided to kick the tyres on some of the new elements that are available.
Poetry ... makes familiar <object>s be as if they were not familiar.
Two of the new HTML5 elements discussed in the ALA article were the <audio> and <video> tags.
Until now, if you wanted to place audio or video in a web page, you had to use a combination of the <embed> tag (for Firefox) and the <object> tag (for Internet Explorer), together with some gobbledygook attributes to make sure the browser knew what you were trying to achieve.
HTML5, on the other hand, defines two straightforward, easy to comprehend tags, and I was drawn to the fact that one could place markup inside them which would be rendered if the browser did not recognise the new element. They have built-in graceful degradation! Here is the markup for the “standout tracks” on my recent top 10 albums post:
<div class=“audio”> <h3>Standout track: Troublemaker</h3> <audio src=”/audio/Troublemaker.mp3” controls> <object type=“application/x-shockwave-flash” » data=”/audio/player.swf” id=“audioplayer3” » height=“24” width=“290”> <param name=“movie” value=”/audio/Troublemaker.mp3”> <param name=“FlashVars” value=“playerID=3& » soundFile=/audio/Troublemaker.mp3”> <param name=“quality” value=“high”> <param name=“menu” value=“false”> <param name=“wmode” value=“transparent”> <a href=”/audio/Troublemaker.mp3”>Download song (MP3)</a> </object> </audio> </div>
By placing a valid <object> Flash player inside the <audio> tag, and a simple link to download the MP3 file inside that, the track will still be available to visitors using browsers that don’t support the new element, and browsers that don’t have Flash installed. And it’s all perfectly valid HTML5!
(I’m using the 1 Pixel Out Audio Player Wordpress plugin and the instructions for non-WP blogs by Mindy McAdams - I chose this one because I liked the way it looked and worked on the Rissington Podcast.)

The end result will differ depending on your browser of choice. Opera and Safari 3.1 will use their native audio players, while Firefox, IE, and most other browsers will display the Flash player interface. Non-Flash browsers will display a simple HTML link to download the MP3 file.
This may or may not be the wrong way to embed video
As well as music clips, I wanted to embed YouTube clips that I had bookmarked via my Tumblr feed. The HTML5 <video> element is as simple to use as <audio>, albeit with a few extra optional attributes. However, I ran into one major problem - YouTube links are not in a supported video format; they are SWF files (in actual fact wrappers for other SWF files), so even in supported browsers the <video> elements wouldn’t work.
I had a choice to make. Either I could place the object/embed combo directly in the page, or I could wrap it in a <video> element anyway in the name of forward-planning, and use JavaScript to replace the unsupported video with a regular Flash player. Initially I chose the latter path, but on further consideration I have now ditched the <video> element. Perhaps in the future they will support SWF (I don’t pretend to understand all the conversations about codecs and such) and they will make a return, but for now it seemed illogical to use an element whose only purpose was to be immediately overwritten.
When all browsers support all formats, markup will be so much easier
Until that time, I believe my <audio> setup offers the best combination of technologies; native where possible, enhanced Flash player if available, and plain HTML downloads for all.
Top 10 albums of 2008
- Categories:
- Music
- Tags:
- Published:
- 8:27pm on Saturday 3rd January, 2009
As a part-time musician and full-time music lover, I’ve written precious little about music. And sometimes, when I notice that I’ve spent the entire day listening to albums that were released within six months of each other in mid-1991, I wonder if somehow I’ve lost touch with what makes discovering new music so exciting. Have I crossed an invisible line in my mid-thirties; is all I can expect from the future an inevitable downward spiral into dad-rock and easy listening?
So this year I have made a conscious effort to seek out new music. Last.fm throws up some reasonable recommendations from time-to-time, but word-of-mouth tips – from Twitter, mailing lists, or private forums – are generally more reliable and a great deal more eclectic. Peer-to-peer is a boon in this respect; I’ve got into the habit of downloading material as it is recommended by those whose taste I know matches my own, which has led to some great finds over the last twelve months. And as the year draws to an end, “Best Of” lists have also provided pointers to albums I would not have otherwise acquired.
All of which is by way of introduction to this – my top ten albums of 2008, as judged by the impartial Audioscrobbler over the last six months. (Why six months and not twelve? So as not to give too unfair an advantage to albums released earlier in the year, of course – and also to better align the final results with how my mental scoreboard figures the year.)
10. Viva La Vida (Coldplay) / Dear Science (TV On The Radio)
Tying for last place, both of these albums have featured heavily in end of year polls. Viva La Vida (Or Death And All His Friends) (to give it it’s full title) was #1 on Last.fm for 2008 despite not being as immediately catchy as 2005’s X&Y, of which I was a big fan, it definitely improves with each listen, and is a more mature and adventurous album than anything Coldplay have done to date.
TV On The Radio were a complete unknown when I came across their album on a Pownce-powered favourites list, but since first hearing Dear Science it’s been picked as album of the year by several notable publications, including Rolling Stone, MTV, and Spin Magazine. Think a synth-powered Interpol jamming with Scissor Sisters.
9. Brain Thrust Mastery (We Are Scientists)
New York trio (now duo) We Are Scientists’ first album, the awesomely catchy With Love And Squalor, would probably feature in my all-time top five, so I picked up their sophomore effort, Brain Thrust Mastery, as soon as it came out in March. It’s less riff-driven and more ambitious than their debut, but still guaranteed to have you dancing round the living room, straining to hit the pitch-perfect vocal harmonies. I was gutted to find out that they were playing here in Cambridge on the very day I was to fly out to Texas – definitely high on my list of bands to see live.
8. The Seldom Seen Kid (Elbow)
Despite almost unanimous thumbs-up recommendations from friends, I’d never paid any attention to Elbow (with the exception of their cover of Independent Woman, accompanied by Joel Veitch’s animated kittens), but when The Seldom Seen Kid won the Mercury Music Prize, I caved in and picked up a copy. I think it needs a few more listens to really grow on me – it’s one of those albums that demands concentration.
7. Glasvegas (Glasvegas)
I don’t remember where I first heard of Glasvegas – I think possibly they were featured on an early morning T4 special – but I was instantly struck by the singer’s broad Weegie accent giving their indie rock something of a “Proclaimers do Coldplay” feel.
6. Fleet Foxes (Fleet Foxes)
Another album with a good showing in the end of year charts was the debut self-titled album by Seattle folk band Fleet Foxes. Given a few more months’ listening, this would certainly be higher than #6; it’s difficult to categorise, but if you like your modern folk heavy on the vocal harmonies and light on instrumentation it’s definitely one to check out.
5. Death Magnetic (Metallica)

Into the top five now, and first up is a triumphant return to form for an old favourite. I’d not bought a Metallica album since 1991’s black album, but the generally positive comments Death Magnetic was attracting on music forums prompted me to give it a go – and I’m very glad I did.
As long ago as 2006, Lars Ulrich said that the band was working on new material reminiscent of “old school” Metallica, and the ghosts of classic early albums such as “Master of Puppets” and “…And Justice For All” can be heard in the high-speed thrash of tracks like “All Nightmare Long” and “That Was Just Your Life”. Unfortunately James Hetfield’s lyrics still have a tendency towards sixth-form angst – “Love is a four letter word!” he bellows on first single and weakest track, The Day That Never Comes – but despite the occasional clumsy wordplay, you can’t help but be swept along by the monstrous riffs and memorable lyrical hooks.
Standout track: Broken, Beat & Scarred
4. American Demo (The Indelicates)

For some reason I had it in my mind that I had picked up The Indelicates debut album, American Demo, after a Mercury Music Prize nomination, but on checking I find that that wasn’t actually the case. So call it fate, call it luck, karma, whatever – but I’ve been listening to their perfect indie-pop ever since. Of course, the relatively high showing for this one might have something to do with my daughters’ obsession with the track Sixteen, which made it my most listened track by quite a long way this year, thanks to multiple plays every time I drove them anywhere.
Standout track: Sixteen
3. The Red Album (Weezer)

Aside from Buddy Holly with its great video, I’d not heard anything by Weezer until a friend bought their latest untitled-but-red album. I ripped it, assuming it might get a couple of listens – and then played the hell out of it for the rest of the year.
It’s likely that part of the affection I have for the album stems from The Greatest Video Of All Time™, the meme-laden Pork and Beans, but it’s full of great tracks. Singer and main songwriter Rivers Cuomo stated that he tried to move away from traditional song arrangements and try new approaches, as well as sharing songwriting duties with other band members; for me, it’s worked a little too well – despite loving this album, I’ve not developed an appreciation of their back catalogue.
Standout track: Troublemaker
2. The ’59 Sound (The Gaslight Anthem)

Now this choice I do know where it came from. A tweet from D Keith Robinson led me to The Gaslight Anthem’s second album, and their perfect mix of punk and Springsteen New Jersey attitude. I’ve since sought out their debut, Sink or Swim – a much rawer record, significantly closer to punk than Paramus – but it’s not as immediate as The ’59 Sound, which takes Springsteen-like tales of small-town dreams and wraps them in an up-tempo soundtrack that manages to sound both modern and classic at once.
I also love the borrowed lyrics, whether as blatant as the line from Counting Crows’ “Round Here” that kicks off the chorus to “High Lonesome”, or the other, more subtle, references that crop up in other tracks.
Standout track: High Lonesome
1. Chinese Democracy (Guns N’ Roses)

And so to my number one album of 2008, the long-awaited (and boy is that an understatement!) Chinese Democracy by Guns N’ Roses. Was it worth waiting seventeen years for? No, not by any stretch of the imagination. Is it really Guns N’ Roses? Well, not really; to all intents and purposes it’s The Axl Rose Show, supported by a revolving door of supporting musicians. But really there’s only one question that matters: Is it any good? Hell, yes!
Somewhat predictably, after waiting fifteen years for a new Guns album (seventeen since their last original material, 1991’s Use Your Illusion I & II), I was a little underwhelmed on first hearing Chinese Democracy; is this really what Axl has spent a third of his life, and over $13m, to create? iTunes was mostly two and three stars – it was passable rock music, but nothing special. But then circumstances conspired to make me re-assess the album.
In late November, our middle daughter was taken into hospital with pneumonia, from where she was swiftly transferred to a specialist heart and lung hospital for surgery. Two hours from home, my wife and I spent a fretful couple of weeks shuttling back and forth, alternating between dealing with our other two girls and sitting impotently in a hospital ward. Those journeys, driving alone in a dark December along the M1 and A14, gave me plenty of opportunity to listen to my new, unimpressive album… and something strange started to happen.
Without the looming shadow of Guns’ past successes, the new material started to impress on its own merit. Axl’s voice has not lost any of its strength (as one might have expected after so long out of the limelight); his range and power is still awe-inspiring, from the patented alley-cat scream that introduces the title track, through the growling vocals on techno-tinged singalong “Shackler’s Revenge”, to the purity of funk-pop faux-Bond anthem, “If The World”.
But does it sound like a Guns N’ Roses record? Surprisingly, it does; whether that is testament to Axl’s songwriting and arranging contributions (on both this and previous releases), or the ability of new contributors like Paul Tobias and Dizzy Reed to mould their songwriting to an existing blueprint, I really couldn’t say, but the album definitely slots neatly into the existing back catalogue. Stylistically, it’s heavy on non-traditional song structures – many of the tracks lack a clearly defined chorus, but still manage to stand up as coherent and cohesive numbers. Initially the lack of Slash felt like a glaring omission, but that feeling also passed with time; despite the confusing array of guitarists involved (up to five on a single song) the solos eventually came to feel like they belonged too.
“Chinese Democracy” is not just a great rock album, able to hold its own against most great records of the last ten years; it’s a great Guns N’ Roses album.
Standout track: Prostitute
New ExpressionEngine extension: Scroll to new comment
- Categories:
- ExpressionEngine
- Tags:
- Published:
- 8:44pm on Friday 2nd January, 2009
While developing this incarnation of The Watchmaker Project I came across one glaring omission in my new CMS of choice, the awesome ExpressionEngine.
Sure, the guys at EllisLab like to tell us how flexible their application is - how it can run multiple sites, online shops, enormous government portals - but for something that started off as a blog engine, why doesn’t it offer the ability to return to the comment you just added? It was frustrating, so I dug into the core code to see what could be done. Luckily there was a hook in just the right place for a shiny new extension. And here it is.
Scroll To Comment
Like all ExpressionEngine extensions, the steps to get this up and running are pretty simple:
- Download and unzip the files from the package
- Place the
ext.scroll_to_comment.phpextension file in the/system/extensionsfolder of your EE install - Place the
lang.scroll_to_comment.phplanguage pack in the/system/languages/englishfolder - Visit your EE Control Panel, and navigate to Admin > Utilities > Extensions Manager
- Enable the new extension
- Visit the ‘Settings’ page to change the prefix setting if necessary
- You’re good to go!
A few quick words on CSS id attributes
As noted a while back by Veerle, if you want your code to be 100% W3C valid you can’t start a CSS id attribute with a number. That is why this extension provides the option of including a prefix to all comment ids, which you will have to match up with your (X)HTML markup - here’s mine:
{exp:comment:entries sort=“asc”}
<li id=“c_{comment_id}”>
<h4><strong>{url_as_author}</strong> at »
{comment_date format="%g:%i%a"} on {comment_date »
format=”%j%S %F, %Y”} <a href=”#c_{comment_id}”> »
#</a></h4>
<blockquote>
{comment}
</blockquote>
</li>
{/exp:comment:entries}
All the comments on my site are prefixed with “c_” - and, as long as I also use that in my extension settings, every time anyone submits a comment the page will reload displaying their new comment.
What is GitHub? GitHub is a web application that uses the version control software Git to allow its members to manage their code online. I am hosting the files for this article there so that any bugfixes or improvements I make can be found in one central location.
Redesign 2009
Looking back through my archives, the last time this site was redesigned was back in November 2005. That fairly successful design served me well for the last three years, but since the beginning of 2008 I’ve been itching to redesign. And, finally, I’ve managed to see a new design through to actual launch.
Goodbye Textpattern; Hello ExpressionEngine
The biggest change is in the application that powers the site. Textpattern was a reliable and free blog engine, but I’ve long desired to join the ExpressionEngine jet-set, and the last month of building this site has convinced me that it is a great choice for any project that needs a CMS of any description (possibly with the exception of an online shop - the e-commerce module is not exactly fully-featured, although I’m sure they are working on improvements with the impending release of version 2.0).
Speaking of EE 2.0, I’m now looking forward to the rewritten, CodeIgniter-powered ExpressionEngine even more than before. The opportunity to use my existing experience and knowledge of the CI framework to build and extend sites powered by EE opens up a whole new avenue of freelance work to PHP coders like me.
Small pieces, loosely joined
This particular design is relatively new, having begun life as a notebook sketch in mid-November. The idea to bring together the various streams of data I’m generating - Twitter, Flickr, All Consuming, Last.fm - is much older, but by no means original; there are several ‘lifestream’ applications around now, but I’d much rather present an aggregated view of my online activity on my own domain, rather than a third-party site such as Chi.mp.
The external services are imported via cURL scripts that run periodically to retrieve XML data via their respective APIs. Each script either inserts data directly into the ExpressionEngine weblog tables, or writes to flat HTML files for inclusion in my templates. At least, that was the idea; unfortunately I’m having some issues with PHP versions at the moment, so an interim solution will have to be swiftly coded tomorrow.
Evolution
I always like to see how other designers work, so in case anyone feels the same way and is interested in seeing how the design evolved, here is a short animation of the stages through which the homepage went, from wireframe to final version:


I'd love to hear what you think - please use the form below to leave your comments. Some HTML is permitted:
b,i,em,del,ins,strong,pre,code,blockquote,abbr. URLs or email addresses will be automatically converted into links.