Archive for June, 2008

Printing the Date in PHP

To print the date in the following format:

2008-06-27 use:

<?php echo date("Y-m-d"); ?>

This is useful for automatically updating the date in the copyright section of a web page:

Copyright © <?php echo date("Y"); ?> Painted Pixels.

Once this is in place on a web page, the year will be adjusted saving yourself the job of having to do it manually.

For other date formats see the PHP Manual.

CSS Theme Week

Don’t you just love CSS? Yeah!!

It’s CSS Theme Week at SitePoint. Don’t miss the CSS tutorials. So far they have had:

  1. Nifty Navigation Tricks Using CSS
  2. Breaking Out of the Box With CSS Layouts
  3. Warning: This Secret CSS Technique Will Surprise You!
  4. Fancy Form Design Using CSS
  5. CSS Positioning Properties At-A-Glance Guide

Now all I need is some time to read them!

Pagination

I’ve been thinking of pagination recently and looked to the web to see what inspirations there were there. I have bookmarked these sites:

Hopefully, I will now be inspired to improve the pagination on my own sites.

My Favourite Firefox Extensions

Here are my favourite extensions for Firefox:

  • British English Dictionary – enables me to check my spelling for typos when filling in forms online.
  • ColorZilla – Advanced Eyedropper, ColorPicker, Page Zoomer and other colorful goodies.
  • DownThemAll – Great for downloading lots of files.
  • HTML Validator – adds HTML validation inside Firefox.
  • IE View – Enables me to view pages in IE by just right clicking on the Firefox browser window and selecting View This Page in IE.
  • Opera View – the same as above but with Opera.
  • Palette Grabber – extracts a color palette for the current page and exports it to a Photoshop/Illustrator color palette file
  • Sage – a lightweight RSS and Atom feed reader.
  • Screengrab – makes it easy to save a web-page as an image. With it, you can save anything that you can see in a browser window – from a small selection, to a complete page.
  • Web Developer – various web developer tools I would find it difficult to do without.
  • Password Exporter – allows you to export and import your saved passwords.
  • Scrapbook - helps you to save Web pages and manage the collection. Great when you come across a great piece of information you wish to keep handy.

What are your favourite Firefox extensions?

Testing web page in multiple browsers

I found this great utility which enables you to check a web page in multiple browsers:

Browsershots

It is very useful for checking pages in browsers you don’t have installed on your computer.

CSS Layouts

Some great css templates as a starting point for you own design: