Custom offline pages for #joomla will be available for download soon..

by Revision Technology

Friday, 11 December 2009 11:06

PHP Current Year

Written by Brian Duckett
PHP Current Year

This is a brief post that will explain how to keep the copyright year in your footer automatically updated. This can be accomplished in a number of ways, but this post deals with how to achieve this using PHP.

I'll also show where to add this snippet so that it works in your Joomla!TM and Worpdress templates. Detailed information on the PHP date function can be found here: http://php.net/manual/en/function.date.php .

As PHP can be used to supercharge your XHTML, you can simply add this snippet to your existing markup: (Note: The .php extension is required for the filename)

{codecitation} © 2007 - {/codecitation}

In a Joomla!TM template, you can automatically update your copyright year in a number of ways. If you are using a footer module to display this information, you will need to download and install an extension that will help in parsing PHP from your custom modules and articles, such as those found here: Joomla Extensions - Custom Code In Content.

You can also add this to the end of your template's index.php file, wrapped inside of a block level element, such as div. Give it an id of “footer” for styling. You can locate your template index here: ./templates/mytemplate/.

If you have a Wordpress template, also create a footer div and add this snippet to your footer.php located in ./wp-content/themes/mytemplate/.

Related items (by tag)

Add comment


Did you know we also offer internet marketing services & training ?

 

General support for your website starting at only $100!

 

 
 
 
About

Revision Technology is a team of professional website consultants, developers and designers researching and building solutions that allow our clients to realize their ideas.

www.revision-technology.com
Contact

General inquiries: helpdesk@revision-technology.com
Support: Visit the FAQs

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
Updates

Our newsletter is excellent. Subscribe and get the latest updates.