WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Templates, Menus & Design => Topic started by: hudge on February 11, 2005, 08:51:00 AM

Title: Stay current with your Copyright
Post by: hudge on February 11, 2005, 08:51:00 AM
Another tip for the resouce section:

As the new year came I noticed all of my sites had bad copright dates so I need a soulution and this is what I did:

To always have your copyright date displaying the current year
Copyright © 2005 Company Name. All rights reserved.      

Code: [Select]

Copyright © <?php echo date&#40;"Y"&#41;; ?> Company Name. All rights reserved.


or you can do this:
Copyright © 1996-2005 Company Name. All rights reserved.      

Code: [Select]

Copyright © 1996-<?php echo date&#40;"Y"&#41;; ?> Company Name. All rights reserved.


Can you tell me how to edit this so I can paste this into my footer?  :oops:
Title: Stay current with your Copyright
Post by: SilverFeces on February 11, 2005, 09:20:50 PM
What do you mean? built into the footer code? if not just add you date code then <php footer() ?> after it where you want the footer to display...
Title: Stay current with your Copyright
Post by: fienieg on February 12, 2005, 12:25:35 AM
you can use this code, and the footer text should be only the company's name  :wink:
Code: [Select]
<?php if&#40;WEBSITE_FOOTER != ''&#41; 
&#123; 
echo 'Copyright Â© 1996-';
echo date&#40;"Y"&#41;, ' ';
echo WEBSITE_FOOTER
echo '. All rights reserved.';
&#125;
else
&#123;
echo 'Please fill in your company name';
&#125; 
?>


It works, i don't know if you need it this way  :)
Title: Stay current with your Copyright
Post by: Ryan on February 17, 2005, 06:25:23 AM
Or, you could try something like this...
For example, replace line 110 on the "Simple" template:
Code: [Select]
<?php echo WEBSITE_FOOTER?>
with this:
Code: [Select]
<?php echo str_replace&#40;'[YEAR&#93;', date&#40;'Y'&#41;, WEBSITE_FOOTER&#41;; ?>
Then, somewhere in the footer text (changed from the "settings" section on WB administration), place the tag "[YEAR]", e.g:
Code: [Select]
Copyright (C), 2004-[YEAR] Ryan Djurovich
would give:
Code: [Select]
Copyright (C), 2004-2005 Ryan Djurovich

This makes things a little bit easier to maintain - next time you want to make a change to your footer you don't need to go through the process of updating your template! :wink:
Title: Re: Stay current with your Copyright
Post by: Het Artiek on January 15, 2012, 09:30:36 PM
If someone still is searching for a droplet that sets automaticly the year in the footer.

Add this droplet

Code: [Select]
$datum = date("Y");
return "$datum";

place [[year]] in your footer

Greetz