Wednesday, May 23rd

Last update05:36:30 AM GMT

Font Size

Screen

Profile

Layout

Menu Style

Cpanel
Welcome, Guest
Username Password: Remember me

Adding Date in a Module position
(1 viewing) (1) Guest
Tips and tricks only - please put all other posts in another forum!
  • Page:
  • 1

TOPIC: Adding Date in a Module position

Adding Date in a Module position 2 years, 3 months ago #2520

  • ywsolution
  • OFFLINE
  • Expert Boarder
  • Posts: 105
  • Karma: 5
I needed a way to put in a footer position the year and for this year to change automatically.

Here is one solution:

Get this great module www.fijiwebdesign.com/products/joomla-php-module.html publish it to your position then add this PHP code
<?php print "Copyright - "; echo date("Y") ?>
 


Cheers
Ian

Re:Adding Date in a Module position 2 years, 3 months ago #2522

  • buipy001
  • OFFLINE
  • Administrator
  • Posts: 250
  • Karma: 12
Hey Ian, don't mean to be rude or anything.

<?php print "Copyright - "; echo date("Y"); ?>

add the semicolon at the end of the echo statement or else you'll get compilation errors, unless that module corrects it for you.

Copyright <?php echo date("Y"); ?>

Should work too.
The only limitation is your imagination
www.pbwebdev.com.au

Twitter: twitter.com/astroboysoup
Facebook: www.facebook.com/pbwebdev

Re:Adding Date in a Module position 2 years, 3 months ago #2523

  • ywsolution
  • OFFLINE
  • Expert Boarder
  • Posts: 105
  • Karma: 5
I put the print statement in to show you can add text as well - the module works as stated - see www.emmaus.edu.au/ (obvious go to the bottom)
  • Page:
  • 1
Moderators: austega
Time to create page: 0.48 seconds
You are here: Forum