Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Public Testing of RavenNuke(tm) v2.10.00
Author Message
dutchnuker
Hangin' Around


Joined: Apr 01, 2006
Posts: 30

PostPosted: Sun Feb 18, 2007 7:08 am Reply with quote

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
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Sun Feb 18, 2007 8:03 am Reply with quote

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!

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
fkelly
Former Moderator in Good Standing


Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sun Feb 18, 2007 9:19 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sun Feb 18, 2007 9:51 pm Reply with quote

You may just need to globalize $sitename, since the language inclusion may be included in different function.

Code:


global $sitename;

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
fkelly
PostPosted: Sun Feb 18, 2007 10:14 pm Reply with quote

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.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Public Testing of RavenNuke(tm) v2.10.00

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©