PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
dutchnuker
Hangin' Around


Joined: Apr 01, 2006
Posts: 30

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

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
Moderator


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

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

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!
View user's profile Send private message Visit poster's website
fkelly
Moderator


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

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

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
Moderator


Joined: Apr 30, 2004
Posts: 2881

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

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

Code:

global $sitename;
View user's profile Send private message Visit poster's website
fkelly
Moderator


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

PostPosted: Sun Feb 18, 2007 10:14 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum