Archive for April, 2010
PHP: Converting titles to permalinks
0Having the item title in the URL is a good way to improve SEO for your website. For example, /shop/adobe_photoshop_cs5/ is much more meaningful to users and search engines than /shop.php?i=83s9f8haj8dj. Unfortunately, not all characters are valid in URLs, which is where a permalink function comes handy to convert titles into a nice URL format. Permalinks usually remove all non-alphanumerical characters and replace spaces with underscores. “Adobe Photoshop CS5” is then converted to “adobe_photoshop_cs5”.
function permalize($input) {
return str_replace(' ','_',strtolower(trim(preg_replace("/[^a-zA-Z0-9 ]/", '', $input))));
}
Note that you can use some special characters in URLs (like + and -), I usually like to remove them completely, but it is totally fine to leave them should you choose to.
If you don’t want to rely on a permalink to retrieve database data about your item, you can still insert the ID in the URL (e.g. /shop/34655/adobe_photoshop_cs5/ ). The permalink could then be discarded in the code while still providing better readability and SEO.
Adobe CS5 is out… and so is Fireworks
0
Today, Adobe launched the new Creative Suite 5. There’s is tons of great new features especially in Photoshop and After Effects. Speaking of Photoshop, the new Content Aware fill is simply incredible. You can mark an area to fill and the software will analyse the surrounding patterns and colors to fill in and remove the area you selected.
But of course, my main tool is Fireworks and while the CS4 version was full of bugs and crashing frequently, I’ve seen it mature in the development stages and I can now say it’s really stable and these problems are things of the past. I’ve not had a single crash or the classic “An unknown error occurred" message using the last milestone build. Fireworks also boot in just a few seconds (as fast as 3-4 seconds) compared to the slow 15 seconds of CS4.
There is also the new Compound feature which is similar to the vector path tools but let you preserve the shapes you used to build that vector and edit them in real-time. Another great new feature is the “Snap to pixel” function which relocate the shape borders to the nearest pixel in the canvas. Blurry borders when resizing vectors are thing of the past.
Another new feature is the possibility to save projects as templates so you can easily use them as base projects later.
While there is some great new features in Fireworks CS5, the main goal in this release was to fix bugs and achieve better performance and stability, which the development team did. It’s really a good thing they decided to stop working on new features as the base platform was getting more and more buggy. The application is now back on track as a powerful and stable design and prototyping tool.
I hope you will enjoy this new release of Fireworks because I certainly do!