PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  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
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

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

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: 15024
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

PostPosted: Mon Oct 03, 2005 2:49 pm Reply with quote Back to top

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?
View user's profile Send private message
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1393

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

Post your get_theme function from mainfile.php
View user's profile Send private message Visit poster's website
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

PostPosted: Mon Oct 03, 2005 8:37 pm Reply with quote Back to top

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


Joined: Aug 27, 2002
Posts: 15024
Location: Kansas

PostPosted: Mon Oct 03, 2005 8:39 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

PostPosted: Mon Oct 03, 2005 8:41 pm Reply with quote Back to top

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
View user's profile Send private message
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1393

PostPosted: Mon Oct 03, 2005 9:43 pm Reply with quote Back to top

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
View user's profile Send private message Visit poster's website
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

PostPosted: Mon Oct 03, 2005 11:07 pm Reply with quote Back to top

sorry Chat, neither one worked. thanks for trying though.
View user's profile Send private message
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1393

PostPosted: Mon Oct 03, 2005 11:20 pm Reply with quote Back to top

Retry the second code, i updated it after testing it on a site without GT.
View user's profile Send private message Visit poster's website
ThePiston
Worker
Worker


Joined: Dec 22, 2004
Posts: 135

PostPosted: Tue Oct 04, 2005 7:43 am Reply with quote Back to top

holy crap it worked... thank yo uso much, that was starting to drive me nuts... whoo hoo
View user's profile Send private message
chatserv
The Mouse Is Extension Of Arm


Joined: May 02, 2003
Posts: 1393

PostPosted: Tue Oct 04, 2005 8:08 am Reply with quote Back to top

Wink
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15024
Location: Kansas

PostPosted: Wed Mar 08, 2006 8:29 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
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