NukeXchange Network

          

Nuke Sites Link Directory
Nuke Fixes · NukeForums · NukeZone Hosting · NukeUnited · Nuke Sites · Nuke Skins · NukeLance
Nuke Resources
 :: Home  :: Downloads  :: Your Account  :: Forums  :: Advertise :: 
Login or Register
Main Menu
General
 Main
 AvantGo
 Banner_Clients
 cfaq
 Donations
 Downloads
 Forums
 Members_List
 Private_Messages
 Search
 Stories_Archive
 Submit_News
 Surveys
 Topics
 Web_Links
 Your_Account

Your Account
 Login
 Register
 Lost Pass

Modules
Quick Links
· CMS Focus
· Domain Names
. Game Quest
· Learning Linux
. MateMaker
· NukeFixes
· NukeForums
· NukeLance
· Nuke Sites
· Nuke Skins
· NukeZone Hosting
. SearchDevil
Other Options

Download Resources
· Nuke Downloads
· Add a Link
· New Files
· Top Rated
· Most Popular

Web Site Resources
· Nuke Sites
· Add A Site
· New Sites
· Top Rated
· Most Popular

Support
· NukeZone Hosting
· NukeSkins.com
· NukeForums.com
· phpnuke.org
· NukeFixes.com
Information
NukeForums
·decompressing EN-Book-Nuke.tar.tar
·How to allow spaces/gaps/"-" in allowed usernames
·How to Setup PHPNUKE on win2k
·cannot save changes
·voting?
·Nuke forum picture problem
·How to change smtp port on wampserver and windows
·yet another 301 redirect problem
·Image display? - newbie
·php nuke help

read more...
Top10 Links
· 1: Nuke Forums
· 2: PHPNukeFiles
· 3: NukeSkins
· 4: Nuke Templates
· 5: EcomJunk
· 6: MDesign
· 7: Windows Installation: PHP
· 8: FLASH-FOR-NUKE
· 9: Dezina
· 10: Global Dream News Sharing Portal!
Site Visitors
User Login:

Nickname:
Password:
Security Code: Security Code
Type Security Code Here:

Members List Membership:
Latest: qwertz
Today: 2
Yesterday: 0
Overall: 15102

Visitation:
Guests: 497
Members: 1
Total: 498


You are Anonymous user. You can register for free by clicking here
Sponsor Links
Need to find your IP fast?
Need to find your IP fast?

NukeResources :: View topic - Error in Nuke7.9+Patched3.1 when we make logout!
NukeResources Forum Index

NukeResources Forum Index -> Bug Reports -> Error in Nuke7.9+Patched3.1 when we make logout!
Post new topic  Reply to topic    View previous topic :: View next topic 
Error in Nuke7.9+Patched3.1 when we make logout!
PostPosted: Sun Sep 25, 2005 9:02 am Reply with quote
Gideao
Resource Seeker
Resource Seeker
 
Joined: Apr 02, 2004
Posts: 20
Location: Maceió/AL - Brasil




A error happens when an user makes logout. This happens if the user has selected a theme opposite of the default. Because when the user makes logout the phpnuke to try to return to the default theme, and it is where the error happens.

Code:
Fatal error: Cannot redeclare opentable() (previously declared in c:\AppServ\www\nuke\themes\Odyssey\tables.php:15) in c:\AppServ\www\nuke\themes\DeepBlue\theme.php on line 14


Default theme configured in the database: DeepBlue
Theme selected by the user in your account: Odyssey

Reminding that both themes are originals of the nuke7.9
View user's profile Send private message Visit poster's website
PostPosted: Sun Sep 25, 2005 12:30 pm Reply with quote
chatserv
Site Admin
Site Admin
 
Joined: Apr 21, 2002
Posts: 1732
Location: Puerto Rico




Try changing your get_theme function in mainfile.php to:
Code:
function get_theme() {
    global $user, $userinfo, $Default_Theme;
    if (isset($ThemeSelSave)) return $ThemeSelSave;
    if(is_user($user)) {
        getusrinfo($user);
        if(!file_exists("themes/".$userinfo['theme']."/theme.php")) {
            $ThemeSel = $Default_Theme;
        } else {
            $ThemeSel = $userinfo['theme'];
        }
    } else {
        $ThemeSel = $Default_Theme;
    }
    static $ThemeSelSave;
    $ThemeSelSave = $ThemeSel;
    return $ThemeSelSave;
}

_________________
NukeResources | ScriptHeaven
View user's profile Send private message Visit poster's website
PostPosted: Sun Sep 25, 2005 1:19 pm Reply with quote
Gideao
Resource Seeker
Resource Seeker
 
Joined: Apr 02, 2004
Posts: 20
Location: Maceió/AL - Brasil




Chatserv, this didn't work. I already discovered the mistake and I already repaired with the same original code.
it is enough to increase, $op in the end of the global line

In mainfile.php
Change:
Code:
function get_theme() {
    global $user, $userinfo, $Default_Theme, $name;

To:
Code:
function get_theme() {
    global $user, $userinfo, $Default_Theme, $name, $op;


Remember that this works in the original code, and not in the code shown by the chatserv.

Smile chatserv, you can edit this message for a perfect English.
View user's profile Send private message Visit poster's website
PostPosted: Sun Sep 25, 2005 1:45 pm Reply with quote
chatserv
Site Admin
Site Admin
 
Joined: Apr 21, 2002
Posts: 1732
Location: Puerto Rico




Code:
function get_theme() {
    global $user, $userinfo, $Default_Theme, $name, $op;
    if (isset($ThemeSelSave)) return $ThemeSelSave;
    if(is_user($user) && ($name != "Your_Account" && $op != "logout")) {
        getusrinfo($user);
        if(empty($userinfo['theme'])) $userinfo['theme']=$Default_Theme;
        if(file_exists("themes/".$userinfo['theme']."/theme.php")) {
            $ThemeSel = $userinfo['theme'];
        } else {
            $ThemeSel = $Default_Theme;
        }
    } else {
        $ThemeSel = $Default_Theme;
    }
    static $ThemeSelSave;
    $ThemeSelSave = $ThemeSel;
    return $ThemeSelSave;
}

_________________
NukeResources | ScriptHeaven
View user's profile Send private message Visit poster's website
PostPosted: Sun Sep 25, 2005 1:51 pm Reply with quote
chatserv
Site Admin
Site Admin
 
Joined: Apr 21, 2002
Posts: 1732
Location: Puerto Rico




I still don't like it because of this:
Code:
if(empty($userinfo['theme'])) $userinfo['theme']=$Default_Theme;
        if(file_exists("themes/".$userinfo['theme']."/theme.php")) {
            $ThemeSel = $userinfo['theme'];
        } else {
            $ThemeSel = $Default_Theme;
        }

The first line makes sure $userinfo['theme'] is not empty by setting it to $Default_Theme if the user doesn't have a theme set in his profile so the part that reads:
Code:
else {
            $ThemeSel = $Default_Theme;
        }

is not required.

_________________
NukeResources | ScriptHeaven
View user's profile Send private message Visit poster's website
PostPosted: Sun Sep 25, 2005 2:23 pm Reply with quote
Gideao
Resource Seeker
Resource Seeker
 
Joined: Apr 02, 2004
Posts: 20
Location: Maceió/AL - Brasil




Chatserv, that is necessary yes! Because if the administrator excludes the theme that the user used, when this user makes login a error will happen.

I proved and I saw this error:
Code:
Warning: main(themes//theme.php) [function.main]: failed to open stream: No such file or directory in c:\AppServ\www\nuke\mainfile.php on line 1012

Warning: main() [function.include]: Failed opening 'themes//theme.php' for inclusion (include_path='.;C:\php5\pear') in c:\AppServ\www\nuke\mainfile.php on line 1012

Warning: main(themes//theme.php) [function.main]: failed to open stream: No such file or directory in c:\AppServ\www\nuke\mainfile.php on line 1249

Warning: main() [function.include]: Failed opening 'themes//theme.php' for inclusion (include_path='.;C:\php5\pear') in c:\AppServ\www\nuke\mainfile.php on line 1249

Warning: head(themes//theme.php) [function.head]: failed to open stream: No such file or directory in c:\AppServ\www\nuke\header.php on line 31

Warning: head() [function.include]: Failed opening 'themes//theme.php' for inclusion (include_path='.;C:\php5\pear') in c:\AppServ\www\nuke\header.php on line 31

Fatal error: Call to undefined function: themeheader() in c:\AppServ\www\nuke\header.php on line 50


For this I say that it is better to maintain the code:
Code:
else {
            $ThemeSel = $userinfo['theme'];
        }
View user's profile Send private message Visit poster's website
PostPosted: Sun Sep 25, 2005 2:36 pm Reply with quote
chatserv
Site Admin
Site Admin
 
Joined: Apr 21, 2002
Posts: 1732
Location: Puerto Rico




Yes but you should be able to accomplish the same thing with:
Code:
function get_theme() {
    global $user, $userinfo, $Default_Theme, $name, $op;
    if (isset($ThemeSelSave)) return $ThemeSelSave;
    if(is_user($user) && ($name != "Your_Account" && $op != "logout")) {
        getusrinfo($user);
        if(file_exists("themes/".$userinfo['theme']."/theme.php")) {
            $ThemeSel = $userinfo['theme'];
        } else {
            $ThemeSel = $Default_Theme;
        }
    } else {
        $ThemeSel = $Default_Theme;
    }
    static $ThemeSelSave;
    $ThemeSelSave = $ThemeSel;
    return $ThemeSelSave;
}

This way if $userinfo['theme'] does not exist or is empty it will set it to $Default_Theme.

_________________
NukeResources | ScriptHeaven
View user's profile Send private message Visit poster's website
PostPosted: Sun Sep 25, 2005 2:45 pm Reply with quote
Gideao
Resource Seeker
Resource Seeker
 
Joined: Apr 02, 2004
Posts: 20
Location: Maceió/AL - Brasil




Ok! Make the test you even.
View user's profile Send private message Visit poster's website
Error in Nuke7.9+Patched3.1 when we make logout!
 NukeResources Forum Index -> Bug Reports
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
All times are GMT - 4 Hours  
Page 1 of 1  

  
  
 Post new topic  Reply to topic     



Powered by phpBB © 2001-2005 phpBB Group.     Theme created by Vjacheslav Trushkin.
There have been 150 unique hit(s) in the past 24 hours.
Forums ©
Download the Best Archiver in the World


Best viewed with a Browser
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2001 - 2007 by NukeResources.com
You can syndicate our news using the file .backend.php or ultramode.txt
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.34 Seconds

:: Eos phpbb2 style by Cyberalien :: PHP-Nuke theme by www.nukemods.com ::