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 -> PHP-Nuke Patched Series By Chatserv
Author Message
ToolBox
Regular
Regular



Joined: Mar 16, 2005
Posts: 74

PostPosted: Wed Sep 28, 2005 10:14 am Reply with quote

PHP-Nuke 7.9 and 7.9.3.1 has a tiny but cute bug in handling multilingual processing.

Symptom: After setting up your site with phpnuke 7.9 or 7.9.3.1, you will get an message as follows:

Code:


Warning: main(language/lang-.php): failed to open stream: No such file or directory in F:\phpNuke\www\dev.nukekorea.net\nk79standard\mainfile.php on line 269

Warning: main(): Failed opening 'language/lang-.php' for inclusion (include_path='.;c:\apachefriends\xampp\php\pear\') in F:\phpNuke\www\dev.nukekorea.net\nk79standard\mainfile.php on line 269


Reason: The very first access to the phpnuke 7.9 or 7.9.3.1 does HAVE empty $language variable which is assumed to have "english" as a default. This means that $language = "english" when there is no preference setup in your admin CP. So, select "English" or "other your language" in [Language] block, it will disappear. Still, you will see the warning messages as you access your PHP-Nuke 7.9 (or 7.9.3.1) site with different web-browser now that it does not have a proper language cookie value.

How to fix (in MOD instructional format):
Code:


#
# ------- [ OPEN ] --------
#
<nuke-root>/mainfile.php

#
# ------- [ FIND ] ---------
#
if (!defined('FORUM_ADMIN')) {
   if (isset($newlang) AND !stripos_clone($newlang,".")) {
      if (file_exists("language/lang-".$newlang.".php")) {
         setcookie("lang",$newlang,time()+31536000);
         include_once("language/lang-".$newlang.".php");
         $currentlang = $newlang;
      } else {
         setcookie("lang",$language,time()+31536000);
         include_once("language/lang-".$language.".php");
         $currentlang = $language;
      }
   } elseif (isset($lang)) {
      include_once("language/lang-".$lang.".php");
      $currentlang = $lang;
   } else {
      setcookie("lang",$language,time()+31536000);
      include_once("language/lang-".$language.".php");
      $currentlang = $language;
   }
}

#
# ------- [ FIND, INLINE ] ---------
#
   } else {
      setcookie("lang",$language,time()+31536000);

#
# ------- [ AFTER, ADD ] ----------
#
      if (empty($language))
      {
         $language = "english";
      };

#
# ------- [ SAVE ] -------------------
#
mainfile.php

#
# -------- [ EOF: End Of Fixation ] ------------
#
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Wed Sep 28, 2005 11:50 am Reply with quote

Did you post this at NukeFixes.com or NukeResources.com, the homes of Nuke Patched ?

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
ToolBox







PostPosted: Wed Sep 28, 2005 4:45 pm Reply with quote

They got it.
 
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 -> PHP-Nuke Patched Series By Chatserv

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 ©