Dynamic copyright

Freshness Warning
This article is over 11 years old. It's possible that the information you read below isn't current.

Brad Feld wants to know if you’ve updated your copyright dates and suggests you put them in an include for update-once ease.

Most sites I’ve built take this a step further—the dates are dynamic. Copyright dates are often a range, and of course the first date doesn’t change. But the last date is always current with a dynamic copyright.

In Movable Type, you can use this...

&copy; 1996 - <MTDate format="%Y">

In PHP...

echo '&copy; 1996 - ' . date('Y');

And in Smarty...

&copy; 1996 - {$smarty.now|date_format:"%Y"}

Dave Kaufman - Techlife
January 1, 2007 1:57 PM

Interesting and useful...now the dumb question.... in HTML? or if your Apache webserver has PHP and the page is .html can you use the PHP?

Adam Kalsey
January 1, 2007 2:01 PM

Only if your web server is set up to process .html pages as PHP. If you're using Apache, adding the following to your .htaccess file should do the trick (assuming that PHP is already set up on your server)... `AddType application/x-httpd-php .html` But don't do this lightly. There's performance and server load considerations to think about. This means that every .html page on your server will be processed for PHP, regardless of whether you actually put any PHP code in there.

Viv
January 21, 2007 11:37 AM

Very helpful notes on Apache and .htaccess...thanks Adam. Viv

Your comments:

Text only, no HTML. URLs will automatically be converted to links. Your email address is required, but it will not be displayed on the site.

Name:

Not your company or your SEO link. Comments without a real name will be deleted as spam.

Email: (not displayed)

If you don't feel comfortable giving me your real email address, don't expect me to feel comfortable publishing your comment.

Website (optional):

Follow me on Twitter

Best Of

  • The mouse and me Not only is the mouse very destructive, but it's evaded all attempts to capture or kill it so far.
  • Lock-in is bad T-Mobile thinks they'll get new Hotspot customers with exclusive content and locked-in devices.
  • Newly Digital Newly Digital is an experimental writing project. I've asked 11 people to write about their early experiences with computing technology and post their essays on their weblogs. So go read, enjoy, and then contribute. This collection is open to you. Write up your own story, and then let the world know about it.
  • Pitching Bloggers Forget what you learned in your PR classes. Start acting like a human instead of a marketer, and the humans behind the blogs will respond.
  • California State Fair The California State Fair lets you buy tickets in advance from their Web site. That's good. But the site is a horror house of usability problems.
  • More of the best »

Recently Read

Get More

Subscribe | Archives

11

Recently

Stretching your team (Jun 11)
Stretching your team is one of the best ways to improve your output, your team's happiness, and your velocity. But they'll need coaching.
Physical camera shutter for Cisco Spark Board (Jul 6)
A 3d printable design for a camera shutter for a Cisco Spark Board
My Travel Coffee Setup (Jan 20)
What my travel coffee brewing setup looks like, and how you can build your own for under $100.
Turkey Legs (May 30)
Product naming gone awry.
Speaking for Geeks: Your Slides (Dec 17)
Tips and tricks for creating great slides.
Speaking for Geeks: Writing Your Talk (Dec 14)
Don’t wait until the night before the talk to write it. Crazy, I know.
Speaking for Geeks: Tell a Story (Dec 13)
Telling a story keeps your presentation focused, keeps your audience interested, and makes it easier for you to remember your talk.
Speaking for Geeks: Where to speak (Dec 11)
You've got a great idea for a talk. How do you find conferences to submit it to?

Subscribe to this site's feed.

Elsewhere

Tropo
Voice and communications platforms, including Tropo and Phono. Work.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2018 Adam Kalsey.
Content management by Movable Type.