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 6 12345 ... LastLast
Results 1 to 10 of 60
  1. #1
    DJ=Ice Guest

    Default How to do DJ Says. WITHOUT CUTENEWS!

    OK, A lot of people have been asking how to do DJ Says, NOT the cutenews way. I personally hated the cutenews way. Follow the simple instructions below to make a DJ Says. This DJ Says system will be like this:

    DJ Ice Says: Hey! Search ...... for the party!

    Make a page called djform.php and put in the following code:

    HTML Code:
    <form action="phpcode.php" method="post" name="form1" target="_self">
    <p>
    <label>DJ Name:
    <input name="djname" type="text" id="djname">
    </label>
    <br> 
    <label><br>
    DJ Message: <br>
    <textarea name="message" cols="35" id="message"></textarea>
    </label>
    </p>
    <p>
    <label>
    <input type="submit" name="Submit" value="Submit Message">
    </label>
    </p>
    </form>
     
    Then Customize that page to how you wish, different background color etc. Also when the DJ puts in there name they must only type the second part such as Ice not DJ Ice.

    OK, now make a page called phpcode.php and insert the following:

    PHP Code:
    <?php $myFile "testFile.txt";
    $fh fopen($myFile'w') or die("can't open file");
    $stringData "DJ $djname Says: $message\n";
    fwrite($fh$stringData);
    fclose($fh); ?>
     
    <!-------Now make the rest of the page here, make sure that the code above stays at the top!--------!>
    OK, now once you have used djform.php, it will lead to phpcode.php which will then create a file called testFile.txt on the same directory as all the other files above are in. You must then CHMOD testFile.txt to 666 if it isn't already done. So the DJ Says is located in testFile.txt. If your not bothered about formatting then just set testFile.txt to the DJ Message page.

    Formatting:

    Create a page called djmessage.php and put in the following in the body part of the page:

    PHP Code:
    <?php include("testFile.txt) ?>
    Then customize the page as you would normally. Then set the DJ Page to djmessage.php. Please note all the above files would work exactly how they are if in the same directory. If you want them in different directorys you will have to fiddle with the code. you MUST CHMOD the testFile.txt to 666 or it will not be writeable.

  2. #2
    Join Date
    Jun 2005
    Location
    USA
    Posts
    2,047
    Tokens
    0

    Latest Awards:

    Post

    That looks good but i have not tried it. + Rep.
    *Image Removed*

    Thank you Brad for the sig


    Signature edited by Nick- (Forum Super Moderator): Please do not have images that exceed the limit for non VIPs (700 x 150) in your signature.

  3. #3
    DJ=Ice Guest

    Default

    thnx, jus here to help people! lol. Anymore people like?

  4. #4
    Join Date
    Jul 2004
    Location
    Webby Forums!
    Posts
    1,879
    Tokens
    0

    Latest Awards:

    Default

    Is this tried and tested because imo it wouldnt work..


    Chilimagik.net // Reviews, Band Biographies, News, Pics + Loads More!!
    [Thybag.co.uk - Vive la revolutione]

  5. #5
    Join Date
    Aug 2004
    Location
    Essex
    Posts
    23,585
    Tokens
    9,258

    Latest Awards:

    Default

    Wouldn't all DJs need to have access to that page which then makes it a security risk...

  6. #6
    DJ=Ice Guest

    Default

    ain't that the whole point, DJ's have access to a DJ message page so they can leave a message? and lemme check wether it works.

    just found out, think you need to create the testFile.txt in the same directory then let it create it itself. and chmod it to 666. tht should work, if it don't say. plus I made it and it's fine on www.habbocentre.co.uk so dno what ya on bout

  7. #7
    Join Date
    Jul 2004
    Location
    Webby Forums!
    Posts
    1,879
    Tokens
    0

    Latest Awards:

    Default

    I doubt it does because 1 it would just show all the messages.. you would need to put it in an array etc not just use include();


    Chilimagik.net // Reviews, Band Biographies, News, Pics + Loads More!!
    [Thybag.co.uk - Vive la revolutione]

  8. #8
    Join Date
    Aug 2005
    Location
    Spain
    Posts
    1,367
    Tokens
    0

    Latest Awards:

    Default

    Lol i tried it and it doesn't show the message anywhere

  9. #9
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    I agree with Splintor on this one.

    It doesn't look as if it's going to work.

    I tested it on my tryout site and nothing happened except some weird error "/

    - Dan

  10. #10
    DJ=Ice Guest

    Default

    OK, one, I'm not stupid I have thought this over. IT OVERWRITES THE MESSAGE. THATS WHAT FOPEN WITH THE W FUNCTION DOES! Jeez, splintercell all u do is complain about everything and everyone except ya self.

Page 1 of 6 12345 ... LastLast

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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