signature.php

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   signature.php
AlBaloushi
CZ Newbie
AlBaloushi has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 04, 2004
0.00 posts per day
Posts: 8
Points: 532
   
i am trying that also since 4 days but cant get the pic it always shows me that red X and i have GD installed in my web server

GD Library Information
GD Version bundled (2.0.23 compatible)
FreeType Support Yes
T1Lib Support No
GIF Read Support Yes
GIF Create Support No
JPG Support Yes
PNG Support Yes
WBMP Support Yes
XBM Support Yes

and i am useing phpBB 2.0.5

<?php

/**********************************************************************/
/* phpBB2 Dynamic Statistics Signature                               */
/* ============================================ */
/*                                                                      */
/* by thainuke / [ Register or login to view links on this board. ]                            */
/* http://www.thainuke.net :: PHP-Nuke Thailand               */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/*                                                                      */
/************************************************************************/

// FI Subsilver
require_once("mainfile.php");
global $prefix, $startdate, $db;

list($count) = $db->sql_fetchrow($db->sql_query("SELECT count FROM ".$prefix."_counter WHERE type='total' AND var='hits'"));
list($sitename) = $db->sql_fetchrow($db->sql_query("SELECT sitename FROM ".$prefix."_config"));
list($overall) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_users"));
list($lastuser) = $db->sql_fetchrow($db->sql_query("SELECT username FROM ".$prefix."_users order by user_id DESC limit 0,1"));
list($member_online_num) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_session WHERE guest = 0"));
list($guest_online_num) = $db->sql_fetchrow($db->sql_query("SELECT COUNT(*) FROM ".$prefix."_session WHERE guest = 1"));
$who_online_num = $guest_online_num + $member_online_num;
$image = "signature.png";
$im = imagecreatefrompng($image);
$tc = ImageColorAllocate ($im, 5, 50, 250);  // Blue
$now = date("M d,Y H:i:s");
$red  = ImageColorAllocate ($im, 255, 0, 0);
$j = strlen($lastuser);
$space = $j*6+240;
ImageString($im, 3, 140, 5, "$sitename Live! $now", $tc);
ImageString($im, 2, 140, 17, "We received $count page views since $startdate.", $tc);
ImageString($im, 2, 140, 30, "Total Members: $overall", $tc);
ImageString($im, 2, $space, 30, "Latest: $lastuser", $red);
ImageString($im, 2, 140, 40, "Online Now($who_online_num): $member_online_num members and $guest_online_num visitors.", $tc);
header("Content-Type: image/png");
Imagepng($im,'',100);
ImageDestroy ($im);

?>


and this is the code that i am useing i have tried many other code that ppl posted before but most of them giving me some erros in some lines.

and if u have a better one then this and working also then plz can u post it over here so that i can also use it thanks.


Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
Is the image named signature.png, is it in your root path?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   re: signature.php
AlBaloushi
CZ Newbie
AlBaloushi has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 04, 2004
0.00 posts per day
Posts: 8
Points: 532
   
yes it is in my root path and also i uploaded that signature.png in my images folder



Back to top Reply with quote
#4   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
the signature.png goes in the same spot that the signature.php is unless you change this line in the signature.php:


$image = "signature.png";




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   re: signature.php
AlBaloushi
CZ Newbie
AlBaloushi has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 04, 2004
0.00 posts per day
Posts: 8
Points: 532
   
but telli i have not changed anything and i think my GD is also ok so can u tell me what is the problem or u do one thing is that give me the code and also attach a black blank pic of signature.png so i will save it and try to upload ur one.



Back to top Reply with quote
#6   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
All you have to do is put the signature.png in the same folder with the signature.php.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: signature.php
AlBaloushi
CZ Newbie
AlBaloushi has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 04, 2004
0.00 posts per day
Posts: 8
Points: 532
   
those both files r in the same folder but still it doent work, is there any other way?



Back to top Reply with quote
#8   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
ok leave the URL (type it here so i can see it) for the signature.php and the URL for the signature.png.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#9   re: signature.php
AlBaloushi
CZ Newbie
AlBaloushi has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 04, 2004
0.00 posts per day
Posts: 8
Points: 532
   
ok url for the [ Register or login to view links on this board.]

and url for [ Register or login to view links on this board.]

here r the urls



Back to top Reply with quote
#10   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,440
   
Your GD extension is not working check with your host. Here is your signature.php
[ Register or login to view links on this board. ]




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum