View Single Post
  #1  
Old 08-05-2007, 12:13 AM
Pc 1203 Pc 1203 is offline
 
Join Date: May 2007
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [HELP] Forum Intergreated User Widget

Hi All,
Here is my current code:
PHP Code:
<?php
header
("Content-type: image/png");
$username "Pc1203";
$server 'Mammoth/Frozen';
$age '236';
$membership 'Yes';
$item 'Party Hat!';
$im     imagecreatefrompng("blue_base.png");
$orange imagecolorallocate($im22021060);
$pxpk     = (imagesx($im) - 4.0 strlen($string)) / 3.64;
$px     = (imagesx($im) - 7.5 strlen($string)) / 364.4;
$pxage     = (imagesx($im) - 7.5 strlen($string)) / 24.5;
$pxmem     = (imagesx($im) - 7.5 strlen($string)) / 2.0;
$pxitem     = (imagesx($im) - 7.5 strlen($string)) / 2.4;
imagestring($im25$px5.4443$username$orange);
imagestring($im25$px22.475$server$orange);
imagestring($im25$pxage39757.5$age$orange);
imagestring($im25$pxmem557.77$membership$orange);
imagestring($im25$pxitem7757.5$item$orange);
imagepng($im);
imagedestroy($im);
?>
(I Changed Some Of The Varibles -- So no one copies my work)


Everything works with that code. Now I want it to get my custom profile fields (hint-hint: thats where most of my support questions) to display in the $username, $server, $membership, $item, and $age. So I have ti include global.php, right? Well, here is the code with the include:

PHP Code:
<?php

chdir
('/home/penguink/public_html/forums');
require_once(
'/home/penguink/public_html/forums/global.php');

header("Content-type: image/png");
$username "Pc1203";
$server 'Mammoth/Frozen';
$age '236';
$membership 'Yes';
$item 'Party Hat!';
$im     imagecreatefrompng("blue_base.png");
$orange imagecolorallocate($im22021060);
$pxpk     = (imagesx($im) - 4.0 strlen($string)) / 3.64;
$px     = (imagesx($im) - 7.5 strlen($string)) / 364.4;
$pxage     = (imagesx($im) - 7.5 strlen($string)) / 24.5;
$pxmem     = (imagesx($im) - 7.5 strlen($string)) / 2.0;
$pxitem     = (imagesx($im) - 7.5 strlen($string)) / 2.4;
imagestring($im25$px5.4443$username$orange);
imagestring($im25$px22.475$server$orange);
imagestring($im25$pxage39757.5$age$orange);
imagestring($im25$pxmem557.77$membership$orange);
imagestring($im25$pxitem7757.5$item$orange);
imagepng($im);
imagedestroy($im);
?>
And I get this error(s):

Code:
<br /><strong>Warning</strong>: imagecreatefrompng(blue_base.png) [<a href='function.imagecreatefrompng'>function.imagecreatefrompng</a>]: failed to open stream: No such file or directory in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>13</strong><br /><br /><strong>Warning</strong>: imagecolorallocate(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>14</strong><br /><br /><strong>Warning</strong>: imagecolorallocate(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>15</strong><br /><br /><strong>Warning</strong>: imagesx(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>16</strong><br /><br /><strong>Warning</strong>: imagesx(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>17</strong><br /><br /><strong>Warning</strong>: imagesx(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>18</strong><br /><br /><strong>Warning</strong>: imagesx(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>19</strong><br /><br /><strong>Warning</strong>: imagesx(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>20</strong><br /><br /><strong>Warning</strong>: imagestring(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>21</strong><br /><br /><strong>Warning</strong>: imagestring(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>22</strong><br /><br /><strong>Warning</strong>: imagestring(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>23</strong><br /><br /><strong>Warning</strong>: imagestring(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>24</strong><br /><br /><strong>Warning</strong>: imagestring(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>25</strong><br /><br /><strong>Warning</strong>: imagepng(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>27</strong><br /><br /><strong>Warning</strong>: imagedestroy(): supplied argument is not a valid Image resource in <strong>/home/penguink/public_html/dev/profilesys/image.php</strong> on line <strong>28</strong><br />
Any help?

- Pc1203
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01235 seconds
  • Memory Usage 1,844KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete