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!


Results 1 to 3 of 3

Thread: PHP/CSS?

  1. #1
    Join Date
    Feb 2006
    Location
    Scotland
    Posts
    2,087
    Tokens
    138

    Latest Awards:

    Default PHP/CSS?

    Hey,
    In my website at the moment I have a little problem, with some CSS/PHP.
    Now the layout is practically ready, but we have an image of the habbo that we want to replace with the users habbo.

    Now this is defined in our CSS file as:

    #main #users #habbo {
    margin-top: 0px;
    margin-left: 36px;
    height: 90px;
    width: 86px;
    background: url(Image URL) no-repeat bottom center;
    float: left;
    }

    Now, the URL of the habbo image is:
    http://www.habbo.co.uk/habbo-imaging...ure=sml&size=l
    (Switching HABBONAME with the users habbo name)

    The habbo name of the user is defined as $logged[habboname] but I cannot seem to figure out how to make all this come together.

    Any help is appreciated!
    (Ill give +REP if I can too)

  2. #2
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default

    Quote Originally Posted by Johno! View Post
    Hey,
    In my website at the moment I have a little problem, with some CSS/PHP.
    Now the layout is practically ready, but we have an image of the habbo that we want to replace with the users habbo.

    Now this is defined in our CSS file as:

    #main #users #habbo {
    margin-top: 0px;
    margin-left: 36px;
    height: 90px;
    width: 86px;
    background: url(Image URL) no-repeat bottom center;
    float: left;
    }

    Now, the URL of the habbo image is:
    http://www.habbo.co.uk/habbo-imaging...ure=sml&size=l
    (Switching HABBONAME with the users habbo name)

    The habbo name of the user is defined as $logged[habboname] but I cannot seem to figure out how to make all this come together.

    Any help is appreciated!
    (Ill give +REP if I can too)
    PHP Code:
    <?php
    $url 
    'http://www.habbo.co.uk/habbo-imaging/avatarimage?user=' $logged'habboname' ] . '&action=&direction=3&head_direction=3&gesture=sml&size=l';
    echo ( 
    '<style type="text/css">
    #main #users #habbo {
        margin-top: 0px;
        margin-left: 36px;
        height: 90px;
        width: 86px;
        background: url( "' 
    $url ' " ) no-repeat bottom center;
        float: left;
    }
    </style>' 
    );
    ?>
    Hi, names James. I am a web developer.

  3. #3
    Join Date
    Feb 2006
    Location
    Scotland
    Posts
    2,087
    Tokens
    138

    Latest Awards:

    Default

    Thanks

    Works perfectly! +REP

Posting Permissions

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