Our Sponsors



Custom jobs at low cost, free lancers and service buyers.
PHP Nuke themes, stock photos, icons, drupal themes and more.



Western Studios :: View topic - Theme preview module - code not same as listed?
Need Jobs done? Use our brand new Jobs Board to get your projects done at affordable prices.
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups     ProfileProfile   Log inLog in 


Theme preview module - code not same as listed?



 
Post new topic   Reply to topicprinter friendly version    Western Studios Forum Index -> Web Design


~PHP Nuke User~


Guest wrote:

I downloaded your theme preview module, and uploaded stuff where it was supposed to. Then I went into the mainfile.php as requested and looked for the section it said to replace:

Code:
function get_theme() {
    global $user, $cookie, $Default_Theme;
    static $ThemeSelSave;
    if (isset($ThemeSelSave)) return ($ThemeSelSave);
    if(is_user($user)) {
        $user2 = base64_decode($user);
        $t_cookie = explode(":", $user2);
        if($t_cookie[9]=="") $t_cookie[9]=$Default_Theme;
        if(isset($theme)) $t_cookie[9]=$theme;
        if(!$tfile=@opendir("themes/$t_cookie[9]")) {
            $ThemeSel = $Default_Theme;
        } else {
            $ThemeSel = $t_cookie[9];
        }
    } else {
        $ThemeSel = $Default_Theme;
    }
    $ThemeSelSave = $ThemeSel;
    return($ThemeSel);
}


But it wasn't there! Instead, what I found was this:

Code:
function get_theme() {

    global $user, $cookie, $Default_Theme;

    if(is_user($user)) {

   $user = addslashes($user);

   $user2 = base64_decode($user);

   $t_cookie = explode(":", $user2);

   if($t_cookie[9]=="") $t_cookie[9]=$Default_Theme;

   if(isset($theme)) $t_cookie[9]=$theme;

   if(!$tfile=@opendir("themes/$t_cookie[9]")) {

       $ThemeSel = $Default_Theme;

   } else {

       $ThemeSel = $t_cookie[9];

   }

    } else {

   $ThemeSel = $Default_Theme;

    }

    return($ThemeSel);


Is this a newer version? Can I still use this module? I'm running PHPNuke 7.5, installed through a fantastico installation by my web hosting company (hence my cluelessness).

Thanks in advance!

Posted: Sat Mar 26, 2005 2:06 pm

Western Studios

Site Admin
Site Admin
~PHP Nuke User~

Platinum Subscriber

Posts: 3358
Staff
Next Group: 1642 posts
admin(Mark) wrote:

Hi, it is a previous version but i have gotten it to work with 7.5. Make a backup of your mainfile.php then replace that function_get_theme with the one from the block. It should work, if not, just replace the original mainfile.php and i'll take a look at it for you.

Posted: Sat Mar 26, 2005 2:20 pm

Western Studios

Dedicated Users
Dedicated Users
~PHP Nuke User~


Posts: 167
Next Group: 333 posts
Jabba wrote:

Try this preview theme block.
http://lorkan.com/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=56&ttitle=Theme_Preview_v.1.0
Works great on my site and is simple to install.

Posted: Sat Mar 26, 2005 2:23 pm

Western Studios

Site Admin
Site Admin
~PHP Nuke User~

Platinum Subscriber

Posts: 3358
Staff
Next Group: 1642 posts
admin(Mark) wrote:

It's the same as the one on this site. Created by Viperal for everyone.

Posted: Thu Mar 31, 2005 8:37 pm

Post new topic   Reply to topic    Western Studios Forum Index -> Web Design All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts PHP paste bin added 0 admin 866 Wed Mar 23, 2005 6:47 pm
admin View latest post
No new posts PHP Nuke klips 0 admin 710 Fri Mar 18, 2005 6:52 pm
admin View latest post
No new posts Paypal success.php 1 Jabba 882 Fri Mar 04, 2005 7:00 pm
admin View latest post
No new posts Testing PHP tags 2 admin 859 Thu Mar 03, 2005 6:06 pm
admin View latest post
No new posts PHP Nuke Icons 0 admin 916 Mon Aug 23, 2004 4:05 pm
admin View latest post
 
Forums ©