Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: Mick. in Juli 15, 2013, 11:48:23 VORMITTAG

Titel: [Tip/Trick] Auto Update The Year In SMF Footer Copyright Message
Beitrag von: Mick. in Juli 15, 2013, 11:48:23 VORMITTAG

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 '
Titel: Re: [Tip/Trick] Auto Update The Year In SMF Footer Copyright Message
Beitrag von: Burke ♞ Knight in Juli 15, 2013, 11:53:46 VORMITTAG
Nice. :)

You might want to think of making it into a mod, where they can input their copyright info. ;)
Titel: Re: [Tip/Trick] Auto Update The Year In SMF Footer Copyright Message
Beitrag von: Mick. in Juli 15, 2013, 11:58:39 VORMITTAG
Zitat von: BurkeKnight in Juli 15, 2013, 11:53:46 VORMITTAG
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
Titel: Re: [Tip/Trick] Auto Update The Year In SMF Footer Copyright Message
Beitrag von: Burke ♞ Knight in Juli 15, 2013, 12:01:08 NACHMITTAGS
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.
Titel: Re: [Tip/Trick] Auto Update The Year In SMF Footer Copyright Message
Beitrag von: Mick. in Juli 15, 2013, 12:02:46 NACHMITTAGS
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.
Titel: Re: [Tip/Trick] Auto Update The Year In SMF Footer Copyright Message
Beitrag von: Burke ♞ Knight in Juli 15, 2013, 12:04:53 NACHMITTAGS
True... Maybe add it into another mod for personal use. :)
Titel: Re: [Tip/Trick] Auto Update The Year In SMF Footer Copyright Message
Beitrag von: Shambles in Juli 15, 2013, 12:28:40 NACHMITTAGS
Zitat von: 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 '