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 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jun 2006
    Posts
    125
    Tokens
    0

    Default Drugs replace your addtag.php

    PHP Code:
    <?php

    // This gets the information from the form
    $name $_POST['name'];
    $website $_POST['website'];
    $message $_POST['message'];

    // This takes the smiley code in the message and turns it into a smiley
    $code = array(
        
    '/:\)/',
        
    '/:P/',
        
    '/:D/'
    );

    $image = array(
        
    '<img src="smileys/smile.gif">',
        
    '<img src="smileys/razz.gif">',
        
    '<img src="smileys/biggrin.gif">'
    );
    $formatted preg_replace($code$image$message);

    if(empty(
    $name) OR empty($website) OR empty($message))
    {
    echo 
    "Please fill it out the name,website or message field.";
    }
    else
    {
    // Set up how it's going to be displayed.
    $tag = ("<font size=\"2\" face=\"Arial\">
    <a href=\"htmlspecialchars(
    $website);\" target=\"_blank\">htmlspecialchars($name)</a>: htmlspecialchars($formatted);
    </font><br>"
    ); 

    // Gather the data currently in the file
    $read fopen("content.txt""r");
    $contents fread($readfilesize('content.txt'));
    fclose($read);

    // Open the file and write the tag to it
    $write fopen("content.txt""w");
    fwrite($write"$tag $contents");
    fclose($write);
    }

    // Refresh!
    print "<meta http-equiv=\"refresh\" content=\"0;shoutbox.php\">";

    ?>
    After replacing your addtag.php with the above code, Clear up everything which is in content.txt and let me know.

    Please remove any refresh html codes which I told you before because the refresh code is intergated in the above code.
    Last edited by Muhammad Haris; 08-08-2006 at 09:54 PM.
    All sites sold at the moment.

  2. #2
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Lol the title looks wrong, it looks like it is saying If you take drugs it will replace the addtag.php

  3. #3
    Join Date
    Jun 2006
    Posts
    125
    Tokens
    0

    Default

    Quote Originally Posted by Drugs View Post
    Lol the title looks wrong, it looks like it is saying If you take drugs it will replace the addtag.php
    Nevermind the title, When you are done. Let me know of any bugs!
    All sites sold at the moment.

  4. #4
    Join Date
    Sep 2005
    Posts
    1,604
    Tokens
    0

    Latest Awards:

    Default

    Lmao. Ryan shut up lol the boy is trying to help you

  5. #5
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Alright i done it but i thought i would say, you know the refresh thing, the bit where you put 15 is meant to be 0 because thats saying, how many seconds till when you have submitted how many seconds till it takes you back to the main page.

    Edit: Nah, broke.

    Submit something.
    Last edited by Drugs; 08-08-2006 at 09:53 PM.

  6. #6
    Join Date
    Jun 2006
    Posts
    125
    Tokens
    0

    Default

    Quote Originally Posted by Drugs View Post
    Alright i done it but i thought i would say, you know the refresh thing, the bit where you put 15 is meant to be 0 because thats saying, how many seconds till when you have submitted how many seconds till it takes you back to the main page.

    Edit: Nah, broke.

    Submit something.
    Okay, Please link me. I will check any errors and fix them.

    You can change the 15 to 0
    All sites sold at the moment.

  7. #7
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Yeah i changed the 15 to 0 and that works okay, the 'you forgot to fill something in' changes in 0 seconds too, but it doesn't post it * Which is good *

    But when you type something out for real it breaks.

    http://www.pixelresources.co.uk/shoutbox/shoutbox.php

    Edit: I see whats happened, you put in the html disable thing in the display bit, also bear in mind i do not use the $website bit only $name and $message
    Last edited by Drugs; 08-08-2006 at 09:57 PM.

  8. #8
    Join Date
    Jun 2006
    Posts
    125
    Tokens
    0

    Default

    Fixing it. Patience!
    All sites sold at the moment.

  9. #9
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Alrightey, you will get something in return for this, its just you wont find out till my site is up ;P

  10. #10
    Join Date
    Aug 2006
    Posts
    282
    Tokens
    0

    Default

    Alrightey, you will get something in return for this, its just you wont find out till my site is up ;P

    Correctable (Forum Moderator) - Please do no double post, simply edit your previous one.
    Last edited by lMattz; 09-08-2006 at 08:16 AM.

Page 1 of 2 12 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
  •