| Author |
Message |
dutchnuker Hangin' Around

Joined: Apr 01, 2006 Posts: 30
|
Posted:
Sun Feb 18, 2007 7:08 am |
|
when you have select the dutch language and then go to the Encyclopedia then you the error i paste here.
Notice: Undefined variable: sitename in /home/ravennuk/public_html/modules/Encyclopedia/language/lang-dutch.php on line 30
Dutchnuker |
|
|
|
 |
montego Moderator

Joined: Aug 29, 2004 Posts: 7582 Location: Arizona
|
Posted:
Sun Feb 18, 2007 8:03 am |
|
Thanks! We'll look into that. Notices will not hurt anything as these are normally turned off on a true production site. However, PHP-Nuke was so riddled with them, that we are certain it was slowing down sites. We have cleaned literally more than 10,000 notices with the 2.10.00 release! You just happened to stumble upon one obscure one. Thanks again! |
|
|
|
 |
fkelly Moderator

Joined: Aug 30, 2005 Posts: 2233 Location: near Albany NY
|
Posted:
Sun Feb 18, 2007 9:19 pm |
|
This problem, or a version of it, seems to happen in Chinese and I think Albanian, Slovakian, Indonesian. We were including the variable $sitename in the definition. I think we have a couple of extra double quotes but I don't think they are the source of the problem. No: the quotes aren't the problem, I just copied that define in from 2.02 and the problem still occurs.
I can make the problem "go away" by doing an isset check on $sitename and setting it to null if it's not already set. This begs the question of why it isn't set since it is one of the variables read in from the config table by mainfile.
I guess one option would be to find all occurrences of $sitename in the Encyclopedia language directory and just change it to 'copyright' and leave out the rest (the way it is in most languages). The other is to track down why the variable $sitename isn't accessed in the language file.
Life is intervening for me and I doubt I will have time to complete this ... but that's what's going on. By the way, I think the string:
[code]define('_COPYRIGHT','Copyright © door '.$sitename.' Alle Rechten Voorbehouden.'); [code]
should work fine. Right now there's an extra set of " around $sitename which I think is a hangover from the conversion from double quotes to single. |
|
|
|
 |
evaders99 Moderator

Joined: Apr 30, 2004 Posts: 2881
|
Posted:
Sun Feb 18, 2007 9:51 pm |
|
You may just need to globalize $sitename, since the language inclusion may be included in different function.
|
|
|
|
 |
fkelly Moderator

Joined: Aug 30, 2005 Posts: 2233 Location: near Albany NY
|
Posted:
Sun Feb 18, 2007 10:14 pm |
|
Define '$_BINGO', 'Evaders!!!' yeah thanks. I wasn't considering the possibility of the language file being included INSIDE of a function.
I don't have time to finish this up and test it tonight. Basically we need a global $sitename on all the language files that use it and probably we should straighten out the quotes, though the way they are will do no harm. |
|
|
|
 |
|
|
|
|