IndigoWEB [OOP, MySQL]

Page 6 of 8 FirstFirst 12345678 LastLast
Results 76 to 90 of 107
  1. #76
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by Caustik View Post
    Don't have:
    PHP Code:
    if(!defined(IW)) 
    Before you define it.
    Shit, thanks for pointing that out.

  2. #77
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: IndigoWEB [OOP, MySQL]

    Not working on this today, got a headache.

    Quote Originally Posted by Xenous View Post
    That's just plain messy why define all that if your only requiring a few files? if it was like 8 files yeah that validates it but 3 o.o?
    There are going to be more files being called from that file. It is actually cleaner at the moment.

  3. #78
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by Kryptos View Post
    Where have I heard a similar story before?
    Hey, hey, Let's not start this!

  4. #79
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: IndigoWEB [OOP, MySQL]

    Just thought I may as well post the MySQL class which is UNFINISHED.

    PHP Code:
    <?php
    ########################################################
    # | IndigoWEB - An advanced Habbo CMS for IndigoEMU  | #
    ########################################################
    # | Copyright (c)2012 Ashley "nobrain" Davidson      | #
    # |    http://baalhotel.com | http://jokohost.com    | #
    ########################################################
    # | IndigoWEB and IndigoEMU is registered under the  | #
    # | don't be a dick license. If you remove the       | #
    # | copyright to the original creator(s) you are     | #
    # | a dick.                                          | #
    # |   http://philsturgeon.co.uk/code/dbad-license    | #
    ########################################################

    class IW_Database_Database_Engine
    {
        public function 
    __construct()
        {
            global 
    $config;
            
            
    mysql_connect($config['mysql']['hostname'], $config['mysql']['username'], $config['mysql']['password']) or die('Cannot connect to MySQL!');
            
    mysql_select_db($config['mysql']['database']) or die("Could not select MySQL database!");
        }
        
        public function 
    __destruct() 
        {
            
    // Nothing.
        
    }
    }
    ?>

  5. #80
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: IndigoWEB [OOP, MySQL]

    What's with the class name..

    If you want it to be using IW as the start.. use a namespace, bro!

  6. #81
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by Makarov View Post
    What's with the class name..

    If you want it to be using IW as the start.. use a namespace, bro!
    IW = IndigoWEB
    Database = Foldername
    Database = Start of file name
    Engine = End of file name

    Only did it so it pisses of people who rename since it would take a while and a lot of editing to change everything. ;)

  7. #82
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by ησвяαιη View Post
    IW = IndigoWEB
    Database = Foldername
    Database = Start of file name
    Engine = End of file name
    PHP Code:
    <?php
       
    namespace IW;

       class 
    databaseEngine
       
    {
          
    //Content
       
    }
    ?>
    Looks cleaner than the class name you currently have, but up to you.

  8. #83
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by Makarov View Post
    PHP Code:
    <?php
       
    namespace IW;

       class 
    databaseEngine
       
    {
          
    //Content
       
    }
    ?>
    Looks cleaner than the class name you currently have, but up to you.
    Edited my post before, might want to re-check it because I have stated a reason why I did it like that.

  9. #84
    Ultra Light Beam Makarov is offline
    MemberRank
    Apr 2010 Join Date
    GothamLocation
    3,622Posts

    Re: IndigoWEB [OOP, MySQL]

    Whatever you say bro, good luck.

  10. #85
    The one and only! Hejula is offline
    MemberRank
    Nov 2008 Join Date
    4,128Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by ησвяαιη View Post
    Edited my post before, might want to re-check it because I have stated a reason why I did it like that.
    Using Namespaces is cleaner though, as then in the configuration you will do:

    PHP Code:
    $db = new IW<backslash>Database_Engine(); 
    Or whatever you called the da

  11. #86
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: IndigoWEB [OOP, MySQL]

    I have been looking into how I can simplify file request calling. The css stylesheets will now be called through 1 global file.

    Example:
    Code:
    <link rel="stylesheet" href="Framework/Views/css/global.css"></link>
    That is the stylesheet request.

    Now, within the 'global.css' file it will import the other css files.

    Code:
    /* 
        Document   : global
        Created on : 20-Feb-2012, 17:14:53
        Author     : Ashley Davidson
    */
    
    @import url("index.css");
    
    body {
        font-family: Verdana,Arial,Helvetica,sans-serif;
    }
    This should clean up the HTML inside the files and make it easier for me.
    Last edited by NoBrain; 20-02-12 at 11:36 PM.

  12. #87
    The one and only! Hejula is offline
    MemberRank
    Nov 2008 Join Date
    4,128Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by ησвяαιη View Post
    I have been looking into how I can simplify file request calling. The css stylesheets will now be called through 1 global file.

    Example:
    Code:
    <link rel="stylesheet" href="Framework/Views/css/global.css"></link>
    That is the stylesheet request.

    Now, within the 'global.css' file it will import the other css files.

    Code:
    /* 
        Document   : global
        Created on : 20-Feb-2012, 17:14:53
        Author     : Ashley Davidson
    */
    
    @import url("index.css");
    
    body {
        font-family: Verdana,Arial,Helvetica,sans-serif;
    }
    This should clean up the HTML inside the files and make it easier for me.
    A better thing would be to code a style.php file, and inside that is a foreach, so you can do <link rel="stylesheet" href="style.php?css=global,index">.

  13. #88
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,479Posts

    Re: IndigoWEB [OOP, MySQL]

    Looks nice, looking forward to more updates.

  14. #89
    "(still lacks brains)" NoBrain is offline
    MemberRank
    Sep 2011 Join Date
    United KingdomLocation
    2,658Posts

    Re: IndigoWEB [OOP, MySQL]

    Updates
    -Almost finished the Database Class.
    -Currently working on the Language Class.

    I'll probably finish the Language class in like 15 - 20 minutes.

    --------------

    Finished the Language class but I decided to not use it until Build 2. :)

    --------------

    HTML so far:

    Code:
    <!-- 
     _____           _ _         __          ________ ____  
    |_   _|         | (_)        \ \        / /  ____|  _ \ 
      | |  _ __   __| |_  __ _  __\ \  /\  / /| |__  | |_) |
      | | | '_ \ / _` | |/ _` |/ _ \ \/  \/ / |  __| |  _ < 
     _| |_| | | | (_| | | (_| | (_) \  /\  /  | |____| |_) |
    |_____|_| |_|\__,_|_|\__, |\___/ \/  \/   |______|____/ 
                          __/ |                             
    Build 1.10           |___/                              
    Codename: SHERLOCK
    Author: Ashley "nobrain" Davidson
    
    -->
    
    <html>
        <head>
            <meta name="description" content="Check into the world’s largest virtual hotel for FREE! Meet and make friends, play games, chat with others, create your avatar, design rooms and more…" />
            <meta name="keywords" content="habbo hotel, virtual, world, social network, free, community, avatar, chat, online, teen, roleplaying, join, social, groups, forums, safe, play, games, online, friends, teens, rares, rare furni, collecting, create, collect, connect, furni, furniture, pets, room design, sharing, expression, badges, hangout, music, celebrity, celebrity visits, celebrities, mmo, mmorpg, massively multiplayer" />
            <meta name="author" content="Ashley Davidson" />
            <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
            
            <link rel="stylesheet" href="Framework/Views/css/global.css"></link>
            
            <title>Indigo - Powered by IndigoWEB</title>
       </head>
    <div class="headerbar">
        lalalaal
    </div>

  15. #90
    The one and only! Hejula is offline
    MemberRank
    Nov 2008 Join Date
    4,128Posts

    Re: IndigoWEB [OOP, MySQL]

    Quote Originally Posted by ησвяαιη View Post
    Updates
    -Almost finished the Database Class.
    -Currently working on the Language Class.

    I'll probably finish the Language class in like 15 - 20 minutes.

    --------------

    Finished the Language class but I decided to not use it until Build 2. :)

    --------------

    HTML so far:

    Code:
    <!-- 
     _____           _ _         __          ________ ____  
    |_   _|         | (_)        \ \        / /  ____|  _ \ 
      | |  _ __   __| |_  __ _  __\ \  /\  / /| |__  | |_) |
      | | | '_ \ / _` | |/ _` |/ _ \ \/  \/ / |  __| |  _ < 
     _| |_| | | | (_| | | (_| | (_) \  /\  /  | |____| |_) |
    |_____|_| |_|\__,_|_|\__, |\___/ \/  \/   |______|____/ 
                          __/ |                             
    Build 1.10           |___/                              
    Codename: SHERLOCK
    Author: Ashley "nobrain" Davidson
    
    -->
    
    <html>
        <head>
            <meta name="description" content="Check into the world’s largest virtual hotel for FREE! Meet and make friends, play games, chat with others, create your avatar, design rooms and more…" />
            <meta name="keywords" content="habbo hotel, virtual, world, social network, free, community, avatar, chat, online, teen, roleplaying, join, social, groups, forums, safe, play, games, online, friends, teens, rares, rare furni, collecting, create, collect, connect, furni, furniture, pets, room design, sharing, expression, badges, hangout, music, celebrity, celebrity visits, celebrities, mmo, mmorpg, massively multiplayer" />
            <meta name="author" content="Ashley Davidson" />
            <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
            
            <link rel="stylesheet" href="Framework/Views/css/global.css"></link>
            
            <title>Indigo - Powered by IndigoWEB</title>
       </head>
    <div class="headerbar">
        lalalaal
    </div>
    You should use my suggestion, efficient. Also you have not defined the document type i.e. <!doctype html> or something. There is no body tags or closing html tag either.



Page 6 of 8 FirstFirst 12345678 LastLast

Advertisement