Results 1 to 6 of 6
  1. #1
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default Get the PP GD working on Pycan?

    Hello,

    None of the images that use GD are showing, yet GD is installed, im hosted with Pycan.co.uk

    http://www.habbolab.co.uk/phpinfo.php

    :|

    So, how could I get it working?

    BTW: ScottDiamond please do not post as I know your post will be unessary saying I could fix it, but I cant as I truly suck at PHP :|

    ;; Tom
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

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

    Latest Awards:

    Default

    The GD Extension isn't the problem, it was the code.

    PHP Code:
    <? include("../includes/config.php"); ?>
    <?php

    if($_GET['image'] == "create") {
    header("Content-Type: image/gif");


    $im imagecreatefrompng("images/spotlight.PNG");

    // Get habbo name

    $loll mysql_fetch_array(mysql_query("SELECT * FROM spotlight"));
    $name $loll[habbo];
    $name2 urldecode($name);
    $name ucfirst($name);

    // We have to get the habbo's image first! :)

    $thumbWidth "60";
    $thumbHeight "120";
    $url "http://www.habbohotel.co.uk/habbo-imaging/collagepr?name_2_txt=0&name_2_y=-117&name_2_x=-491&h_2_dir=1&h_2_name=0&h_2_frame=0&h_2_gesture=0&h_2_action=0&h_2_y=0&h_2_x=0&name_1_txt=No%20Such%20User!&name_1_y=-597&name_1_x=-471&stampY=-1048&stampX=-1019&h_1_dir=4&h_1_name="$name2 ."&h_1_frame=0&h_1_gesture=sml&h_1_action=std&h_1_y=1&h_1_x=0&overlay=0&overlayY=-95&overlayX=-39&logoY=-300&logoX=-300&bkg=0&bkgY=-95&bkgX=-38&bkgColor=ffffff&picH=320&picW=61&quality5&img-format=png&xml-template=imageCreator_1_name";
    $srcImg imagecreatefrompng($url);
    $origWidth imagesx($srcImg); 
    $origHeight imagesy($srcImg);  
    $thumbImg imagecreate($thumbWidth$thumbHeight);
    imagecopyresized($thumbImg$srcImg0000$thumbWidth$thumbHeightimagesx($thumbImg), imagesy($thumbImg));
    $ImgWhite imagecolorallocate($thumbImg255255255);
    imagefill($thumbImg00$ImgWhite);
    imagecolortransparent($thumbImg$ImgWhite);  
                            
    $habbo2 imagecopy($im$thumbImg28195850100);
    // We have placed their habbo on the spotlight o;

    $font "Volter-Bold (Goldfish).ttf"// This font should be included in the folder, SOZ if i forgot to add xox.
    $size "6.5";
    $black imagecolorallocate($im000);
    $text $name;
        
    $img_w imagesx($im);
        
    $img_h imagesy($im);

    imagettftext($im$size0, ($img_w 2)-(strlen($name)*imagefontwidth($font) /2), 130$black$font$name);


    imagegif($im);
    imagedestroy($im);

    die();
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Spotlight</title>
    <style type="text/css">
    <!--
    body {
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 10px;
    }
    -->
    </style>
    </head>

    <body>
    <table width="23%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="63%" height="87" align="left" valign="top">We're taking sneaky photos of random Habbos and making them famous by placing them right here on the <? echo(""$site[sitename] .""); ?> homepage.<br />
          <br />
        So, watch this space for <strong>your face</strong> as you could be next! </td>
        <td width="37%" align="left" valign="top"><img src="spotlight.php?image=create" width="105" height="143" /></td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>
    Replace the spotlight.php file with that and do an iframe to the file.

    OR if you want to do a PHP include, in YOUR websites root dir. make a file called spotlight.php and inside it put:

    PHP Code:
    <? include("powerpanel/includes/config.php"); ?>
    <?php

    if($_GET['image'] == "create") {
    header("Content-Type: image/gif");


    $im imagecreatefrompng("powerpanel/frontend/images/spotlight.PNG");

    // Get habbo name

    $loll mysql_fetch_array(mysql_query("SELECT * FROM spotlight"));
    $name $loll[habbo];
    $name2 urldecode($name);
    $name ucfirst($name);

    // We have to get the habbo's image first! :)

    $thumbWidth "60";
    $thumbHeight "120";
    $url "http://www.habbohotel.co.uk/habbo-imaging/collagepr?name_2_txt=0&name_2_y=-117&name_2_x=-491&h_2_dir=1&h_2_name=0&h_2_frame=0&h_2_gesture=0&h_2_action=0&h_2_y=0&h_2_x=0&name_1_txt=No%20Such%20User!&name_1_y=-597&name_1_x=-471&stampY=-1048&stampX=-1019&h_1_dir=4&h_1_name="$name2 ."&h_1_frame=0&h_1_gesture=sml&h_1_action=std&h_1_y=1&h_1_x=0&overlay=0&overlayY=-95&overlayX=-39&logoY=-300&logoX=-300&bkg=0&bkgY=-95&bkgX=-38&bkgColor=ffffff&picH=320&picW=61&quality5&img-format=png&xml-template=imageCreator_1_name";
    $srcImg imagecreatefrompng($url);
    $origWidth imagesx($srcImg); 
    $origHeight imagesy($srcImg);  
    $thumbImg imagecreate($thumbWidth$thumbHeight);
    imagecopyresized($thumbImg$srcImg0000$thumbWidth$thumbHeightimagesx($thumbImg), imagesy($thumbImg));
    $ImgWhite imagecolorallocate($thumbImg255255255);
    imagefill($thumbImg00$ImgWhite);
    imagecolortransparent($thumbImg$ImgWhite);  
                            
    $habbo2 imagecopy($im$thumbImg28195850100);
    // We have placed their habbo on the spotlight o;

    $font "powerpanel/frontend/Volter-Bold (Goldfish).ttf"// This font should be included in the folder, SOZ if i forgot to add xox.
    $size "6.5";
    $black imagecolorallocate($im000);
    $text $name;
        
    $img_w imagesx($im);
        
    $img_h imagesy($im);

    imagettftext($im$size0, ($img_w 2)-(strlen($name)*imagefontwidth($font) /2), 130$black$font$name);


    imagegif($im);
    imagedestroy($im);

    die();
    }
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Spotlight</title>
    <style type="text/css">
    <!--
    body {
            font-family: Verdana, Arial, Helvetica, sans-serif;
            font-size: 10px;
    }
    -->
    </style>
    </head>

    <body>
    <table width="23%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="63%" height="87" align="left" valign="top">We're taking sneaky photos of random Habbos and making them famous by placing them right here on the <? echo(""$site[sitename] .""); ?> homepage.<br />
          <br />
        So, watch this space for <strong>your face</strong> as you could be next! </td>
        <td width="37%" align="left" valign="top"><img src="spotlight.php?image=create" width="105" height="143" /></td>
      </tr>
      <tr>
        <td colspan="2">&nbsp;</td>
      </tr>
    </table>
    </body>
    </html>

  3. #3
    Join Date
    May 2005
    Location
    /etc/passwd
    Posts
    19,110
    Tokens
    1,139

    Latest Awards:

    Default

    Still doesn't work

    http://www.habbolab.co.uk/staff/frontend/spotlight.php

    Also the same with that Avatar code someone gave me a thread or few below:

    http://www.habbolab.co.uk/staff/fron...how_avatar.php
    Last edited by Recursion; 16-06-2007 at 04:25 PM.
    Quote Originally Posted by Chippiewill View Post
    e-rebel forum moderator
    :8

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

    Latest Awards:

    Default

    Then I can't see the error. I'm not very good at GD, so I'm probably not the best person to give help

  5. #5
    Join Date
    Jan 2007
    Posts
    825
    Tokens
    0

    Default

    It wont even work on my own apache internal server on my laptop :S
    That post was really sensible!

  6. #6
    Join Date
    Jan 2007
    Location
    Canada eh?
    Posts
    766
    Tokens
    75

    Default

    Oh, and ScottDiamond can't post. He's banned right now

Posting Permissions

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