vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   [HELP] Forum Intergreated User Widget (https://vborg.vbsupport.ru/showthread.php?t=154333)

Pc 1203 08-05-2007 12:13 AM

[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

Dismounted 08-05-2007 05:34 AM

Well, if you read those errors, you'd know.

Pc 1203 08-05-2007 03:57 PM

Yes, I actually fixed it, I just forgot to post.

- Pc1203


All times are GMT. The time now is 07:36 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01121 seconds
  • Memory Usage 1,761KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete