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 24
  1. #1
    Join Date
    Apr 2006
    Location
    Leamington Spa
    Posts
    1,375
    Tokens
    72

    Latest Awards:

    Default Officially driving me insane now; best way to do a DJ Timetable

    Right well yeah, I've already got a DJ panel done, well basically all done, it's missing a Timetable.
    I've been trying for a good few hours now and it's mind numbingly boring.

    Have any of you got any good ideas for how I could make a Timetable?
    My idea for it sucks and doesn't work.
    Any suggestions would be appreciated.
    i've been here for over 8 years and i don't know why

  2. #2
    Join Date
    Jan 2007
    Location
    England, Uk, World, Universe,
    Posts
    1,012
    Tokens
    0

    Latest Awards:

    Default

    use a table and echo the information from the db?
    my sig ran away,

  3. #3
    Join Date
    Apr 2006
    Location
    Leamington Spa
    Posts
    1,375
    Tokens
    72

    Latest Awards:

    Default

    Very smart.
    What I was hoping for is ideas for the best methods to do that, I know how to code the PHP, but I'm wondering how best to lay out the SQL for ease of use and how to lay out the actual timetable pages.
    i've been here for over 8 years and i don't know why

  4. #4
    Join Date
    Jan 2007
    Location
    England, Uk, World, Universe,
    Posts
    1,012
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Imperial March View Post
    Very smart.
    That was sarcasm right?
    my sig ran away,

  5. #5
    Join Date
    Apr 2006
    Location
    Leamington Spa
    Posts
    1,375
    Tokens
    72

    Latest Awards:

    Default

    Unfortunatley, yes.
    Still needing ideas for this.
    i've been here for over 8 years and i don't know why

  6. #6
    Join Date
    May 2007
    Posts
    971
    Tokens
    1,516
    Habbo
    Jabbaboy

    Latest Awards:

    Default

    I like the way that airhabbo have done it etc. with the one table as it means thet you don't have to reload the page which makes it easier for the viewer.
    Email: [email protected] | Don't Have Skype or anything else.

  7. #7
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:


  8. #8
    Join Date
    Jun 2007
    Posts
    1,671
    Tokens
    130

    Latest Awards:

    Default

    Ohh Ajax version is nice

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

    Default

    I can tell you now, unless you're using array loops, which I've NEVER got the hang of, it's a lot of hardcoding.

    I've recently recoded the backend for HabboHut, which includes a schedule system. I have a table on the database called 'schedule'. Inside, there are 25 columns. One for day, and one for every hour of the day (I've called them 'hour_12' (for 12pm as an example), as MySQL won't work properly with columns beginning with numbers. Inside the table, I have seven rows, one for every day of the week. The day column is filled with the day (eg. Monday, Tuesday, Wednesday).

    When I'm booking a new slot, I'll grab the day and hour the user is booking, and slot it in like so:

    PHP Code:
    $query "UPDATE schedule SET $hour='$djname' WHERE day='$day'";
    $query mysql_query($query); 
    Returning the data in a timetable is the really annoying part. I've got it set up as a table, where each cell is returning a piece from the database. Eg.

    PHP Code:
    $query "SELECT * FROM schedule WHERE day='Tuesday'";
    $query mysql_query($query);
    $tuesday mysql_fetch_assoc($query);

    echo 
    $tuesday['hour_9']; // Will echo the slot booked for 9am on Tuesday 
    Unfortunately, this means entering a code echoing the data in each cell of the timetable = 168 rows, which is a lot of hardcoding. I pondered this issue for ages, and it seemed to be the only way to do it. Took me an hour and a half, but it's done now!

  10. #10
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    I can tell you now, unless you're using array loops, which I've NEVER got the hang of, it's a lot of hardcoding.
    Timetables are quite easy to code :S

    I made mine in like 10 Minutes. Including the AJAX controls. (Changing days, etc).

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
  •