PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
Mesum
Useless


Joined: Aug 23, 2002
Posts: 213
Location: Chicago

PostPosted: Wed Dec 08, 2004 7:52 am Reply with quote Back to top

Hello again guys, I know most people don't bother reading this section but I just thought of posting it here and see you guys think of this:

The idea has been taken from CNBYA...What if we break the mainfile.php into many small files?

Code:

case "get_theme":
        {
            include("includes/main/gettheme.php");
        } else {
            disabled();
        }
    break;


And in includes/main/gettheme.php

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);
}

with other necessary code needed and then we global everything in once...Hell, I have no idea what I am talking about but I hope someone gets the idea.

What you guys think? Yay or Nay?
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


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

PostPosted: Wed Dec 08, 2004 9:14 am Reply with quote Back to top

Organizationally it might be nice. But as for speed, I would say that any increase would not be significant enough to matter.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Mesum
Useless


Joined: Aug 23, 2002
Posts: 213
Location: Chicago

PostPosted: Wed Dec 08, 2004 1:25 pm Reply with quote Back to top

Can we add the "if" function to the case like:

Code:

if case "get_theme":
        {
            include("includes/main/gettheme.php");
        } else {
            donothing();
        }
    break;


Or something like that, this way it won't call the quires for something that hasn't been used?
View user's profile Send private message Visit poster's website
Specks
New Member
New Member


Joined: Jan 24, 2005
Posts: 12

PostPosted: Tue Jan 25, 2005 1:43 pm Reply with quote Back to top

Case doesn't work that way. PHP will complain if you do that. In fact it won't even run.
View user's profile Send private message
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.

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-2011 by Raven

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 Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum