Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 8 12345 ... LastLast
Results 1 to 10 of 71
  1. #1
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default Magic - User System Framework

    Hey peoples,

    As a by-product of procrastination I've begun work on an idea I had a while back, which was to develop a simple yet functional User System framework, to rapidly speed up development times when creating a dynamic site.

    The system works by including a class within your page, providing an abstracted set of functions you can use to create a fully fledged user system.

    Since this is still in the early development stages i wanted to know what features people think it would need.

    NOTE: This is not a user system itself, but instead a framework to build user systems with.


    So far:
    Functions

    authenticated()
    - true / false as to whether user is logged in

    getName()
    - return username or guest if not logged in

    getAvatar()
    - get avatar url of user

    login($username,$password)
    - log user in

    logout()
    - log user out

    getUserInfo($uid)
    - Return array of users details

    updateProfileField($field,$newvalue)
    - updates profile feild

    updateProfile($uid,$avatar,$description)
    - Update profile info

    createNewUser
    - Create new user in the system

    removeUser($id)
    - remove user from system

    changePassword($oldpassword,$newpassword)



    Any other important, functions of features wanted. the system works both with flatfiles only or with a MySQL database

  2. #2
    Join Date
    Oct 2008
    Location
    New York
    Posts
    308
    Tokens
    0

    Default

    This is very good and will help a lot of people out, you should go ahead with it.
    ~ PixelPoco.com Co-Founder
    ~ Freelance Web developer.
    ~ Currently: Unavailable for work.



    Quote Originally Posted by Favourtism View Post
    i facebooked ur mum
    Lulz

  3. #3
    Join Date
    Jun 2008
    Location
    West midlands, Birmingham.
    Posts
    2,093
    Tokens
    219

    Latest Awards:

    Default

    Sounds good, go for it.

    Cant think of any stuff, maybe a chatbox where you can discuss stuff? idno

  4. #4
    Join Date
    Dec 2008
    Location
    Leicestershire
    Posts
    56
    Tokens
    0

    Default

    Yeah, would be a great help as I find Habbosofts useless, firstly you cant intergrate it into your own website with massive coding and secondly more features!

  5. #5
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    smarty support? im sure you can extend the smarty class to add new functions into it? i dont know, but i think you can.

  6. #6
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Adding smarty would bloat the hell out of what I think should be a simple library to help build systems.

  7. #7
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by Source View Post
    Adding smarty would bloat the hell out of what I think should be a simple library to help build systems.
    no i meant a seperate class for smarty so you could do like

    {loggedin="true"}
    something
    {/loggedin}

  8. #8
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Oh right, a class to set smarty up for basic usage of the user system. That could be beneficial.

  9. #9
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Smarty definaly looks like it could be a good choice for adding in as i was concidering writeing my own skinning engine :p
    Im trying to write Magic so its highly abstracted enogth that the front end is almost completely customisable in how its impleneted. So far to use smarty the only change needed would be to import smarty along with the magic class's at the top of your page, but more direct intergration is definitly somthing to think about.

    Anyway, i started creating a test script for it (ugly as hell) but shows how you would interact with the usersystem magic class so far. (i know its badly done but its mainly to demo the interactions and for me to test stuff on the fly)
    PHP Code:
    <?php

    //Magic!
    include('Magic/userSys.php');
    $userSys = new UserSystem('config.php');

    //System,
    $profile $_GET['profile'];

    ?>
    <div style='background-color:black;padding:10px;margin:0;color:#ffffff;font-weight:bold;'>
    <?php

    if($userSys->authenticated()){
        echo 
    "Welcome back <a href='?profile=".$userSys->getUID()."'>".$userSys->getName().'</a> - - logout';
    }else{
        echo 
    "Please Login";
    }

    ?>
    </div>

    <div style='float:right;padding:5px;margin:15px;background-color:black;color:white;width:200px;'>
    <strong>Users List</strong> <br>
    <?php

        $userslist 
    $userSys->getUserList();
        foreach(
    $userslist as $username => $uid){
            echo 
    "<a href='?profile={$uid}'>{$username}</a><br>";
        }
    ?>

    </div>
    <div style='padding:20px;'>
    <?php
        $user 
    $userSys->getUserInfo($profile);
        if(
    $user !==null){
            
    $profile $user->getAttributeArray();
            foreach(
    $profile as $att => $val){
                echo 
    $att.' : '.$val.' <br>';
            }
        
        }else{
            echo 
    'invalid profile';
        }
        

    ?>
    </div>
    Produces


    Any comments on how the userSys methods work?

  10. #10
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Havnt seen how the class is written but, wouldn't it make more sense to merge

    $userSys->getUID()

    and

    $userSys->getName()


    into something like $userSys->getInfo( 'UID' )/( 'name' ); ?

Page 1 of 8 12345 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •