vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Signature Stats v3.04 (https://vborg.vbsupport.ru/showthread.php?t=65361)

mholtum 09-07-2004 04:33 PM

I can see this:
PHP 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$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
?> 

But what would I change?

DWard 09-07-2004 04:48 PM

Look above that somewhere is the colour part, its set out in RGB, like 255,255,255

mholtum 09-07-2004 05:08 PM

PHP Code:

// ########################## TEXT FORMATTING ############################

// A PNG uses ImageColorAllocate instead of ImageColorClosest like jpeg uses

//background white
$bg_color imagecolorallocate ($img255255255);

//black text
$text_color imagecolorallocate ($img1936161);

imagefilledrectangle ($img00$width$height$bg_color); 


mholtum 09-07-2004 05:15 PM

Great thanks
found it

DWard 09-07-2004 06:19 PM

Sorry all, just checked the signature.php and using it myself. There were a few problems but they have now been sorted :)

The new files is attached in the first post.

oldfan 09-07-2004 11:15 PM

whats new in the new version?

DWard 09-08-2004 04:19 PM

Its basically alot easier for people with either GD1 or GD2, and means people dont have to uncomment lines etc

Martin64 09-09-2004 10:47 AM

Great stuff, thanks a lot! :)

Here's what ours look like:

http://www.emutalk.net/signature.php

DWard 09-09-2004 05:12 PM

You may also want to use these:

Show newest user in Signature Stats
https://vborg.vbsupport.ru/showpost....&postcount=245

Amount of games in v3Arcade in signature
https://vborg.vbsupport.ru/showpost....&postcount=225

TTG 09-10-2004 10:17 AM

What am I doing wrong here .. must be something I've screwed up in the signature.php path to images .. both images are chmod 777

//full path to empty signature image (input image)
$vorlagedatei = "/usr/home/thetechg/public_html/
/retreat/sig/sig.jpg";

//full path to signare image with forum data (output image)
$ausgabedatei = "/usr/home/thetechg/public_html/retreat/sig/signature.jpg";

venomx 09-10-2004 06:20 PM

chmod the folder too?

DWard 09-10-2004 06:56 PM

nop, just the files

MissKalunji 09-10-2004 08:39 PM

Quote:

Originally Posted by DWard
nop, just the files


Great it works
How do i make each thigns (post,threads) on a diff line?
Like dis -> threads
Post
etc..??

and what to add for the game section?

THank u

DWard 09-11-2004 05:44 AM

If you are using a truetype font, i believe you can just type /n in your $output string to make new lines.

Look on the first post for a link on how to do the games part.

venomx 09-11-2004 08:57 AM

I thought it didnt work for me but I messed with the margins and text size and it works! :)

TTG 09-11-2004 12:41 PM

Quote:

Originally Posted by venomx
chmod the folder too?


Yep .. done that

venomx 09-11-2004 04:24 PM

The default margins and text size are not right for the images he supplied. Play around with them.

Code:

//Left text-margin
$left = 10;

//text-margin from top
$top = 60;

//Font Size
$fontsize = 2;

Seems to work for me.

DWard 09-11-2004 04:45 PM

Yer you will need to have a play to get it right.

mlevenson 09-11-2004 08:22 PM

Minor glitches but was able to resolve been wanting this for a while, thanks...clicks install.

However was never able to get single line output using /n/r or $output on seperate line.

MissKalunji 09-11-2004 09:01 PM

Quote:

Originally Posted by DWard
If you are using a truetype font, i believe you can just type /n in your $output string to make new lines.

Look on the first post for a link on how to do the games part.


Great thanks works

One last thing? how do you make it so when ppl click on it it goes to the site??

[high]* MissKalunji click install *
[/high]


http://www.dancehallareaz.com/forum/signature.php

DWard 09-12-2004 06:11 AM

Just put a hyperlink around the image by either bbcode, or HTML...most sites only allow bbcode in their signatures.

MissKalunji 09-12-2004 12:59 PM

Quote:

Originally Posted by DWard
Just put a hyperlink around the image by either bbcode, or HTML...most sites only allow bbcode in their signatures.


Thx i thought it was something to add in the php files
:nervous:

DWard 09-12-2004 02:46 PM

nope

gfxhavenowner 09-12-2004 10:01 PM

Whenever I try to use ttf, the image shows up, but the text doesn't. How do I fix this, and how can I tell if imagettftext is enabled with my host?

DWard 09-13-2004 04:00 PM

if imagettftext() is disabled, your browser will give you an error saying the function cannot be found.

Are you sure you have uploaded the font and have entered the font location correctly in your signature.php file?

TTG 09-14-2004 01:33 PM

Gave up on this one https://vborg.vbsupport.ru/external/2004/09/1.gif

Natch 09-15-2004 12:20 AM

Lazy...

turbidblue 09-15-2004 11:07 PM

awesome! finally after working my ass off trying to figure this all out, i came up with one...i left off the online info and new user and all that, cause i dont need it

here it is!

http://turbidblue.com/forum/signature.php


whew!

this is such an amazing little thing! thanks to all those who helped in this thread, all your support was very appreciated!

xoxo

[high]* turbidblue clicks install finally!
[/high]


I do have one question though. Is there a way to make up more of these, with different images? I would like for my mod's to have them as sigs also on different forums..I was thinking maybe, I could just name another one signature1.php ??

Or am I wanting too much?

EDIT: It does indeed work, which is even more awesome! Now none of my members have to have the same one :)

DWard 09-19-2004 07:08 AM

What you could effectively do is put it all on the same script, however it would get complicated and it means I have to find another way.

It would probably be better to do another signature1.php file as you suggested. I will however look into it when I get a bit of time and see if it's feasible or not :)

Natch 09-20-2004 12:07 AM

This would be an excellent extension, to enable it to save the image by default, but also save a signature for all users in a usergroup or in an array of usergroups to a set location - this would be excellent :)

DWard 09-20-2004 11:47 AM

It's easy anough, I'm sure. I will take a look at some stage.

cteselle 09-20-2004 04:57 PM

Great hack! Thanks!

*clicks install

nnjj.net 09-22-2004 05:03 PM

is there any chance that any one can get the DB. info., because the signature.php file will be under the root not under admincp to be protected

Osterling 09-22-2004 07:55 PM

Quote:

Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/username;)/public_html/signature.php on line 228
i get that error when i try to run it.. :confused:

Natch 09-22-2004 10:07 PM

Quote:

Originally Posted by nnjj.net
is there any chance that any one can get the DB. info., because the signature.php file will be under the root not under admincp to be protected

Not a chance unless you let people into your site via FTP...

traderx 09-23-2004 05:26 AM

Ok... I thought I did every thing ok but I am not gettting the image to show at all. Below is my complete signature.php

Code:

<?php

// #######################################################################
// #######################################################################
// ##                                                                          ##
// ##                            SIGNATURE STATS V3.04                            ##
// ##                        ----------------------------                          ##
// ##                                By Dan Ward                                    ##
// ##                          www.collegepranks.co.uk                            ##
// ##                                                                  ##
// #######################################################################
// #######################################################################
// ########### developed from tkeil69575's script for 2.3.x ##############

// ####################### 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 ############################
// #######################################################################

//////////////////////////////////////////////////////////////////////////
//
// Instructions
// ============
//
// Edit the 'ENTER DATABASE INFORMATION' and 'ENTER IMAGE INFORMATION' sections
// then edit the 'OUTPUT TEXT' and 'TEXT FORMATTING' sections
//
//////////////////////////////////////////////////////////////////////////

// #################### ENTER DATABASE INFORMATION #######################
//DB-Servername
$host = "localhost";

//DB-Username
$user= "jaxen_4xtrader";

//DB-Password
$password= "xxxxxxx";

//vbulletin database name
$database="jaxen_forum";

//E-Mail Address where MySQL Error Messages are sent to
$adminemail = "collb@jaxen.com";

// ###################### ENTER IMAGE INFORMATION #########################

//Width of banner image
$width = 425;

//Height of banner image
$height = 82;

//Left text-margin
$left = 13;

//text-margin from top
$top = 70;

//Font Size
$fontsize = 7;

//If you have GD2 or higher set $sgdver to 1, for any older GD version set $sgdver to 0
$sgdver = 1;

//If you wish to use a TrueType font set $ttfe to 1, for default php font set $ttfe to 0
$ttfe = 0;

//If you wish to use a TrueType font, please enter the location to the .ttf file below
$ttff = "verdana.ttf";

//Line-spacing of text
$zeilenabstand = 15;

//full path to empty signature image (input image)
$vorlagedatei = "/home/jaxen/public_html/4xtraders/forum/images/sig.jpg";

//full path to signare image with forum data (output image)
$ausgabedatei = "/home/jaxen/public_html/4xtraders/forum/images/signature.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);
                }
        }

        // memory saving

        $activeusers = substr($activeusers , 2); // get rid of initial comma

        $DB_site->free_result($loggedins);

        $totalonline = $numberregistered + $numberguest;

//////////////////////////////////////////////////////////////////////////////////////////////////

// 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 text
$output = "Members: $numbermembers Threads: $totalthreads Posts: $totalposts Online: $totalonline";

$vorlage = imagecreatefromjpeg("$vorlagedatei");

if ($sgdver == "1")
{
$img = imagecreatetruecolor($width,$height);
} else {
$img = imagecreate($width,$height);
}

// ########################## TEXT FORMATTING ############################

// A PNG uses ImageColorAllocate instead of ImageColorClosest like jpeg uses

//EDIT: Background/Transparency Colour (not really seen)
$bg_color = imagecolorallocate ($img, 250, 250, 250);

//EDIT: Text Colour
$text_color = imagecolorallocate ($img, 19, 36, 161);

// ######################### DO NOT EDIT BELOW ############################

imagefilledrectangle ($img, 0, 0, $width, $height, $bg_color);
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)){

if ($ttfe == "1")
{
imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, $ttff, $output);
} else {
imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color);
}
$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
?>

Any help for this rookie would be great.

PS... I do have my sig active in my sig file now
(http://www.4xtraders.com/forum/signature.php)

DWard 09-23-2004 12:01 PM

Double check all the loactions you have entered and make sure all the images are in the correct location.

Also, make sure the images are chmod to 777

traderx 09-23-2004 04:15 PM

ok.... I can get the stats with all the words working, but the actual picture that I am using isn't showing up. If I go to www.4xtraders.com/forum/signature.php I don't get any errors. I have double checked and both pictures are chmod to 777

DWard 09-23-2004 04:51 PM

OK, try changing

$sgdver = 1;

to

$sgdver = 0;

traderx 09-23-2004 05:09 PM

ok... I have done that but nothing happened. Could you please take a look at my code and let me know if I have missed/done something wrong. I have checked with my host and I am running gd 2.01. (though below I still have it set to '0' in the script.

Code:

<?php

// #######################################################################
// #######################################################################
// ##                                                                          ##
// ##                            SIGNATURE STATS V3.04                            ##
// ##                        ----------------------------                          ##
// ##                                By Dan Ward                                    ##
// ##                          www.collegepranks.co.uk                            ##
// ##                                                                  ##
// #######################################################################
// #######################################################################
// ########### developed from tkeil69575's script for 2.3.x ##############

// ####################### 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 ############################
// #######################################################################

//////////////////////////////////////////////////////////////////////////
//
// Instructions
// ============
//
// Edit the 'ENTER DATABASE INFORMATION' and 'ENTER IMAGE INFORMATION' sections
// then edit the 'OUTPUT TEXT' and 'TEXT FORMATTING' sections
//
//////////////////////////////////////////////////////////////////////////

// #################### ENTER DATABASE INFORMATION #######################
//DB-Servername
$host = "localhost";

//DB-Username
$user= "jaxen_4xtrader";

//DB-Password
$password= "xxxxx";

//vbulletin database name
$database="jaxen_forum";

//E-Mail Address where MySQL Error Messages are sent to
$adminemail = "collb@jaxen.com";

// ###################### ENTER IMAGE INFORMATION #########################

//Width of banner image
$width = 425;

//Height of banner image
$height = 82;

//Left text-margin
$left = 13;

//text-margin from top
$top = 70;

//Font Size
$fontsize = 7;

//If you have GD2 or higher set $sgdver to 1, for any older GD version set $sgdver to 0
$sgdver = 0;

//If you wish to use a TrueType font set $ttfe to 1, for default php font set $ttfe to 0
$ttfe = 0;

//If you wish to use a TrueType font, please enter the location to the .ttf file below
$ttff = "verdana.ttf";

//Line-spacing of text
$zeilenabstand = 15;

//full path to empty signature image (input image)
$vorlagedatei = "/home/jaxen/public_html/4xtraders/forum/images/sig.jpg";

//full path to signare image with forum data (output image)
$ausgabedatei = "/home/jaxen/public_html/4xtraders/forum/images/signature.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);
                }
        }

        // memory saving

        $activeusers = substr($activeusers , 2); // get rid of initial comma

        $DB_site->free_result($loggedins);

        $totalonline = $numberregistered + $numberguest;

//////////////////////////////////////////////////////////////////////////////////////////////////

// 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 text
$output = "Members: $numbermembers Threads: $totalthreads Posts: $totalposts Online: $totalonline";

$vorlage = imagecreatefromjpeg("$vorlagedatei");

if ($sgdver == "1")
{
$img = imagecreatetruecolor($width,$height);
} else {
$img = imagecreate($width,$height);
}

// ########################## TEXT FORMATTING ############################

// A PNG uses ImageColorAllocate instead of ImageColorClosest like jpeg uses

//EDIT: Background/Transparency Colour (not really seen)
$bg_color = imagecolorallocate ($img, 250, 250, 250);

//EDIT: Text Colour
$text_color = imagecolorallocate ($img, 19, 36, 161);

// ######################### DO NOT EDIT BELOW ############################

imagefilledrectangle ($img, 0, 0, $width, $height, $bg_color);
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)){

if ($ttfe == "1")
{
imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, $ttff, $output);
} else {
imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color);
}
$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
?>

Thank you
Coll


All times are GMT. The time now is 07:23 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.01855 seconds
  • Memory Usage 1,938KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete