View Full Version : Signature Stats v3.04
DWard
05-20-2004, 10:00 PM
VERSION 3.04
[05/09/2004]
-----------------------------------------------
http://everythingvb.com/licenses/evb_hl_88x31.gif (http://everythingvb.com/licenses/fa-ld-lt/1.0/)
This Hack is released under an EverythingvB.com FullAttribution-LimitedDerivs-LimitedTranslation License (http:///licenses/fa-ld-lt/1.0/)
-----------------------------------------------
This hack allows you to display your forum statistics in an image,whichyou can use as your signature in most forums (like mine).
If you have any trouble, please post here or in my forum for a good response. Please Click INSTALL, otherwise if an important fix becomes available, you will not be notified.
Now with truetype font support and line breaks. Fixed online userscode(was resetting 'most users online'). New easy support for GD2 andbelow.
Attached pixel font for use in your signatures, must be in all capitals, at size 6 to work appropriately.
New! Attached signature colourgenerator application. Useful to work out the colour scheme of yoursignature. Displays the RGB code for picked colour, and also allows forHEX to RGB conversion.
Popular modifications:
Show newest user in Signature Stats
https://vborg.vbsupport.ru/showpost.php?p=544875&postcount=245
(https://vborg.vbsupport.ru/showpost.php?p=544875&postcount=245)
Amount of games in v3Arcade in signature
https://vborg.vbsupport.ru/showpost.php?p=539902&postcount=225
If you are upgrading please carry out steps two to four of the instructions.
Acido
05-21-2004, 12:05 PM
VERSION 1.01
[21/05/2004]
This hack allows you to display your forum statistics in an image, which you can use as your signature in most forums (like mine).
If you have any trouble, please post here or in my forum for a good response. Please Click INSTALL, otherwise if an important fix becomes available, you will not be notified.
Sorry the files weren't zipped. I hope you like it :)
Very cool.
Thanx ;)
msimplay
05-21-2004, 12:50 PM
great hack i was waiting for this for a long time
and its also much better in placement then the old hack
i'm gonna add it to a crontab now :D
Natch
05-21-2004, 01:45 PM
Great work D :)
http://www.mobileforces.org/sig/signature.jpg
Very, very happy with this !
DWard
05-21-2004, 04:28 PM
great hack i was waiting for this for a long time
and its also much better in placement then the old hack
i'm gonna add it to a crontab now :D
How do I add a crontab, because I have never done it before.
Aurous
05-21-2004, 04:43 PM
great work .. will try installing it tonite.
thanks
Aurous
Aurous
05-21-2004, 05:17 PM
Not working :( guess its coz I dont have GD 2 installed.
According to php info its 1.6.2 or higher.
BTW, this hack is an exact copy of the previous hack with 4 new lines:
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'sig_stats');
require_once('./global.php');
You should give credit to the original hack instead of stealing the whole hack.
Also, when I tried running signature.php, I saw "X" image instead of the signature image. signature.php is in the main /forums/ folder where as sig.jpg was in /forums/signature/ and I also made the necessary database changes in signature.php. Guess its something to do with GD 2.
Mijae
05-21-2004, 05:18 PM
great work .. will try installing it tonite.
thanks
Aurous
Can someone tell me how to set up a cron job using vB's admincp? I dont really want to add fake guests to my who's online :P Altho, probably no one will notice :D
Oblivion Knight
05-21-2004, 05:46 PM
How do I add line breaks to the output?
<br /> doesn't work, and nor does \n :(
msimplay
05-21-2004, 06:13 PM
Can someone tell me how to set up a cron job using vB's admincp? I dont really want to add fake guests to my who's online :P Altho, probably no one will notice :D i used cpanel theres a cronjob script there this is the command i used
GET http://www.yourdomain.com/forums/signature.php
DWard
05-21-2004, 08:48 PM
How do I add line breaks to the output?
<br /> doesn't work, and nor does \n :(
I will release the <br> script tomorrow, doesnt require much modding :)
DWard
05-21-2004, 08:52 PM
Not working :( guess its coz I dont have GD 2 installed.
According to php info its 1.6.2 or higher.
BTW, this hack is an exact copy of the previous hack with 4 new lines:
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'sig_stats');
require_once('./global.php');
You should give credit to the original hack instead of stealing the whole hack.
Also, when I tried running signature.php, I saw "X" image instead of the signature image. signature.php is in the main /forums/ folder where as sig.jpg was in /forums/signature/ and I also made the necessary database changes in signature.php. Guess its something to do with GD 2.
No if you look over the script, the original doesnt have an online users code.... also it counts posts and threads which have been deleted, which vb doesnt show in its forum stats usually.
I have put credits on the signature.php file if you look :)
iggy123
05-21-2004, 09:43 PM
I was really looking forward to this as I used to have the old version running on 2.3
Now when I try to run it I get the following error:
Database error in vBulletin 3.0.1:
Invalid SQL:
SELECT forum.forumid, lastpost, lastposter, lastthread, lastthreadid, lasticonid, threadcount, replycount
FROM forum AS forum
mysql error: Unknown column 'lastthreadid' in 'field list'
mysql error number: 1054
Date: Saturday 22nd of May 2004 12:42:25 AM
Script: http://www.clanantivirus.com/forums/signature.php
DWard
05-22-2004, 05:36 AM
I was really looking forward to this as I used to have the old version running on 2.3
Now when I try to run it I get the following error:
OK, ill look into that a tad later and get back to you.
gmarik
05-22-2004, 07:35 AM
Does it needs GD or what?
Oblivion Knight
05-22-2004, 08:12 AM
Does it needs GD or what?I think it needs GD2..
alfata
05-22-2004, 09:14 AM
nice hack....
is there a way to change the font face, and if i wanna use it from right to left text direction, how to do???
best regards
Breaker
05-22-2004, 11:20 AM
works fine :D
* Breaker clicks install
BarHopper
05-22-2004, 02:36 PM
This is brilliant, thanks. Is there anyway i can add the info in a line under my sig?
But like sitll apart of it?
Beermonster
05-22-2004, 02:54 PM
Thanks
/me hits install
DWard
05-22-2004, 04:37 PM
nice hack....
is there a way to change the font face, and if i wanna use it from right to left text direction, how to do???
best regards
Not sure about the text alignment, I will add it to the features for the next version. If you installed my other files list hack, you will notice that I release a basic script and develop it based on peoples suggestions :)
DWard
05-22-2004, 04:39 PM
This is brilliant, thanks. Is there anyway i can add the info in a line under my sig?
But like sitll apart of it?
Should be quite easy, I will consider it for the next version.
BTW, Click install ;)
DWard
05-22-2004, 04:40 PM
For all who are concerned about it having GD2+, judging by what has been said, it looks like it does need it, but I will look into it for you all.
accyroy
05-22-2004, 05:46 PM
Working fine here! Cheers :)
http://www.accringtonweb.com/sig/sig.jpg
juanchi
05-22-2004, 06:09 PM
For all who are concerned about it having GD2+, judging by what has been said, it looks like it does need it, but I will look into it for you all.
Well in my case it seems like GD2 is a requirement, could anyone get this to work for older versions? This is the error I'm getting:
Warning: imagecreatetruecolor(): requires GD 2.0 or later in /home/webadmin/site/html/signature.php on line 142
accyroy
05-22-2004, 06:24 PM
Well in my case it seems like GD2 is a requirement, could anyone get this to work for older versions? This is the error I'm getting:
Well you could try replacing imagecreatetruecolor with just imagecreate in the source. I don't have a pre GD2 to test it with but it might work.
Replace:
$img = imagecreatetruecolor($width,$height);
With:
$img = imagecreate($width,$height);
Let me know how it goes....
DWard
05-22-2004, 06:34 PM
UPDATE: TRUE TYPE FONTS IN SIGNATURE
Will be released in next version to be released on or before [26/05/2004]
Rampag33
05-22-2004, 06:50 PM
Install!
Install!
nice job :) I may use it but what I got currently works nicely
webrats
05-22-2004, 07:43 PM
found it nvrmind
http://www.webrats.com/images/shared/signature.jpg (http://forums.webrats.com)
DWard
05-22-2004, 07:46 PM
Take a look in the signature.php file, you'll find it gets it from the session entity in your forum database.
juanchi
05-22-2004, 08:55 PM
Well you could try replacing imagecreatetruecolor with just imagecreate in the source. I don't have a pre GD2 to test it with but it might work.
Replace:
$img = imagecreatetruecolor($width,$height);
With:
$img = imagecreate($width,$height);
Let me know how it goes....
Thanks man!! that was it.
DWard
05-22-2004, 09:03 PM
Thanks man!! that was it.
Just need to run that past the other users having troubles with their GD version
juanchi
05-22-2004, 10:01 PM
Here is my signature without GD 2+.
Nice hack, thanks.
https://vborg.vbsupport.ru/external/2004/05/1.jpg
Oblivion Knight
05-22-2004, 11:06 PM
Any updates with the line break ability?
alfata
05-23-2004, 12:52 AM
guys i want to change font face to tahoma for example!! is there a way to do that? and i want the text direction from the right to left.... is it possible??
alfata
05-23-2004, 12:56 AM
*alfata clicks INSTALL the cool hack.....
:up: :)
DWard
05-23-2004, 07:36 AM
Any updates with the line break ability?
It will be in the next version released on 26-05-2004.
DWard
05-23-2004, 07:38 AM
guys i want to change font face to tahoma for example!! is there a way to do that? and i want the text direction from the right to left.... is it possible??
The font face, as you may have noticed in my signature image is verdana, i'm working on an align script at the moment. The new version with the font face will be released with the lin break utility and hopeflly align by the date mentioned in the previous post.
DWard
05-23-2004, 06:50 PM
As I say, any suggestions for other features would be nice :)
bigreefer
05-23-2004, 09:05 PM
what is with the <br> version of the Script ? :)
Ready ?
hihi ThX
DWard
05-24-2004, 05:10 AM
The next version to be released either today or Wednesday will have:
TrueType font support with font size
Line Break Support
DWard
05-24-2004, 07:48 AM
Version 2.01 available with truetype font support and line breaks!
Hopefully, by 24/04/2004, version 2.02 will be released with text alignment support.
Oblivion Knight
05-24-2004, 09:49 AM
Thank you kindly, I will have a play with it later.. :D
DWard
05-24-2004, 09:52 AM
No worries, I need some feedback if somebody could give me some, of the new version.
bigreefer
05-24-2004, 10:03 AM
Hmm the Online User-Counter counts not correct.
It shows 66 User Online but realy there are only 21 online.
Any Idea ?
Ps. the new verion did not run :(
SaN-DeeP
05-24-2004, 10:37 AM
i get this
Could not select database
When i run
www.yourdomain.com/forums/signature.php
what am i missing.
thnx for hack ;)
Sandy...
DWard
05-24-2004, 12:10 PM
i get this
Could not select database
When i run
www.yourdomain.com/forums/signature.php
what am i missing.
thnx for hack ;)
Sandy...
Yer I think I know why.
DWard
05-24-2004, 12:11 PM
I will get on it in a bit.
DWard
05-24-2004, 12:11 PM
Hmm the Online User-Counter counts not correct.
It shows 66 User Online but realy there are only 21 online.
Any Idea ?
Ps. the new verion did not run :(
Did not run (need some more info!)
I will look into the user count, I know it's slightly out, will take a look later today and release the fixed version.
DWard
05-24-2004, 01:18 PM
i get this
Could not select database
When i run
www.yourdomain.com/forums/signature.php
what am i missing.
thnx for hack ;)
Sandy...
Try the latest version to see if that works. Go pack to the first page, just updated to version 2.02.
Also the online user count is fixed.
DWard
05-24-2004, 04:47 PM
Any feedback?
bigreefer
05-24-2004, 05:53 PM
Sorry,
if i use the first Verion it runs without problems.
If I use the latest version i saw no Picture.
https://vborg.vbsupport.ru/external/2004/06/1.php
The FilePath and SQL login ist 100% the same as in the first Version.
DWard
05-24-2004, 05:54 PM
Are you sure the filepaths are correct and you have CHMOD the files?
DWard
05-24-2004, 05:57 PM
Try selecting the default font option in the code. You need to uncomment one line and comment the one below it.
bigreefer
05-24-2004, 05:58 PM
Yes 100%
The Path the Pictures are ist alwas the Same.
If i upload the Version SIGNATURE STATS V1.01 the Sig runs without Probs.
If i upload the new Version i saw nothing.
SIGNATURE STATS V1.01
//full path to empty signature image (input image)
$vorlagedatei = "/var/www/web1/html/vB/signatur/sig2.jpg";
//full path to signare image with forum data (output image)
$ausgabedatei = "/var/www/web1/html/vB/signatur/sig1.jpg";
SIGNATURE STATS V2.01
//full path to empty signature image (input image)
$vorlagedatei = "/var/www/web1/html/vB/signatur/sig2.jpg";
//full path to signare image with forum data (output image)
$ausgabedatei = "/var/www/web1/html/vB/signatur/sig1.jpg";
Ps. kannst du auch deutsch und hast ICQ ?
DWard
05-24-2004, 06:02 PM
Cant realy speak German, even though I have german family!
Is the database info correct and have u trued the different font option near the bottom of the script?
bigreefer
05-24-2004, 06:04 PM
Try selecting the default font option in the code. You need to uncomment one line and comment the one below it.
k, but no efect :(
DateBase Info 100% correct. Font near the buttom ist switched.
And now ?
The old Script runs :/
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'sig_stats');
// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
// #################### ENTER DATABASE INFORMATION #######################
//DB-Servername
$host = "localhost";
//DB-Username
$user= "web1";
//DB-Password
$password= "*********";
//vbulletin database name
$database="usr_web1_1";
//E-Mail Address where MySQL Error Messages are sent to
$adminemail = "admin@celebritymarkt.de";
// ###################### ENTER IMAGE INFORMATION #########################
//Width of banner image
$width = 300;
//Height of banner image
$height = 60;
//Left text-margin
$left = 13;
//text-margin from top
$top = 70;
//Font Size
$fontsize = 7;
//Line-spacing of text
$zeilenabstand = 15;
//full path to empty signature image (input image)
$vorlagedatei = "/var/www/web1/html/vB/signatur/sig2.jpg";
//full path to signare image with forum data (output image)
$ausgabedatei = "/var/www/web1/html/vB/signatur/sig1.jpg";
//Compression of output image
$komprimierung = 95;
//debug mode
$debug = 0;
// ######################### DO NOT EDIT BELOW ############################
function mysql_query_eval($query, $database) {
$mysql_eval_error="";
$mysql_eval_result = mysql_query($query, $database) or $mysql_eval_error = mysql_error();
if ($mysql_eval_error) {
if ( $debug == 1 ) {
$letter = "An error was encountered during execution of the query:\n\n";
$letter .= $query."\n\n";
$letter .="The query returned with an errorcode of: \n\n$mysql_eval_error\n\n";
$letter .="To turn this email off set debug=0 in signature.php\n\n";
$email_from = "From: ".$adminemail;
$subject="Subject: Signature Error Report";
$subject=trim($subject);
mail( $email, $subject, $letter, $email_from );
} elseif ( $debug == 2 ) {
dieWell( "MySQL error reported!<p>Query: $query<p>Result: $mysql_eval_error<p>Database handle: $database" );
exit;
}
return FALSE;
} else {
return $mysql_eval_result;
}
}
// CONNECTING TO DATABASE
$link = mysql_connect ("$host", "$user", "$password") or die ('I cannot connect to the database.');
mysql_select_db ("$database")or die("Could not select database");
// GETTING FORUM MEMBERS
$querya="SELECT COUNT(*) AS users, MAX(userid) AS max FROM " . TABLE_PREFIX . "user WHERE usergroupid!=4";
$numa = mysql_query_eval($querya,$link);
$numb = mysql_fetch_array($numa);
$numbermembers=number_format($numb['users']);
mysql_free_result($numa);
// GETTING TOTAL MEMBERS ONLINE
$datecut = TIMENOW - $vboptions['cookietimeout'];
$numbervisible = 0;
$numberregistered = 0;
$numberguest = 0;
$forumusers = $DB_site->query("
SELECT
user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible, user.usergroupid,
session.userid, session.inforum, session.lastactivity,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM " . TABLE_PREFIX . "session AS session
LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > $datecut
ORDER BY " . iif($permissions['genericpermissions'] & CANSEEHIDDEN, 'invisible ASC, ') . "username ASC, lastactivity DESC
");
if ($bbuserinfo['userid'])
{
// fakes the user being online for an initial page view of index.php
$bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
$userinfos = array
(
$bbuserinfo['userid'] => array
(
'userid' => $bbuserinfo['userid'],
'username' => $bbuserinfo['username'],
'invisible' => $bbuserinfo['invisible'],
'inforum' => 0,
'lastactivity' => TIMENOW,
'musername' => fetch_musername($bbuserinfo, 'joingroupid')
)
);
$numberregistered = 1;
$numbervisible = 1;
$loggedin = $userinfos["$bbuserinfo[userid]"];
eval('$activeusers = ", ' . fetch_template('forumhome_loggedinuser') . '";');
}
else
{
$userinfos = array();
}
$inforum = array();
while ($loggedin = $DB_site->fetch_array($forumusers))
{
$userid = $loggedin['userid'];
if (!$userid)
{ // Guest
$numberguest++;
$inforum["$loggedin[inforum]"]++;
}
else if (empty($userinfos["$userid"]['lastactivity']) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
{
$userinfos["$userid"] = $loggedin;
$numberregistered++;
if ($userid != $bbuserinfo['userid'])
{
$inforum["$loggedin[inforum]"]++;
}
$loggedin['musername'] = fetch_musername($loggedin);
//if (fetch_online_status($loggedin))
//{
// $numbervisible++;
// eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
//}
}
}
// memory saving
unset($userinfos, $loggedin);
$activeusers = substr($activeusers , 2); // get rid of initial comma
$DB_site->free_result($loggedins);
$totalonline = $numberregistered + $numberguest;
$numberinvisible = $numberregistered - $numbervisible;
// ### MAX LOGGEDIN USERS ################################
$maxusers = unserialize($datastore['maxloggedin']);
if (intval($maxusers['maxonline']) <= $totalonline)
{
$maxusers['maxonline'] = $totalonline;
$maxusers['maxonlinedate'] = TIMENOW;
build_datastore('maxloggedin', serialize($maxusers));
}
$recordusers = $maxusers['maxonline'];
$recorddate = vbdate($vboptions['dateformat'], $maxusers['maxonlinedate'], true);
$recordtime = vbdate($vboptions['timeformat'], $maxusers['maxonlinedate']);
//////////////////////////////////////////////////////////////////////////////////////////////////
// GETTING TOTAL POSTS AND THREADS
include_once('./includes/functions_forumlist.php');
cache_ordered_forums(1, 0, 0);
if (is_array($forumcache))
{
foreach ($forumcache AS $forum)
{
$nthreads += $forum['threadcount'];
$nposts += $forum['replycount'];
$totalthreads = number_format($nthreads);
$totalposts = number_format($nposts);
}
}
// ########################### OUTPUT TEXT ###############################
// Use \n\r to make a line break (only for use with truetype font SO FAR)
// Will be developed to use with default font soon :)
$output = "Members: $numbermembers Threads: $totalthreads Posts: $totalposts Online: $totalonline";
$vorlage = imagecreatefromjpeg("$vorlagedatei");
$img = imagecreate($width,$height);
// ########################## TEXT FORMATTING ############################
// A PNG uses ImageColorAllocate instead of ImageColorClosest like jpeg uses
//background white
$bg_color = imagecolorallocate ($img, 255, 255, 255);
//black text
$text_color = imagecolorallocate ($img, 19, 36, 161);
imagefilledrectangle ($img, 0, 0, $width, $height, $bg_color);
// ######################### DO NOT EDIT BELOW ############################
imagecopy ($img, $vorlage, 0, 0, 0, 0, $width, $height); // copy empty banner
imagecolortransparent($img, $bg_color); // set dummybg transparent
// the distance is in pixels and the font # is 1 through 5
$i = 0;
while($i < count($output)){
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); // LINE1
//imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); // LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
DWard
05-24-2004, 06:27 PM
I really can't tell what's happening, everybody else seems to have no problem. And I cannot tell of any problems with this script, as I personally am not having any problems.
SaN-DeeP
05-24-2004, 07:21 PM
Try the latest version to see if that works. Go pack to the first page, just updated to version 2.02.
Also the online user count is fixed.
alrite i updated info
now i am gettin this error
Fatal error: Call to undefined function: imagettftext() in /home/sandeep/public_html/forums/signature.php on line 247
sorry for bugging you
Sandy...
ranger2kxlt
05-24-2004, 07:22 PM
imagettftext() i get this error any help?
DWard
05-24-2004, 07:29 PM
Uncomment LINE1 and comment LINE2
DWard
05-24-2004, 07:31 PM
I think the reasons for the latest errors seems to be that only the latest versions of PHP will support the imagettftext() function. I have version 4.3.4.
What versions do you have?
ranger2kxlt
05-24-2004, 07:33 PM
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
//imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); //LINE1
imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); //LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?> my code looks all messed up is this right? can you give me the last part correctly...
Thanks
DWard
05-24-2004, 07:33 PM
BTW:: Have you uploaded a font and specified the location as described in the instructions??
DWard
05-24-2004, 07:35 PM
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
//imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); //LINE1
imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); //LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?> my code looks all messed up is this right? can you give me the last part correctly...
Thanks That's fine, thats how mine is...
Try changing that part to this:
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); //LINE1
//imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); //LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?>
ranger2kxlt
05-24-2004, 07:36 PM
PHP Version 4.3.3
No i thought it use a default font...can you upload the vernada.ttf file?
DWard
05-24-2004, 07:37 PM
YER OK THE NEW CODE i GAVE YOU WAS FOR DEFAULT FONT OPTION.
Just change it back to what you gave me to start with and upload the font I am about to attach to the same directory as the file.
ranger2kxlt
05-24-2004, 07:38 PM
I tried your code, same error message....Can you send me the code without line 1 and 2 commented, want to make sure i'm coding it right
DWard
05-24-2004, 07:39 PM
:) OK the verdana.ttf file is in the zip:
DWard
05-24-2004, 07:40 PM
This end is fine:
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
//imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); //LINE1
imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); //LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?>
ranger2kxlt
05-24-2004, 07:42 PM
Fatal error: Call to undefined function: imagettftext() line 259 this is after i uploaded the font file
DWard
05-24-2004, 07:43 PM
Did you change the code back too?
ranger2kxlt
05-24-2004, 07:50 PM
yes used the one in post 72...same error
DWard
05-24-2004, 07:57 PM
OK, you need to discuss the problem with your host...
You need to know if the GD version is 2 or higher (recommended)
And you need to know if the imagettftext() function is allowed.
That's all I can suggest. It works absolutely fine for me and I have exactly the same version as you. It appears as though only two people are experiencing this problem, which makes me believe that it is something to do with your host.
ranger2kxlt
05-24-2004, 08:00 PM
i have GD2 ill check on the imagettftext right now
ranger2kxlt
05-24-2004, 08:02 PM
looks like we dont have imagettftext but i know we have GD2+
DWard
05-24-2004, 08:04 PM
ok imagettftext is required for the truetype font printing. Is the imagestring function allowed?
ranger2kxlt
05-24-2004, 08:05 PM
let me also tell you this...when i uncomment the line 1 and line 2 i get a prase error on line 260 :-/ would that be something?
alfata
05-24-2004, 08:07 PM
same prob here, if i use Line1 the picture apper without forum info, and if i use Line2 picture not apper....
any clue?!
ranger2kxlt
05-24-2004, 08:07 PM
I cant tell if imagestring is allowed.
DWard
05-24-2004, 08:10 PM
OK, because that is required if you cant use imagettftext. I will be back here 2moro. If you urgently need help, e-mail me (dan@collegepranks.co.uk).
alfata
05-24-2004, 08:10 PM
about line1 it apper when i changed //text-margin from top &&& $top = from 70 to 10 it apper :D
but i want to use line2 for the truetype font!!
thanks
DWard
05-24-2004, 08:14 PM
Yer sorry, the margins are set up as they are on my signature!!
You need to be able to use imagettftext function, which has the ability to use a font on your server, however I havnt heard of it too muc, saw it on php.net.
Try uploading the verdana font I attached on the last page in the same dir as the signature.php file and see if it works, if not you will need to consult your host.
ranger2kxlt
05-24-2004, 08:14 PM
I will check here again tommorow as well...its not a big deal, nothing to really worry about, just looked like a kewl thing to have :-D Good work :-D
DWard
05-24-2004, 08:15 PM
OK, well keep looking and try out the new versions to see how it goes, cheers for your custom tho!
alfata
05-24-2004, 08:19 PM
DWard,
i have the same here PHP Version 4.3.4 but nothing apper if i use line2 ??!
alfata
05-25-2004, 12:33 AM
yep thats it folks, everyone had the same prob he must check on his site if GD loaded or not by this code:
<?php
$loaded = ( bool ) false;
$lib = 'GD';
$data = get_loaded_extensions();
foreach ( $data as $val )
{
if ( stristr( $val, $lib ) ) {
$loaded = true;
}
echo $val . '<br /><br />';
}
if ( $loaded ) {
echo '<strong>' . $lib . ' is loaded';
} else {
echo '<strong>' . $lib . ' is not loaded loaded';
}
?>
other ways if GD loaded so the imagettftext is not allowed at your webhost, so talk to him :devious:
l8er :ninja:
DWard
05-25-2004, 04:48 AM
I could understand that web hosts may disallow the imagettftext function as it may take up quite a bit of server resources if used alot.
I will look a bit later into what could be done. I'm sure there's a way round it.
Odoin
05-25-2004, 09:59 PM
This might have been posted before but i did not look through all the posts....
If you do not care about the extra load on your server you can make a .htaccess file with this code:
IndexIgnore *
<Limit GET POST >
order allow,deny
allow from all
</Limit>
RewriteEngine on
RewriteRule signature.jpg /forum/signature.php [T=application/x-httpd-cgi]
Then you would link to signature.jpg from your root folder of your domain ane apache would run the PHP file to get the updated signature.
Cheers :)
DWard
05-26-2004, 06:59 AM
Thats quite cool actually.
DWard
05-26-2004, 04:01 PM
New version out (fixed online users code [was resetting 'most users ever online'])
blakkboy
05-26-2004, 10:11 PM
Warning: imagecreatefromjpeg(/public_html/images/sig.jpg): failed to open stream: No such file or directory in /home/rkqxhnvj/public_html/forums/signature.php on line 208
Warning: imagecopy(): supplied argument is not a valid Image resource in /home/rkqxhnvj/public_html/forums/signature.php on line 225
Warning: imagettftext(): Could not find/open font in /home/rkqxhnvj/public_html/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/rkqxhnvj/public_html/forums/signature.php:208) in /home/rkqxhnvj/public_html/forums/signature.php on line 242
PNG IHDRÔw#ÛPLTEÿÿÿ$¡¼tRNS@æØfIDATxí Á  ÷Om7 'äSP£QIEND®B`
Warning: imagejpeg(): Unable to open '/public_html/images/signature.jpg' for writing in /home/rkqxhnvj/public_html/forums/signature.php on line 244
I get those errors....Can someone help????
DWard
05-27-2004, 05:15 AM
Warning: imagecreatefromjpeg(/public_html/images/sig.jpg): failed to open stream: No such file or directory in /home/rkqxhnvj/public_html/forums/signature.php on line 208
Warning: imagecopy(): supplied argument is not a valid Image resource in /home/rkqxhnvj/public_html/forums/signature.php on line 225
Warning: imagettftext(): Could not find/open font in /home/rkqxhnvj/public_html/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/rkqxhnvj/public_html/forums/signature.php:208) in /home/rkqxhnvj/public_html/forums/signature.php on line 242
?PNG IHDR?w?#?PLTE???$????tRNS@??fIDATx??? ? ?Om7 ?'?SP?QIEND?B`?
Warning: imagejpeg(): Unable to open '/public_html/images/signature.jpg' for writing in /home/rkqxhnvj/public_html/forums/signature.php on line 244
I get those errors....Can someone help????
Have you uploaded both pictures and entered the server path correctly? And are both images CHMOD to 777?
Also, do you have GD installed? I think you may need GD2.
Natch
05-27-2004, 02:10 PM
Just FYI :) You can solve your vertical issues by investigating the following code, then looking @ this sig :)
$output[] = "Threads: $totalthreads";
$output[] = " Posts: $totalposts";and imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output[$i]); // LINE2
https://vborg.vbsupport.ru/external/2004/05/1.jpg
aka: put your $output in an array - then each line by default is placed on the next line down (the second edit just causes the current line to be output, rather than the whole array) ... then just fiddle with your images size and alignment values ($left and $top) to get it how you want it!
:D great work again on the TTF font integrating!
DWard
05-27-2004, 07:41 PM
Just FYI :) You can solve your vertical issues by investigating the following code, then looking @ this sig :)
$output[] = "Threads: $totalthreads";
$output[] = " Posts: $totalposts";and imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output[$i]); // LINE2
http://www.mobileforces.org/sig.jpg
aka: put your $output in an array - then each line by default is placed on the next line down (the second edit just causes the current line to be output, rather than the whole array) ... then just fiddle with your images size and alignment values ($left and $top) to get it how you want it!
:D great work again on the TTF font integrating!
Wicked, that will be in the next version, have you encountered any problems at all?
Just concerned about wether or not there had been a mistake in the code on my behalf or if it's just what people have installed on their server.
Natch
05-28-2004, 11:33 AM
No mate - it's just that the code you have has a while($i<count($output)){ ... bit which indicated that it probably was originally coded to work with an array, where each array entry is one line in your multi-line output.
Anyd it should be relatively trivial to have a switch to go from left to right aligned - I did something similar for a automatic label-making website... {look at the (($i * $zeilenabstand) - $zeilenabstand + $top) bit (which calculates the top position of each line in the array for the text), and apply similar math to the $left value ...}
Acido
05-29-2004, 03:05 AM
I dont understan why the quality of the image created in my server is so poor :(
Check the attachments please.
I use compress output with a value of 95, and i'm using GD 2+
Can you give some tip?
Natch
05-29-2004, 03:41 AM
Yeah - there is a line that says imagecreate() - this should be imagecreatetruecolor() :)
Acido
05-29-2004, 03:54 AM
Yeah - there is a line that says imagecreate() - this should be imagecreatetruecolor() :)
Fixed.
Thanx Natch :)
DWard
05-29-2004, 06:05 AM
Fixed.
Thanx Natch :)
Yer that funcion was changed because of a few problems earlier. I will make it optional in the next version.
Intex
05-29-2004, 07:18 AM
Works perfectly on 3.0.1.
* Intex clicks INSTALL.
Aurous
05-30-2004, 01:27 AM
When the hack is run by vB cron (scheduled tasks), Number of Threads and Number of Posts are always blank, but total members and total online users always show correctly. If I run the cron job manually in scheduled tasks, I get correct stats.
I am really confused! Is it something to do with the query that counts the number of threads/posts??
msimplay
05-30-2004, 01:52 AM
use a regular cron job not vbcron
Aurous
05-30-2004, 07:13 AM
use a regular cron job not vbcron
I would like to keep all my vB related cron jobs at one place. There should be a way to fix this in vB.
Maybe the query needs to be changed a bit.
Any suggestion Dward?
DWard
05-30-2004, 02:57 PM
No, I'm not sure how vB does crons, it never worked for me either. My host control panel is Plesk, which does a fine job with crontabs.
Natch
05-31-2004, 07:35 AM
My host doesn't have GET or HTTPGET installed - is there any system in basic *nix that can allow this to run as CRON ?
msimplay
05-31-2004, 08:08 AM
My host doesn't have GET or HTTPGET installed - is there any system in basic *nix that can allow this to run as CRON ?
nix systems usually have cron built in
might be able to be done if u have shh control of the machine
if not you could always get a third party cron system
remote hosted one i mean
Natch
05-31-2004, 08:55 AM
What I'm saying is that I have cron (all nix have it) but the command GET nor HTTPGET are installed on this server ...
Oblivion Knight
05-31-2004, 10:11 AM
This might be a little scrappy, and it outputs a load of crap - but it seems to work..
I set a vBCron to run ./signature.php every 25 minutes, and sure enough it works. I don't know if it would log it correctly, since I turned it off - and when you click "Run Now" it outputs a load of nonsense, but it does seem to update signature.jpg :)
msimplay
05-31-2004, 10:30 AM
What I'm saying is that I have cron (all nix have it) but the command GET nor HTTPGET are installed on this server ...
i think you use the system path to the file
/home/username/public_html/forums/file.php
Oblivion Knight
05-31-2004, 01:46 PM
Well I was wrong.. :(
My method doesn't work correctly - the Thread and Post numbers aren't displayed.
https://vborg.vbsupport.ru/
ernestdefoe
05-31-2004, 09:08 PM
Okay I get this error. GD2+ installed, and have the 2 images CHMOD'ed to 777.
Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/wmeadmin/public_html/vb/signature.php on line 208
Can someone please help me?
probably it was somewhere around here in thread already, but... how make it work with ONLINE.PHP?! now i see only:
Guest Unknown Location /forum/signature.php xxx.xxx.xxx.155 lwp-request/2.06
ernestdefoe
06-01-2004, 12:08 AM
I got it to work with some help from msimplay. Thanks for the help.
DWard
06-01-2004, 05:56 AM
Okay I get this error. GD2+ installed, and have the 2 images CHMOD'ed to 777.
Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/wmeadmin/public_html/vb/signature.php on line 208
Can someone please help me?
I think the imagecreatefromjpeg() function me either me not available or disallowed on your server.
DWard
06-01-2004, 05:57 AM
probably it was somewhere around here in thread already, but... how make it work with ONLINE.PHP?! now i see only:
Guest Unknown Location /forum/signature.php xxx.xxx.xxx.155 lwp-request/2.06 No worries, details for that will be posted in the next version, either this or next week :)
DWard
06-01-2004, 06:00 AM
Not sure if it's the same on all servers, but this is how I do my cron:
Minute: 45,0,15,30
Hour: *
Day of the Month: *
Month: *
Day of the week: *
Command: GET http://www.collegepranks.co.uk/forums/signature.php >/dev/null 2>&1
Obviously the 'GET http://www.collegepranks.co.uk/forums/signature.php' part is to run it, but the '>/dev/null 2>&1' part stops me from getting a report every time the cron is executed.
DWard
06-01-2004, 06:31 AM
Well I was wrong.. :(
My method doesn't work correctly - the Thread and Post numbers aren't displayed.
http://www.gamerseuphoria.com/signature/signature.jpgYour signature (http://www.gamerseuphoria.com/forum/signature.php) works fine for me.
Oblivion Knight
06-01-2004, 07:33 AM
Your signature (http://www.gamerseuphoria.com/forum/signature.php) works fine for me.Yep, running it through signature.php works fine - but the amount of guests viewing my forum then sky rockets through the roof, all viewing signature.php :ermm:
DWard
06-02-2004, 06:56 AM
Yep, running it through signature.php works fine - but the amount of guests viewing my forum then sky rockets through the roof, all viewing signature.php :ermm:
Yer u need a crontab set up.
Oblivion Knight
06-02-2004, 10:59 AM
Yer u need a crontab set up.I don't have access to crontab or any kind of cron service on the server other than vB's cron, so I really could do with it being set up on that somehow.
As I said, I'll try and look in to it.. :cross-eyed:
scottct1
06-02-2004, 03:29 PM
Works Great!
Thank you!!
MrWolfman
06-02-2004, 10:02 PM
yes great work thankyou
could anyone help me add something to this
i also at the end want it to show the total number of vote in a specific poll
could anyone help me do this plase
Mr. HillBilly
06-10-2004, 09:07 PM
This script messes up the color in my image..
example attached
DWard
06-11-2004, 05:10 AM
I may know why, but I'll look into it and get back to you.
bigreefer
06-11-2004, 10:41 AM
A Server update with the new GDlib and now it runs :)
ThX !!!
http://www.celebritymarkt.de/signature.php (http://www.celebritymarkt.de/) [img]
DWard
06-12-2004, 05:55 AM
This script messes up the color in my image..
example attached
What version of GD do you have? I think GD 2 is required for the best results.
Mr. HillBilly
06-12-2004, 06:59 PM
What version of GD do you have? I think GD 2 is required for the best results.
I'm running GD2
DWard
06-18-2004, 08:06 PM
Mmm still a bit confused by your situation, its one I've never seen before. By the way everybody who likes this hack might like the look of a new related hack that I will be releasing on Monday. The details are below:
Follow this link:
https://vborg.vbsupport.ru/showthread.php?t=66285
Natch
06-19-2004, 12:14 AM
I think this guy might have the version that does imagecreate() not imagecreatetruecolor()
DWard
06-19-2004, 05:41 AM
That's the only thing I can suggest, I thought of it, but it should have no effect.
DWard
06-19-2004, 06:31 AM
Released for Sandy. Extra statistcs in signature, IP address, Browser, and OS.
Natch
06-19-2004, 02:03 PM
Caveat: That's not gonna give accurate info if you run it via a crontab tho' - the IP will be the address of the server running the cron job, etc...
DWard
06-19-2004, 03:41 PM
Released for Sandy. Extra statistcs in signature, IP address, Browser, and OS.
He's not running via crontab.
bhutz
06-22-2004, 07:29 AM
*Bhutz click install
Yeh
I had to point to my verdana.ttf like
/home/bhutz/public_html/forum/verdana.ttf
Because I was having problems with the script not being able to find the font and sayin that headers had already been sent...grrr
All good now though :devious:
DWard
06-23-2004, 04:31 AM
Good Good
Big Kahuna
06-23-2004, 06:38 PM
OK what am I doing wrong?
I get :
https://vborg.vbsupport.ru/
when the graphic looks like this:
https://vborg.vbsupport.ru/
Big Kahuna
06-23-2004, 06:40 PM
and why when I right-click yours for the properties I see the file name as http://www.collegepranks.co.uk/forums/avatars2/signature.jpg
but when I right-click mine I get
http://www.moparstyle.com/forums/signature.php
Big Kahuna
06-23-2004, 07:10 PM
I gave up on the yellow and did a different graphic.
Big Kahuna
06-23-2004, 07:28 PM
This is crazy how I can only make it work with some graphics and not with others.
I also tried this as a sig on a phpBB board and it work display there -- will this only work on vBulleting forums?
http://hattrick.computergames.ro/forum/signature.php
However, it looks teribile. Where are the colors ? :(
DWard
06-24-2004, 04:22 AM
if you look back there is a thing about creating a jpeg and a trurtype function, which was taken off in the new version because that was causing a few troubles.
Big Kahuna
06-24-2004, 03:17 PM
if you look back there is a thing about creating a jpeg and a trurtype function, which was taken off in the new version because that was causing a few troubles.
1. I can only make this work with certain colors -- 90% of the graphics I've made convert down to a 16-color "Safe Mode" look. Below is how I have the font code section of the version I loaded from the first post yesterday.
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
// LINE1
imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color);
//imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); // LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?></FONT>
My understanding was that I commented to where it takes the default -- but I suck as a programmer and that may be where I'm screwing up. The Line 2 & 22 or 1 & 12 confuse me as to exactly which lines are which. Is that 1, 2, 12, & 22 from the ########### down?
2. I see your sig is a JPG -- are you having a CRON job generate a new image every so often -- and it so, please roll me a bone and tell me how to do that. I visit a lot of phpBB and YaBB boards that I have no control over -- and they do not allow for php images.
This is a very cool hack and if I had more control over which graphics will work and the ability to generate frequent images (I know it isn't real time -- but every 10 minutes would be close enough for Government work) for my members -- it would be too Kool.
Thanx
BK
Big Kahuna
06-24-2004, 03:23 PM
BTW -- Happy Birthday Dan. You're just a young shaver at 17. ;)
TJFweb
06-25-2004, 01:56 AM
Hi,
I'm using imagecreate() because imagecreatetruecolor() gives me a red x.
However the color comes up looking terrible! It's not even grayscale, it's just some washed out blue all over.
I've attached a pic. I know the stats text is out of alignment but I'm not going to bother aligning it until I know I can get it working in full color :P
TJFweb
06-25-2004, 01:58 AM
Does the input jpeg have to be compressed with a specific value or with indexed color or something?
Natch
06-25-2004, 02:08 AM
No - it means that you have an old version of GD - it also means that your server can only produce low-quality images (hence the lack of truecolor support)
TJFweb
06-25-2004, 02:24 AM
What a p.o.s. server. Good thing I'm switching servers next month.
TJFweb
06-25-2004, 02:29 AM
Oh what do you know, I tried the imagecreatetruecolor(etc...) and it worked.
DWard
06-25-2004, 10:27 AM
Yer the truecolor and other mode work at different times. O wel. I got signed off from college today for 3 months, so a portion of that time will be spent on this mod for a bit. I'm working on a flash stats thing now, it's getting there.
Big Kahuna
06-25-2004, 03:42 PM
No - it means that you have an old version of GD - it also means that your server can only produce low-quality images (hence the lack of truecolor support)
I'm having the same problem -- but I have been assured that I have the most current version of GD.
The author of this hack said it had something to to with the defualt vs downloaded font -- but I didn't understand exactly what he was saying. I included the portion of the font code a couple of posts ago so he (or anyone else) could roll me a bone.
marcel-ea
06-25-2004, 10:55 PM
I have a other problem i use a jpg and he generate all right only the jpg lose the colors look if they have only 16 colors..
Please help
cLord
06-26-2004, 04:34 AM
*INSTALLS*
Is it normal that one guest is added (without IP) to the online userlist when I call this script using cron?
VERY nice script!
cLord ;)
DWard
06-26-2004, 06:03 AM
*INSTALLS*
Is it normal that one guest is added (without IP) to the online userlist when I call this script using cron?
VERY nice script!
cLord ;)
Yes, to get accurate post data, I needed to add the vbulletin global.php file, which when run is detected in the online users bit.
I will be adding a small mod for my next version to say 'Signature Stats' in the online users bit.
bhutz
06-26-2004, 06:11 PM
Hey peeps I am having problems after successfully installing.
I tried to chnage the signature.jpg and sig.jpg for my own but the old one keep appearing, no idea why :(
So I tried to create signature2.php, signature2.jpg and sig2.jpg but now I get this error
Warning: imagecreatefromjpeg: Unable to open '/home/bhutz/public_html/signature/sig2.jpg' for reading in /home/bhutz/public_html/forum/signature2.php on line 208 Warning: Supplied argument is not a valid Image resource in /home/bhutz/public_html/forum/signature2.php on line 225 Warning: Cannot add header information - headers already sent by (output started at /home/bhutz/public_html/forum/signature2.php:208) in /home/bhutz/public_html/forum/signature2.php on line 242
Any ideas anyone? :ermm:
bhutz
06-26-2004, 06:34 PM
Any ideas anyone? :ermm:
Ignore me, I think I should have set my image to indexed colour :tired:
In Adobe Photshop....
Image >> Mode > Indexed Colour
Now for me to position the text...should be fun :nervous:
RapCheck
06-26-2004, 07:59 PM
sweet, I always wanted one of these :D
got it working just have to fine tune an image and the text
RapCheck
06-26-2004, 08:59 PM
Can someone explain the whole cron thing... I've searched through this thread, and can't really figure it out. I don't have cpanel or anything like that... Don't like all the 'fake' guests on the who's online.
Natch
06-27-2004, 06:01 AM
Yes, to get accurate post data, I needed to add the vbulletin global.php file, which when run is detected in the online users bit.
I will be adding a small mod for my next version to say 'Signature Stats' in the online users bit.
I have done this - you just add "lwp-request" and "Signature Stats Updater" to the Spider List under "Who's Online" vBulletin Options in your AdminCP
DWard
06-27-2004, 06:53 AM
Can someone explain the whole cron thing... I've searched through this thread, and can't really figure it out. I don't have cpanel or anything like that... Don't like all the 'fake' guests on the who's online.
I would say you can do it in vB, but I tried that and it doesnt seem to work. I think there are some cron scripts that you can use, you need to ask somebody who knows a tad more about crontabs.
Big Kahuna
06-27-2004, 06:51 PM
OK what am I doing wrong?
I get :
http://www.moparstyle.com/forums/uglysignature.php
when the graphic looks like this:
http://www.moparstyle.com/forums/images/sig.jpg
I'd sure still like to find out how to resolve this problem!
Big Kahuna
06-27-2004, 07:05 PM
The reason the bad graphic in the above post now looks good is that I found the answer on the F5hosting forum.
For those others of you who have been waiting days for the detailed answer on how to make the washed out graphics work -- the answe is (drum roll)
The image you are using has more than 256 colours so the method in the hack will never work. The function they should have used to create the initial image is imagecreatetruecolor and not imagecreate, so if you replace the line
$img = imagecreate($width,$height);
with
$img = imagecreatetruecolor($width,$height);
it should work.
Big Kahuna
06-28-2004, 05:19 AM
https://vborg.vbsupport.ru/ (http://www.moparstyle.net/forums/index.php?referrerid=2)
make sure the signature.jpg is CMOD to read and write by all, and you can just run the signature.php in your board's CRON once an hour -- and then just use the jpg instead of the php inside ing code.
DWard
06-28-2004, 06:49 AM
The reason the bad graphic in the above post now looks good is that I found the answer on the F5hosting forum.
For those others of you who have been waiting days for the detailed answer on how to make the washed out graphics work -- the answe is (drum roll)
The image you are using has more than 256 colours so the method in the hack will never work. The function they should have used to create the initial image is imagecreatetruecolor and not imagecreate, so if you replace the line
$img = imagecreate($width,$height);
with
$img = imagecreatetruecolor($width,$height);
it should work.
I will ake this optionalin te net version I am considering making a small admin control panel for signature stats, but I will think about it.
RapCheck
06-28-2004, 07:51 PM
https://vborg.vbsupport.ru/ (http://www.moparstyle.net/forums/index.php?referrerid=2)
make sure the signature.jpg is CMOD to read and write by all, and you can just run the signature.php in your board's CRON once an hour -- and then just use the jpg instead of the php inside ing code.
aha, works for me
DWard
06-28-2004, 08:36 PM
Yer for some it works fine first time, for others it doesn't. It's not as if the instructions are hard at the least.
It is definately related to the GD version users are working with.
RapCheck
06-28-2004, 09:11 PM
I'm finding that using the vb cron, the post count stats dont update and go blank, but if I click on run manually, it updates fine
Big Kahuna
06-29-2004, 12:40 AM
I'm finding that using the vb cron, the post count stats dont update and go blank, but if I click on run manually, it updates fineI'm having the same problem. What's up with that.
On the GD version -- the first thing I looked into was the version of GD on my server. It was the most recent (as I posted many posts ignored ago). It took me almost five days of being ignored here before I posted the problem at another forum, and to have someone else look at it and give me the proper replacement code for it to work.
I like the hack and don't want to sound ungrateful -- but I made many posts in this thread giving the exact details of the problem and what I did, and they were all ignored. I make one post at F5Hosting -- baddabing-baddaboom, the answer.
I'm hoping we can get the answer to the missing thread and post counts when the signature.php is run as an automatic CRON -- but reappear when you manually run the CRON. However, I'll ask over there if no one here answers.
DWard
06-29-2004, 03:40 PM
I'm having the same problem. What's up with that.
On the GD version -- the first thing I looked into was the version of GD on my server. It was the most recent (as I posted many posts ignored ago). It took me almost five days of being ignored here before I posted the problem at another forum, and to have someone else look at it and give me the proper replacement code for it to work.
I like the hack and don't want to sound ungrateful -- but I made many posts in this thread giving the exact details of the problem and what I did, and they were all ignored. I make one post at F5Hosting -- baddabing-baddaboom, the answer.
I'm hoping we can get the answer to the missing thread and post counts when the signature.php is run as an automatic CRON -- but reappear when you manually run the CRON. However, I'll ask over there if no one here answers.
I'm not sure to be honest why vB crons dont work. I have plesk control panel for my domain and its ace when running crons. Have no trouble what so ever.
Big Kahuna
06-29-2004, 04:05 PM
Good idea -- I'll try to run the CRONs from my site's CP
kodeking
07-01-2004, 03:30 AM
I got mine working after much tweaking!
http://www.gamedose.com/signature.jpg (http://www.gamedose.com/forum/)
EvilCrow
07-01-2004, 03:11 PM
The reason the bad graphic in the above post now looks good is that I found the answer on the F5hosting forum.
For those others of you who have been waiting days for the detailed answer on how to make the washed out graphics work -- the answe is (drum roll)
The image you are using has more than 256 colours so the method in the hack will never work. The function they should have used to create the initial image is imagecreatetruecolor and not imagecreate, so if you replace the line
$img = imagecreate($width,$height);
with
$img = imagecreatetruecolor($width,$height);
it should work.
Thanks a million... That fixed it.. now on to the text placement...
marcel-ea
07-01-2004, 03:50 PM
for me fix also my problem THX very much!
i think is a good idea to fix the download
DWard
07-01-2004, 05:42 PM
for me fix also my problem THX very much!
i think is a good idea to fix the download
I will be for version 3 dont wory :)
Big Kahuna
07-01-2004, 09:58 PM
Update -- I run the below CRON in my Cpanel and it works flawlessly. Don't know why it won't with vbulletin's CRON
/usr/bin/php /home/moparsty/public_html/forums/signature.php >/dev/null 2>&1
https://vborg.vbsupport.ru/ (http://www.moparstyle.net/forums/showthread.php?p=441573#post441573)
NyCwill
07-02-2004, 02:05 AM
im getting this error
Fatal error: Call to undefined function: imagettftext() in /home/a1forums/public_html/forums/signature.php on line 238
DWard
07-02-2004, 09:20 AM
Update -- I run the below CRON in my Cpanel and it works flawlessly. Don't know why it won't with vbulletin's CRON
/usr/bin/php /home/moparsty/public_html/forums/signature.php >/dev/null 2>&1
http://www.moparstyle.net/forums/images/hrsignature.jpg (http://www.moparstyle.net/forums/showthread.php?p=441573#post441573)
Not sure why vB doesnt work either, o wel, thank you cpanel, or plesk as i use!
DWard
07-02-2004, 09:21 AM
im getting this error
Fatal error: Call to undefined function: imagettftext() in /home/a1forums/public_html/forums/signature.php on line 238
OK, that is because the imagettftext() function is either disabled or not supported on your server. You need to consult them about it, otherwise just use the standard text option.
NyCwill
07-02-2004, 12:22 PM
how do I use the standard text option.
NyCwill
07-02-2004, 12:32 PM
nvm I got it hehe :)
cLord
07-03-2004, 05:28 AM
About Cron...
Can someone please explain what this means:>/dev/null 2>&1Thanks in advance,
cLord ;)
DWard
07-04-2004, 03:11 PM
Dont quite know what it actually means, but I use it to turn off the email notification I used to get after each cron was carried out.
Natch
07-04-2004, 03:13 PM
the first part causes the text output - aka errors and so on - to be redirected to /dev/null - a blackhole where data goes to die ...
Jack28
07-15-2004, 11:22 PM
Ah, i got it working!
http://imgz.ath.cx/forum/signature.php
Natch
07-15-2004, 11:30 PM
There's a place for testing - a Testing forum ?
royals
07-22-2004, 12:53 AM
Yikes!
This is what I have in my signature.php
//full path to empty signature image (input image)
$vorlagedatei = "root/httpdocs/forums/images/sig.jpg";
//full path to signare image with forum data (output image)
$ausgabedatei = "root/httpdocs/forums/images/signature.jpg";
The error I'm getting:
Warning: imagecreatefromjpeg(root/httpdocs/forums/images/sig.jpg): failed to open stream: No such file or directory in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 208
Warning: imagecopy(): supplied argument is not a valid Image resource in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 225
Warning: Wrong parameter count for imagettftext() in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php:208) in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 242
?PNG IHDR?CN`?oPLTE???$????tRNS@??fIDATx?c`?` ??Q0 F?(@?g??IEND?B`?
Warning: imagejpeg(): Unable to open 'root/httpdocs/forums/images/signature.jpg' for writing in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 244
Natch
07-22-2004, 01:30 AM
root/httpdocs/forums/Should be /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/ in all places in that file :)
royals
07-22-2004, 01:47 AM
thanks! That got rid of the first error... I'm still getting this:
Warning: Wrong parameter count for imagettftext() in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php:238) in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 242
?PNG IHDR?C ??? PLTE??????$??L?0tRNS@??f/IDATx??˱ 0??#?J????voܖ???,?{r?ɲ,˲,˲<5??Cm>YT?BIEND?B`?
Warning: imagejpeg(): Unable to open '/home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.jpg' for writing in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 244
sorry to be a pain
Natch
07-22-2004, 02:24 AM
Can you paste out line 230-260 of your signature.php?
royals
07-22-2004, 02:26 AM
here is 223-245. I think I know what it is (line1&2) just not sure what I need to change. but I'm probably wrong!
// ######################### DO NOT EDIT BELOW ############################
imagecopy ($img, $vorlage, 0, 0, 0, 0, $width, $height); // copy empty banner
imagecolortransparent($img, $bg_color); // set dummybg transparent
// the distance is in pixels and the font # is 1 through 5
$i = 0;
while($i < count($output)){
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
//imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); // LINE1
imagettftext($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, $output); // LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
Natch
07-22-2004, 02:35 AM
imagettftext($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, $output); // LINE2
This line here is missing the vital bit of code ...imagettftext($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); // LINE2
You need to pick a TTF font file, upload it to the same folder as your signature.php file and specify the filename of that font here ... see?
royals
07-22-2004, 02:48 AM
Ok.... I've uploaded verdana.ttf and the changes to php.
Warning: Wrong parameter count for imagettftext() in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php:238) in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 242
?PNG IHDR?C ??? PLTE??????$??L?0tRNS@??f/IDATx??˱ 0??#?J????voܖ???,?{r?ɲ,˲,˲<5??Cm>YT?BIEND?B`?
Warning: imagejpeg(): Unable to open '/home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.jpg' for writing in /home/httpd/vhosts/therabblerousers.com/httpdocs/forums/signature.php on line 244
:( :(
Natch
07-22-2004, 02:54 AM
Your file has gotten quite screwed, but that line should readimagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output[$i]); // LINE2 - you were also missing the parameter 0 between fontsize and left...
The last error is due to you having not yet CHMOD'ed your output directory to where you will save the image...
royals
07-22-2004, 03:04 AM
Ok - that error is gone but I get this:
http://www.therabblerousers.com/forums/signature.php
links for images:
http://www.therabblerousers.com/forums/sig/signature.jpg
http://www.therabblerousers.com/forums/sig/sig.jpg
I dont know if I did the images correct
Editd - had wrong links
royals
07-22-2004, 03:46 AM
ok - I figured out my original sig.jpg was wrong...... I think I'm getting it. thank you so much for your time helping me ;)
It's almost there - just not exactly sure now.
http://www.therabblerousers.com/forums/signature.php
Natch
07-22-2004, 04:10 AM
There is no way that this code should require login access - you have made too many changes I think ...
Work from the default file and see how you go ...
royals
07-22-2004, 01:27 PM
Ok, I will do that this weekend. It is a closed board so I think thats the problem. Thanks for your help.
DWard
07-22-2004, 03:09 PM
Hey guys, WHAT HAS HAPPENED TO THE DESIGN?? I visited the site hoping to see the usual nice design, but I see this little innocent design!
sicloan
07-23-2004, 12:16 AM
dont know about the design, but awsome hack!!
*installs*
and as for the cron job thing:
i do it every 15 minutes using the http:// url to the file. if i used the server path it wont work.
Liquid1ce
07-26-2004, 02:08 PM
OK, that is because the imagettftext() function is either disabled or not supported on your server. You need to consult them about it, otherwise just use the standard text option.
Dur whats the standard txt option ? lol :ninja:
Elfo King
07-31-2004, 01:46 PM
Hi all,
i have prob on the sign php page, the page appear blank...
is this (http://www.uebb.it/forum/signature.php)
i have uploaded the sign file and modified the signature.php file with the db parameters.
i suppose my server dont support GD,this is phpinfo (http://www.uebb.it/forum/forum.php?&do=phpinfo).
U have a solution for me?
thx !
Elfo King
07-31-2004, 01:56 PM
//full path to empty signature image (input image)
$vorlagedatei = "http://www.uebb.it/forum/sign/sig.jpg";
//full path to signare image with forum data (output image)
$ausgabedatei = "http://www.uebb.it/forum/sign/signature.jpg";
Is right this?
DWard
07-31-2004, 05:34 PM
//full path to empty signature image (input image)
$vorlagedatei = "http://www.uebb.it/forum/sign/sig.jpg";
//full path to signare image with forum data (output image)
$ausgabedatei = "http://www.uebb.it/forum/sign/signature.jpg";
Is right this?No, it must be the full server path, not the URL.
oldfan
08-03-2004, 02:52 PM
I'm getting this error, could someone please help?
thanks
Warning: Wrong parameter count for imagettftext() in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/qtss/bbs.metallifukinca.com/html/signature.php:238) in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 242
Natch
08-03-2004, 02:55 PM
Check out this post and a few previous posts ...
oldfan
08-03-2004, 02:56 PM
here is my code..
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
//imagestring($img, $fontsize,0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); // LINE1
imagettftext($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "http://bbs.metallifukinca.com/verdana.php", $output); // LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?>
Natch
08-03-2004, 02:59 PM
OK - you will need to have a local path, not a http:// path to your TTF font file
oldfan
08-03-2004, 03:04 PM
I'm getting this now :(
Parse error: parse error in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 238
my code
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
imagestring($img, $fontsize,0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); LINE1
imagettftext($img, $fontsize, 0,$left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color,
"/home/qtss/bbs.metallifukinca.com/html/verdana.php", $output); LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?>
Natch
08-03-2004, 03:22 PM
take the quotes and the extra spaces out from the line - make it like so...// imagestring($img, $fontsize,0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); // LINE1
imagettftext($img, $fontsize, 0,$left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color,"/home/qtss/bbs.metallifukinca.com/html/verdana.ttf", $output); // LINE2
oldfan
08-03-2004, 03:29 PM
like this?
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
imagestring($img, $fontsize,0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output,
$text_color);LINE1
imagettftext($img, $fontsize, 0,$left, (($i * $zeilenabstand) - $zeilenabstand + $top),
$text_color,/home/qtss/bbs.metallifukinca.com/html/Verdana.ttf, $output);LINE2
$i++;
}
because I'm still getting
Parse error: parse error in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 238
sorry for being a newbie
Natch
08-03-2004, 03:32 PM
You see the lines I ahve given you - replace your whole imagestring($img, $fontsize,0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output,
$text_color);LINE1
imagettftext($img, $fontsize, 0,$left, (($i * $zeilenabstand) - $zeilenabstand + $top),
$text_color,/home/qtss/bbs.metallifukinca.com/html/Verdana.ttf, $output);LINE2 with what I posted in my last post...
oldfan
08-03-2004, 03:40 PM
i'm a n00b :(
ok this my code now
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
// imagestring($img, $fontsize,0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output,
$text_color); // LINE1
imagettftext($img, $fontsize, 0,$left, (($i * $zeilenabstand) - $zeilenabstand + $top),
$text_color,"/home/qtss/bbs.metallifukinca.com/html/Verdana.ttf", $output); // LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?>
and im getting this error :(
Warning: imagettftext(): Could not read font in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/qtss/bbs.metallifukinca.com/html/signature.php:238) in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 242
GamerzWorld
08-03-2004, 03:48 PM
Warning: imagettftext(): Could not find/open font in /home/merlin/public_html/mirzone/forum/signature.php on line 238
Is the error im getting. The script is at www.mirzone.net/forum/signature.php . I followed the instructions and havnt changed that line
oldfan
08-03-2004, 03:50 PM
We got the same errors :(
Warning: imagettftext(): Could not find/open font in /home/merlin/public_html/mirzone/forum/signature.php on line 238
Is the error im getting. The script is at www.mirzone.net/forum/signature.php . I followed the instructions and havnt changed that line
Natch
08-03-2004, 04:11 PM
OK - have you uploaded the font verdana.ttf to your server root? It will probably be case-sensitive so make sure the filename is "verdana.ttf" in the location on your server "/home/qtss/bbs.metallifukinca.com/html/" as specifed in that script ...
You really should read the instructions more carefully ...
oldfan
08-03-2004, 04:24 PM
I've done everything its said/you
Warning: imagettftext(): Could not read font in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/qtss/bbs.metallifukinca.com/html/signature.php:238) in /home/qtss/bbs.metallifukinca.com/html/signature.php on line 242
Natch
08-03-2004, 04:28 PM
Check: verdana.ttf has a lower-case V
Change: the full path to just the font file name, no slashes, etc
oldfan
08-03-2004, 04:31 PM
thanks dude, I had the verdana.ttf in the vB3 dir.
I put it in the root dir and everythign works great thanks
/me clicks install
oldfan
08-03-2004, 06:12 PM
https://vborg.vbsupport.ru/
mines abit big, any artist out there?
Everytime I resize it, it distorts :(
Mr. Brian
08-03-2004, 09:54 PM
No sign of stats shown?
oldfan
08-04-2004, 05:41 AM
mine?
DWard
08-04-2004, 08:40 AM
No sign of stats shown?
Wot?
DWard
08-04-2004, 08:47 AM
Add-on for Signature Stats v2.03
Amount of games in v3Arcade in signature
Find:
// ########################### OUTPUT TEXT ###############################
Above add:
// Games Count for v3Arcade
$result_allgames = $DB_site->query("
SELECT * FROM " . TABLE_PREFIX . "games $searchclause ORDER BY gameid DESC
");
$gamecount = $DB_site->num_rows($result_allgames);
Then just use $gamecount in the $output string, a bit like mine:
$output = "MEMBERS: $numbermembers THREADS: $totalthreads POSTS: $totalposts ONLINE: $totalonline GAMES: $gamecount";
Blam Forumz
08-04-2004, 08:47 PM
Error :
Warning: imagecreatefromjpeg(/home/public_html/sig/sig.jpg): failed to open stream: No such file or directory in /home/blamina/public_html/forum/signature.php on line 208
Warning: imagecopy(): supplied argument is not a valid Image resource in /home/blamina/public_html/forum/signature.php on line 225
Warning: imagettftext(): Could not find/open font in /home/blamina/public_html/forum/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/blamina/public_html/forum/signature.php:208) in /home/blamina/public_html/forum/signature.php on line 242
?PNG
Help please.
Blaminator
Natch
08-04-2004, 11:47 PM
OK - where you have /home/public_html/sig/sig.jpg it should be /home/blamina/public_html/sig/sig.jpg - that shouild solve it...
d3nnis
08-05-2004, 02:49 PM
/me clicks install
:banana:
Quelyn
08-07-2004, 11:58 AM
Ok...
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
//imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color); // LINE1
imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color,"/home/artfag/public_html/tahoma.ttf", $output); // LINE2
$i++;
}
What have I done wrong. because, I get this error:
Warning: imagettftext(): Could not read font in /home/artfag/public_html/forums/signature.php on line 238
Warning: Cannot modify header information - headers already sent by (output started at /home/artfag/public_html/forums/signature.php:238) in /home/artfag/public_html/forums/signature.php on line 242
Then a crapload of gibberish.
Quelyn
08-07-2004, 12:39 PM
If I uncomment line one, and comment line 2, I get the image to show up with no text on it. I can't figure out what yyou mean by line 12 and line 22. Because that makes no sense to me.
http://www.emocrap.com/forums/signature.php
See it shows up but with no text on the image. I really don't want to use the default font, but as per my post above the other way just doesn't want to work.
DWard
08-07-2004, 04:40 PM
If I uncomment line one, and comment line 2, I get the image to show up with no text on it. I can't figure out what yyou mean by line 12 and line 22. Because that makes no sense to me.
http://www.emocrap.com/forums/signature.php
See it shows up but with no text on the image. I really don't want to use the default font, but as per my post above the other way just doesn't want to work.
Sorry it's a bit unclear. This is what it should read:
Uncomment LINE1 and comment LINE2 to use default font.
If this doesn't work, then you may need to contact your web host to see if they have disabled the functions 'imagestring' and 'imagettftext'.
Blam Forumz
08-07-2004, 08:04 PM
How do I move the text around?
DWard
08-08-2004, 06:28 AM
How do I move the text around?
Theres two variables at the top of the script called $top and $left, you must edit those to mode the text around.
Blam Forumz
08-08-2004, 06:51 AM
Could ya give me some sort of guide please,? im not exactly sure how to move them
oldfan
08-10-2004, 03:50 PM
//Width of banner image
$width = yoursize;
//Height of banner image
$height = yoursize
//Left text-margin
$left = 296;
//text-margin from top
$top = 30;
//Font Size
$fontsize = 10;
//Line-spacing of text
$zeilenabstand = 0;
oldfan
08-10-2004, 03:52 PM
and this will make your text appear one ontop of each other
$output = " Members: $numbermembers\n\r Threads: $totalthreads\n\r Posts: $totalposts\n\r Online: $totalonline";
like this http://bbs.metallifukinca.com/signature.php
Natch
08-10-2004, 10:16 PM
To be perfectly frank, there is a better way for the text to appear one on top of the next ...$output[] = "Members: $numbermembers";
$output[] = "Threads: $totalthreads";
$output[] = "Posts: $totalposts";
$output[] = "Online: $totalonline";This works as the original script did - walks thru an array of lines for output...
oldfan
08-11-2004, 02:37 AM
thanks, I'll try that :)
To be perfectly frank, there is a better way for the text to appear one on top of the next ...$output[] = "Members: $numbermembers";
$output[] = "Threads: $totalthreads";
$output[] = "Posts: $totalposts";
$output[] = "Online: $totalonline";This works as the original script did - walks thru an array of lines for output...
Meltingfire
08-12-2004, 12:46 PM
I have a small problem when running it as a vb-cronjob.
The member-count is displayed but threads and post are completly empty.
When i run it "manually" it will generate a correct image... even if i press the "Run now" button in cronjob it will generate it correctly
Could it be that when running as a vb-cronjob it sometimes doesnt have the time to run the complete code because a user aborts the page-load. (If im not misstaken cronjobs are runned when a user access a vb-page and there is a scheduled task that needs to be run)
Would it maybe be solved if you added ignore_user_abort(true) and (false) at the beginning and end of he script?
Natch
08-12-2004, 03:44 PM
This issue occurs for some but not others - I'm wondering if it could be related to a permissions issue - maybe the guest (the cron job) doesn't have permissions to access those tallies...
Meltingfire
08-12-2004, 04:23 PM
This issue occurs for some but not others - I'm wondering if it could be related to a permissions issue - maybe the guest (the cron job) doesn't have permissions to access those tallies...
Strange, well then i have to add it to the cronjob in the OS instead...
kingady
08-18-2004, 01:10 PM
nice, im gonnaa do this right now
oldfan
08-20-2004, 12:18 AM
I seen someone with "newest member" on his ?
Did I miss some code?
Natch
08-20-2004, 06:11 AM
Nope - that's a customisation: you can in this script pull in any data you like, and output it to the image.
DWard
08-20-2004, 09:08 AM
Show newest user in Signature Stats
This will show you how to display the newest user in your signature image
Open your signature.php file and Find:
$totalonline = $numberregistered + $numberguest;
Below that, add:
// GETTING NEWEST USER
$newestuser = $DB_site->query("SELECT username FROM " . TABLE_PREFIX . "user AS user ORDER BY userid DESC LIMIT 1");
$nuser = mysql_result($newestuser,0);
Then your $output string should be a little like this (look for bold text):
$output = "MEMBERS: $numbermembers THREADS: $totalthreads POSTS: $totalposts ONLINE: $totalonline NEWEST USER: $nuser";
If you have any problems, just reply in this thread :)
oldfan
08-20-2004, 02:28 PM
thanks DWard
DWard
08-20-2004, 04:07 PM
No worries! If anybody needs something else in their signature, contact me and I'll get on it :D
oldfan
08-20-2004, 04:10 PM
here's a shot in the dark...
i have a BitTorrent tracker intergrate into my vB3 and I have the stats output in my forum index.
Is it possible to add this to the signature too?
http://bbs.metallifukinca.com/index.php?
the tracker stats are bellow then forums.
thanks
DWard
08-20-2004, 05:52 PM
It may be, could you send me a screenshot of the table your stats are being read from?
joergh
08-21-2004, 08:58 PM
The reason the bad graphic in the above post now looks good is that I found the answer on the F5hosting forum.
For those others of you who have been waiting days for the detailed answer on how to make the washed out graphics work -- the answe is (drum roll)
The image you are using has more than 256 colours so the method in the hack will never work. The function they should have used to create the initial image is imagecreatetruecolor and not imagecreate, so if you replace the line
$img = imagecreate($width,$height);
with
$img = imagecreatetruecolor($width,$height);
it should work.
Great! Thank you so much , I tried everything before i found your post!
joergh
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.