Welcome to Geeklog, Anonymous Monday, April 29 2024 @ 09:45 am EDT

Geeklog Forums

copyright 2000 - ?


Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Hey Dirk, I noticed you somehow pushed "2000" in the middle of {copyright_notice}.

I've always thought it'd be a great addition to have something like
$_CONF['copyrightyear-start'] = '2000';
in config.php, but I assume you did it directly.

So did you edit your personal lib-common.php from:

$footer->set_var( 'copyright_notice', ' ' . $LANG01[93] . ' © '
. $copyrightyear ...

to something like:

$footer->set_var( 'copyright_notice', ' ' . $LANG01[93] . ' © 2000-'
. $copyrightyear ...

or what?

In any case, you must share with the rest of with such things in the future (versions).
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
It's all built-in already. This is straight from the geeklog.net config.php:
Text Formatted Code
// Uncomment the following line to set the copyright year in the site's footer  
// to a specific year. Otherwise, the current year will be used.
$_CONF['copyrightyear'] = '2000-2004';
 

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
But what will happen in 2005...?
I want 2000-(current_year).

If you implement my suggestion from above, you just need to add:

if( !empty( $_CONF['copyrightyear-start'] ))
{
$copyrightyear = $_CONF['copyrightyear-start'] . '-' . $copyrightyear;
}
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by LWC: But what will happen in 2005...?
I want 2000-(current_year).

Then you have to change the {copyright_notice} variable in config.php to

Text Formatted Code
{lang_copyright} &copy; 2000-{current_year} {site_name}<br>{trademark_msg}
 

i.e. the various parts of the copyright notice are also available as variables and you can build your own message from them.

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
Take another look at my aforementioned code.
Don't you think my global approach is better?

All you have to do is add the new parameter $copyrightyear-start to config.php and then add the new "if" statement to lib-common.php.
 Quote

All times are EDT. The time is now 09:45 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content