TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,992
  • Total Topics: 21,323
  • Online today: 557
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 395
  • Total: 395

Copyright Notice Block w/auto year

Started by DFDuck, November 19, 2008, 02:38:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DFDuck

I'm not a php coder so don't laugh (too hard).

Why spend the first days of the new year updating the copyright notices on your web site, let php do it.  This little snip works nicely for me as a Bottom Panel Block, the year displayed is always the current year.

phpbox:
echo '<div align="center" class="smalltext">Copyright © '.date("Y",mktime()).' Acme Midget Works, All Rights Reserved</div><br /><br />';


-- Duck

IchBin


Zetan

Sometimes the simplest ideas are the best ones. I'll probably use this, thanks.  :up:

blizz-craft

This block is soo awesome, Im posting so that this can be viewable to others once again!


blizz-craft

This sill works on other versions of tp and smf.

G6Cad

Have you tried it ?  When you have, let us know...

Lesmond

Yep works on smf 119 and tp v1.0 beta 4 in a lower panel  :up:


JPDeni

It's very simple code, using a very basic php command and no database access, so it should work in any php code.

I've been using something similar on my site for quite a while, except that I wanted to include the year we started as well as the current year and my site still uses TP .98, so my code is in the index.template.php file of the theme.


echo '<span class="smalltext">All material Ã,© 2002-' . date("Y") . ' morethanspike.com, unless otherwise noted.</span>';


blizz-craft

Sorry, I was gone for a while, so I couldnt reply... It works like a charm... It also works with other forum softwares such as VB, tested it on my friends site... Its an Outstanding code!

This website is proudly hosted on Crocweb Cloud Website Hosting.