...

View Full Version : Resolved Re-Code this file to allow for text shadowing.



MoreBloodWine
04-02-2011, 09:50 PM
1) Payment method/ details (Paypal, check? Timeline?): PayPal

2) Payment Amount: To be discussed (tight budget).

3) Project Details: (be as specific as possible):

First and foremost... please be sure to reply here or PM me to discuss the amount to be paid, Ty.

Now for the job at hand.

I would like to take this: text-shadow: 1px 1px 1px black, 0 0 1em black, 0 0 0.2em black;

And apply it to the below code so all text is effectively shadowed except for the following lines: 76, 77, 82, 83, 84, 107, 110, 117, 128, 129, 130, 131 & 132 which means the shadowing should only be applied to lines 89, 90, 91, 94, 96, 97 & 98.


<?php
$skin = $_GET['sig'];

mini_gen($skin);

function imagettftextalign($image, $size, $angle, $x, $y, $color, $font, $text, $alignment='L'){

$bbox = imagettfbbox ($size, $angle, $font, $text);
$textWidth = $bbox[2] - $bbox[0];
switch ($alignment) {
case "R":
$x -= $textWidth;
break;
case "C":
$x -= $textWidth / 2;
break;
}

imagettftext ($image, $size, $angle, $x, $y, $color, $font, $text);

}

function mini_gen($skin){

global $U2STATS, $siteURL, $fullPath;

$im = @imagecreatefrompng('./sigtemplates/'.$skin);

if(!$im)
die('Error: Cannot find sig template: /sigtemplates/'.$skin);

imagealphablending($im, true);
imagesavealpha($im, true);
$white = imagecolorallocate($im, 255, 255, 255);

$font = 'CALIBRI.TTF';
$font2 = 'CALIBRIB.TTF';

$U2STATS['trophy']['avatar'] = 'WWS_A-A0025';

$U2STATS['psn'] = 'EXAMPLE';
$U2STATS['level'] = '8';
$U2STATS['funds'] = '$37,750';
$U2STATS['hero'] = 'Sev';
$U2STATS['villain'] = 'Chimera Hybrid';
$U2STATS['kills'] = '45';
$U2STATS['deaths'] = '201';
$U2STATS['kdr'] = '0.22';
$U2STATS['bestscore'] = '6';
$U2STATS['games'] = '21';
$U2STATS['wins'] = '7';
$U2STATS['losses'] = '14';
$U2STATS['assists'] = '17';

$U2STATS['mostwep']['name'] = '92FS-9mm';
$U2STATS['mostwep']['url'] = 'http://www.naughtydog.com/images/weapons/92FS-9mm.jpg';
$U2STATS['mostwep2']['name'] = 'AK-47';
$U2STATS['mostwep2']['url'] = 'http://www.naughtydog.com/images/weapons/Gun-AK47.jpg';

$U2STATS['gametype'] = 'Chain Reaction';
$U2STATS['gametype_url'] = 'http://www.naughtydog.com/images/gametypes/territory-3.gif';

$U2STATS['mostboost']['url'] = 'http://www.naughtydog.com/images/boosts/accuracy-aim-longgun.jpg';
$U2STATS['mostboost2']['url'] = 'http://www.naughtydog.com/images/boosts/ammo-clip.jpg';

$U2STATS['trophy']['plat'] = '1';
$U2STATS['trophy']['gold'] = '1';
$U2STATS['trophy']['silver'] = '2';
$U2STATS['trophy']['bronze'] = '19';
$U2STATS['trophy']['total'] = '23';

$fileava = str_replace("/", "-", $U2STATS['trophy']['avatar']);
$ava = imagecreatefrompng('./cache/avatars/'.$fileava.'.png');
imagecopy($im, $ava, 6, 6, 0, 0, 30, 30);

imagettftext($im, 9.00, 0, 418, 120, $white, $font2, 'Hosted By:');
imagettftext($im, 9.00, 0, 447, 129, $white, $font2, 'myu2sig.com');

// imagettftext($im, 10.50, 0, 70, 78, $white, $font, 'Most Used Weapons');
// imagettftext($im, 10.50, 0, 255, 78, $white, $font, 'Most Played / Used Boosters');

imagettftext($im, 10.50, 0, 44, 12, $white, $font, 'ID: ' . $U2STATS['psn']);
imagettftext($im, 10.50, 0, 44, 25, $white, $font, 'Level: ' . $U2STATS['level']);
imagettftext($im, 10.50, 0, 44, 38, $white, $font, 'Funds: ' . $U2STATS['funds']);

imagettftext($im, 10.50, 0, 7, 62, $white, $font, 'Hero: ' . $U2STATS['hero']);
imagettftext($im, 10.50, 0, 7, 76, $white, $font, 'Villain: ' . $U2STATS['villain']);

imagettftext($im, 10.50, 0, 193, 12, $white, $font, 'Kills: ' . $U2STATS['kills']);
imagettftext($im, 10.50, 0, 193, 25, $white, $font, 'Deaths: ' . $U2STATS['deaths']);
imagettftext($im, 10.50, 0, 193, 38, $white, $font, 'KDR: ' . $U2STATS['kdr']);
// imagettftext($im, 10.50, 0, 190, 48, $white, $font, 'Best Score: ' . $U2STATS['bestscore']);

imagettftext($im, 10.50, 0, 193, 51, $white, $font, 'Last Played: Feb. 12th 2010');

imagettftext($im, 10.50, 0, 313, 12, $white, $font, 'Games: ' . $U2STATS['games']);
imagettftext($im, 10.50, 0, 313, 25, $white, $font, 'Wins: ' . $U2STATS['wins']);
imagettftext($im, 10.50, 0, 313, 38, $white, $font, 'Losses: ' . $U2STATS['losses']);
// imagettftext($im, 10.50, 0, 310, 48, $white, $font, 'Assists: ' . $U2STATS['assists']);

$filemostwep1 = str_replace("http://www.naughtydog.com/images/weapons/", "", $U2STATS['mostwep']['url']);
$mostwep1 = imagecreatefromjpeg('./cache/mostimg/'.$filemostwep1);
$filemostwep2 = str_replace("http://www.naughtydog.com/images/weapons/", "", $U2STATS['mostwep2']['url']);
$mostwep2 = imagecreatefromjpeg('./cache/mostimg/'.$filemostwep2);

imagecopy($im, $mostwep1, 2, 83, 0, 0, 124, 40);
imagettftextalign($im, 10.50, 0, 58, 129, $white, $font, $U2STATS['mostwep']['name'], 'C');

imagecopy($im, $mostwep2, 127, 83, 0, 0, 124, 40);
imagettftextalign($im, 10.50, 0, 190, 129, $white, $font, $U2STATS['mostwep2']['name'], 'C');


$filemostgamet = str_replace("http://www.naughtydog.com/images/gametypes/", "", $U2STATS['gametype_url']);
$gametype = imagecreatefromgif('./cache/mostimg/'.$filemostgamet);

imagecopy($im, $gametype, 264, 83, 0, 0, 70, 40);
imagettftextalign($im, 10.50, 0, 299, 129, $white, $font, $U2STATS['gametype'], 'C');

$filemostboost1 = str_replace("http://www.naughtydog.com/images/boosts/", "", $U2STATS['mostboost']['url']);
$boost1 = imagecreatefromjpeg('./cache/mostimg/'.$filemostboost1);
$filemostboost2 = str_replace("http://www.naughtydog.com/images/boosts/", "", $U2STATS['mostboost2']['url']);
$boost2 = imagecreatefromjpeg('./cache/mostimg/'.$filemostboost2);

imagecopy($im, $boost1, 347, 85, 0, 0, 62, 21);
imagecopy($im, $boost2, 347, 107, 0, 0, 62, 21);


imagettftext($im, 9.50, 0, 475, 13, $white, $font, $U2STATS['trophy']['plat']);
imagettftext($im, 9.50, 0, 470, 29, $white, $font, $U2STATS['trophy']['gold']);
imagettftext($im, 9.50, 0, 465, 45, $white, $font, $U2STATS['trophy']['silver']);
imagettftext($im, 9.50, 0, 460, 61, $white, $font, $U2STATS['trophy']['bronze']);
imagettftext($im, 9.50, 0, 455, 77, $white, $font, $U2STATS['trophy']['total']);

// imagettftext($im, 9.00, 0, 411, 87, $white, $font, '23x23');
// http://us.playstation.com/publictrophy/index.htm?onlinename=c_seerden/trophies/581961-Uncharted-2-Among-Thieves

header('Content-type: image/png');
imagepng($im);
imagepng($im, './preview/'.$skin);
imagedestroy($ava);
imagedestroy($mostwep1);
imagedestroy($mostwep2);
imagedestroy($gametype);
imagedestroy($boost1);
imagedestroy($boost2);
imagedestroy($im);

}

?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum