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 3 123 LastLast
Results 1 to 10 of 30
  1. #1
    Join Date
    Nov 2006
    Location
    Narrich
    Posts
    5,687
    Tokens
    0
    Habbo
    Jamesy...

    Latest Awards:

    Question Swap image on a certain date? +rep

    I was wondering if there was a script or something to swap an image on a certain date, because I won't be online until after the new year in a few weeks because we have to move the computer to fit everyone in for christmas.

    The header is defined in the CSS though so I'm thinking it may not be possible to do it.

    +rep to any help!
    Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/

  2. #2
    Join Date
    Sep 2006
    Location
    Hobart, Australia
    Posts
    593
    Tokens
    0

    Default

    It can be done, you'll just have to set up a class in your CSS exactly like a normal header, except with the new image.

    Then, where the class is defined in your document, add code like this...

    PHP Code:
    if(date('d M Y') == '25 Dec 2007') {

        echo 
    '<div class="christmas_header"></div>';
        
    }

    else {

        echo 
    '<div class="normal_header"></div>';
        

    Replacing the '25 Dec 2007' with whatever date you want to use, and changing the echos to reflect what your class names are in the CSS.

  3. #3
    Join Date
    Nov 2006
    Location
    Narrich
    Posts
    5,687
    Tokens
    0
    Habbo
    Jamesy...

    Latest Awards:

    Default

    It doesn't change.

    PHP Code:
    <div id="header">
      <h1>i<span>Rant</span></h1>    
        <?PHP if(date('d M Y') == '16 Nov 2007') {

        echo 
    '<div class="header2008"></div>';
        
    }

    else {

        echo 
    '<div class="header"></div>';
        
    }
    ?>
       
    </div>
    Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/

  4. #4
    Join Date
    Sep 2006
    Location
    Hobart, Australia
    Posts
    593
    Tokens
    0

    Default

    Where is your server located? It might be the 17th according to where it is. Try changing the date to the 17th and see what happens.

  5. #5
    Join Date
    Dec 2006
    Posts
    7,601
    Tokens
    95

    Latest Awards:

    Default

    if it is the date then jsut try like one random day int he past such as 5 oct 2006 then one in the future and see if it changes

  6. #6
    Join Date
    Jan 2006
    Location
    Lichfield (Staffordshire) UK
    Posts
    84
    Tokens
    0

    Default

    <?
    $timer_date = date("d,M,Y");
    if($timer_date == "16,Nov,2007")
    {

    echo
    '<div class="header2008"></div>';

    }
    else
    {

    echo
    '<div class="header"></div>';

    }
    ?>


    hopefully that will work for you although i havet tested it

    EDIT IT WORKS
    Last edited by gtavc1210; 16-11-2007 at 08:42 PM.
    David
    You only live once[B] so live life to the max.

    Email: [email protected]

    [/URL]

  7. #7
    Join Date
    Nov 2006
    Location
    Narrich
    Posts
    5,687
    Tokens
    0
    Habbo
    Jamesy...

    Latest Awards:

    Default

    Quote Originally Posted by benzoenator View Post
    Where is your server located? It might be the 17th according to where it is. Try changing the date to the 17th and see what happens.
    I did an IP search and it's in the netherlands.
    195.242.99.204

    So 17th does nothing...

    Post above did not work either +rep anyway
    Last edited by Jamesy; 16-11-2007 at 08:43 PM.
    Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/

  8. #8
    Join Date
    Sep 2006
    Location
    Hobart, Australia
    Posts
    593
    Tokens
    0

    Default

    Try forcing your server to use GMT.

    PHP Code:
    putenv ('TZ=Europe/London'); 
    Add that in <?PHP tags to the very top of your page. See whether that does anything.

  9. #9
    Join Date
    Jan 2006
    Location
    Lichfield (Staffordshire) UK
    Posts
    84
    Tokens
    0

    Default

    <?
    $timer_date = date("d,M,Y");
    if($timer_date == "16,Dec,2007")
    {

    echo '';

    }
    else
    {

    echo '';

    }
    ?>

    this works fine for me

    http://www.parkerweblogic.co.uk/testdate.php = Dec 07
    http://www.parkerweblogic.co.uk/testdate1.php = Nov 07


    Putting <?PHP is pointless! just put <?
    Last edited by gtavc1210; 16-11-2007 at 08:45 PM.
    David
    You only live once[B] so live life to the max.

    Email: [email protected]

    [/URL]

  10. #10
    Join Date
    Nov 2006
    Location
    Narrich
    Posts
    5,687
    Tokens
    0
    Habbo
    Jamesy...

    Latest Awards:

    Default

    Neither worked

    Sorry for the trouble...
    Ex-janitor. Might pop in from time to time, otherwise you can grab all my information from http://jamesy.me.uk/

Page 1 of 3 123 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
  •