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
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

PostPosted: Mon Oct 03, 2005 12:52 pm Reply with quote

For come reason my users' custom theme is not working in the "Your Account" module only... works in all others. I just upgraded from 76v2.8 to 76v3.1. Anyone have any ideas?
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Mon Oct 03, 2005 1:56 pm Reply with quote

It would help if you would explain what my users' custom theme is not working in the "Your Account" module only means Wink
 
View user's profile Send private message
ThePiston
PostPosted: Mon Oct 03, 2005 2:49 pm Reply with quote

I have only 2 themes on my site... XP-Olive is for the visitors and I set all of the members to XP-Silver. This way you know when you are logged in and when you are not because of the color change. This worked perfectly in v2.8 but after the 3.1 patch - it still works, but not in the "Your Account" module. It stays in the default "XP-Olive" theme even though I am logged in as a user who's custom theme is XP-Silver. Anything having to do with the "Your Account" module, (even logging out of admin) shows the site's default Olive theme. There must be something in the index file that is preventing the custom theme from showing up?
 
chatserv
Member Emeritus


Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Mon Oct 03, 2005 7:59 pm Reply with quote

Post your get_theme function from mainfile.php
 
View user's profile Send private message Visit poster's website
ThePiston
PostPosted: Mon Oct 03, 2005 8:37 pm Reply with quote

this is directly from the 3.1 mainfile.php
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;
}


Last edited by ThePiston on Mon Oct 03, 2005 8:40 pm; edited 1 time in total 
Raven
PostPosted: Mon Oct 03, 2005 8:39 pm Reply with quote

That code goes in mainfile.php not Your_Account/index.php. It would kill the page because you are redeclaring the function which PHP does NOT allow.
 
ThePiston
PostPosted: Mon Oct 03, 2005 8:41 pm Reply with quote

yeah, caught that.... oops. I thought he meant post the code to the account/index file. I took it out and posted it above. noob, sorry
 
chatserv
PostPosted: Mon Oct 03, 2005 9:43 pm Reply with quote

If using GT NextGen change the get_theme function to:
Code:
function get_theme() {

    global $user, $userinfo, $Default_Theme, $name, $op;
    $queryString = strtolower($_SERVER['QUERY_STRING']);
    if(is_user($user) && ($name != "Your_Account" && ($op != "logout" || stripos_clone($queryString,'logout')))) {
    if (isset($ThemeSelSave)) return $ThemeSelSave;
        $user2 = base64_decode($user);
        $user2 = addslashes($user2);
        $t_cookie = explode(":", $user2);
        if(empty($t_cookie[9])) $t_cookie[9]=$Default_Theme;
        if(file_exists("themes/".$t_cookie[9]."/theme.php")) {
            $ThemeSel = $t_cookie[9];
        } else {
            $ThemeSel = $Default_Theme;
        }
    } else {
        $ThemeSel = $Default_Theme;
    }
    static $ThemeSelSave;
    $ThemeSelSave = $ThemeSel;
    return $ThemeSelSave;
}

else change it to:
Code:
function get_theme() {

    global $user, $userinfo, $Default_Theme, $name, $op;
    if(is_user($user) && ($name != "Your_Account" OR $op != "logout")) {
    if (isset($ThemeSelSave)) return $ThemeSelSave;
        $user2 = base64_decode($user);
        $user2 = addslashes($user2);
        $t_cookie = explode(":", $user2);
        if(empty($t_cookie[9])) $t_cookie[9]=$Default_Theme;
        if(file_exists("themes/".$t_cookie[9]."/theme.php")) {
            $ThemeSel = $t_cookie[9];
        } else {
            $ThemeSel = $Default_Theme;
        }
    } else {
        $ThemeSel = $Default_Theme;
    }
    static $ThemeSelSave;
    $ThemeSelSave = $ThemeSel;
    return $ThemeSelSave;
}


Last edited by chatserv on Mon Oct 03, 2005 11:35 pm; edited 1 time in total 
ThePiston
PostPosted: Mon Oct 03, 2005 11:07 pm Reply with quote

sorry Chat, neither one worked. thanks for trying though.
 
chatserv
PostPosted: Mon Oct 03, 2005 11:20 pm Reply with quote

Retry the second code, i updated it after testing it on a site without GT.
 
ThePiston
PostPosted: Tue Oct 04, 2005 7:43 am Reply with quote

holy crap it worked... thank yo uso much, that was starting to drive me nuts... whoo hoo
 
chatserv
PostPosted: Tue Oct 04, 2005 8:08 am Reply with quote

Wink
 
Raven
PostPosted: Wed Mar 08, 2006 8:29 am Reply with quote

This has been fixed in RavenNuke76 v2.02.02 CVS w/o checking the module name. That should not need to be done - it's too restrictive. These should be universal modules/code.
 
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 ©