Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Copyright Year on the footer

 
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 420
Location: Kathmandu, Nepal

PostPosted: Wed Apr 21, 2010 4:36 am    Post subject: Copyright Year on the footer Reply with quote

When you want to print out the copyright year on the footer of your page, the below solution will be amazingly useful. In the template file, put a piece of code like:

Code:
<p>&copy; 2006 - {'Y'|date}, <a href="http://www.sanjaal.com/">Sanjaal Corps</a>, All rights reserved.</p>


You should change it with your own texts. The {'Y'|date} will print the current year - that changes automatically, every year - without the need for extra coding Smile
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
DiscoInferno
Smarty Rookie


Joined: 09 Aug 2011
Posts: 20
Location: Moscow, Russia.

PostPosted: Mon Aug 22, 2011 10:21 am    Post subject: Reply with quote

Yeahh! Thanks dude. I've been looking for this.
Back to top
View user's profile Send private message Visit poster's website
Cummins
Smarty n00b


Joined: 26 Aug 2011
Posts: 1

PostPosted: Fri Aug 26, 2011 10:57 am    Post subject: Reply with quote

Thanks
Back to top
View user's profile Send private message
SergiusWL
Smarty n00b


Joined: 22 Feb 2014
Posts: 1

PostPosted: Sat Feb 22, 2014 8:05 pm    Post subject: Thanks Reply with quote

Realy thanks for the post ! Bingo ! I'm always forgot very simple things and in the searching of true result spending too much time!
None of documentation will give the answer so fast as search in google.
Back to top
View user's profile Send private message
szombe
Smarty n00b


Joined: 15 Jul 2014
Posts: 4

PostPosted: Tue Jul 15, 2014 4:54 am    Post subject: Reply with quote

Thanks! Was using
Code:
{php}echo date('Y'){/php}
Laughing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP