WebsiteBaker Support (2.8.x) > Templates, Menus & Design
Stay current with your Copyright
(1/1)
hudge:
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: ---
Copyright © <?php echo date("Y"); ?> Company Name. All rights reserved.
--- End code ---
or you can do this:
Copyright © 1996-2005 Company Name. All rights reserved.
--- Code: ---
Copyright © 1996-<?php echo date("Y"); ?> Company Name. All rights reserved.
--- End code ---
Can you tell me how to edit this so I can paste this into my footer? :oops:
SilverFeces:
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...
fienieg:
you can use this code, and the footer text should be only the company's name :wink:
--- Code: --- <?php if(WEBSITE_FOOTER != '')
{
echo 'Copyright © 1996-';
echo date("Y"), ' ';
echo WEBSITE_FOOTER;
echo '. All rights reserved.';
}
else
{
echo 'Please fill in your company name';
}
?>
--- End code ---
It works, i don't know if you need it this way :)
Ryan:
Or, you could try something like this...
For example, replace line 110 on the "Simple" template:
--- Code: ---<?php echo WEBSITE_FOOTER; ?>
--- End code ---
with this:
--- Code: ---<?php echo str_replace('[YEAR]', date('Y'), WEBSITE_FOOTER); ?>
--- End code ---
Then, somewhere in the footer text (changed from the "settings" section on WB administration), place the tag "[YEAR]", e.g:
--- Code: --- Copyright (C), 2004-[YEAR] Ryan Djurovich
--- End code ---
would give:
--- Code: --- Copyright (C), 2004-2005 Ryan Djurovich
--- End code ---
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:
Het Artiek:
If someone still is searching for a droplet that sets automaticly the year in the footer.
Add this droplet
--- Code: ---$datum = date("Y");
return "$datum";
--- End code ---
place [[year]] in your footer
Greetz
Navigation
[0] Message Index
Go to full version