[Tip/Trick] Auto Update The Year In SMF Footer Copyright Message

Started by Mick., July 15, 2013, 11:48:23 AM

Previous topic - Next topic

Mick.


I used to have to update these manually so did a bit of digging and found a few different tutorials that helped me slap this together. Now the year in your SMF footer copyright, the message always displays the current year.

Open index.template.php and find:
<div id="footer_section"><div class="frame">
<ul class="reset">
<li class="copyright">', theme_copyright(), '</li>


Add after:
';
$time = time () ;
$year= date("Y",$time);
echo ' <li>Copyright &copy; ' . $year . ' YOUR-FORUM-NAME | All Rights Reserved</li>';

echo '

Burke ♞ Knight

Nice. :)

You might want to think of making it into a mod, where they can input their copyright info. ;)

Mick.

Quote from: BurkeKnight on July 15, 2013, 11:53:46 AM
Nice. :)

You might want to think of making it into a mod, where they can input their copyright info. ;)

Thnx, but meh. I dont make mods anymore. ;) Im just a script-frankenstein type of dude. lol

Burke ♞ Knight

LOL...

I may make one using this for my sites, and if okay with you, may submit it to mod site.
If do, will have you as maker of the tip and link to this thread.

Mick.

I doubt it'll get accepted since its only 4-6 lines of code in 1 file. Not even worth making it to a mod.

Burke ♞ Knight


Shambles

Quote from: Mick.
I doubt it'll get accepted since its only 4-6 lines of code in 1 file.

Or even less  ;D

';

echo ' <li>Copyright &copy; ' . date("Y", time()) . ' YOUR-FORUM-NAME | All Rights Reserved</li>';

echo '

Advertisement: