Request: Christian Gamers Alliance signature image (for other forums)

Plankeye, I can send you a zipped file with all those images if you would like it as well. Just PM me with an email address you want them sent to.
 
Thanks for sending the images Arkanjel. I also had some success getting true type fonts to include in the image verses the GD fonts. Here is Sirius's background with a more gaming feel of font:

http://www.shooksweb.com/development/cga/signature/image.php?m=Tek7&s=00

The backgrounds range from 00-07 right now incase anyone is interested in playing around with it.

Here is my todo list to get this in place:
  • Assign font, font color and position for every type of background
  • hook into the CGA main site's member DB
  • create either a phpNuke module or custom page to allow a member to select their preferred sig
  • See what kind of additional font formatting I can accomplish
  • Get a vBulletin custom code setup for the CGA sigs

What I would like is some suggestions for fonts for the various images. The crackman (pacman) plays very well with the theme of CGA. If you have any other suggestions, please post them along with a link to the True Type Font.
 
Plankeye said:
Thanks for sending the images Arkanjel. I also had some success getting true type fonts to include in the image verses the GD fonts. Here is Sirius's background with a more gaming feel of font:

http://www.shooksweb.com/development/cga/signature/image.php?m=Tek7&s=00

The backgrounds range from 00-07 right now incase anyone is interested in playing around with it.

Here is my todo list to get this in place:
  • Assign font, font color and position for every type of background
  • hook into the CGA main site's member DB
  • create either a phpNuke module or custom page to allow a member to select their preferred sig
  • See what kind of additional font formatting I can accomplish
  • Get a vBulletin custom code setup for the CGA sigs

What I would like is some suggestions for fonts for the various images. The crackman (pacman) plays very well with the theme of CGA. If you have any other suggestions, please post them along with a link to the True Type Font.

That font ROCKS!
 
I like Sirius's background but I don't really like the font. Is there a way to select different fonts like the different backgrounds? I'd like to see it with a black font that stays within the lines. Cool idea. :D
 
astrod00d said:
I like Sirius's background but I don't really like the font. Is there a way to select different fonts like the different backgrounds? I'd like to see it with a black font that stays within the lines. Cool idea. :D

Sirius said:
yea i dont favor the font either :-/

Thanks for actually reading my post...
 
ok well i took over this porgect and i wilol need a little help go to http://www.grsites.com/fonts/
and post you the fonts you like the best
right now i have 7 images and 1 fount right now i would love to have atlest 7 founts so there will be 49 diffrent ones
after i get the code worked out i will get write the page so all you have to do is hit a button
 
i got all the files tek sent me and ftped them but when i go online and type in thw wors they dont show up i think it might be the .hta files
 
Could it maybe the fact that there is a apache web server running? I know you asked me that. This company uses linux fedora core machines for its hosting, apache web server is the most likely used.
 
ok well i have finaly had time to work on it. i still cant get it to work and i havent talked to plank in forever.
 
alright well i have time agen and il be working on it


edit: i could use planky's help a little to dubble cheek some stuff
 
Last edited:
here is the code that makes the font work with TTF files
Code:
<?php

    // CGA Signature Image Creation Script 
     
    header("Content-type: image/png"); 
    if (!$_GET["m"]) { 
        $string = "Plankeye"; 
    } else { 
        $string = $_GET["m"]; 
    } 
    $im = imagecreatefrompng("sigs.png"); 
    $colorWhite = imagecolorallocate($im, 255, 255, 255); 
    $px = (imagesx($im) - 8 * strlen($string)) / 2; 
	imagettftext($im,30,0,$px,65,$colorWhite,"/fonts/lud.ttf",$string);
    imagepng($im); 
    imagedestroy($im); 

?>

i used ludcia unicode for the real image i made, the only thing that i can't get working now is that $px, its not putting the text nicly in the middle.
http://www.allthingschrist.org/Wallpapers/sigs/sig.php
 
It looks just like a math issue. What if you try this?
PHP:
<?php

    // CGA Signature Image Creation Script 
     
    header("Content-type: image/png"); 
    if (!$_GET["m"]) { 
        $string = "Plankeye"; 
    } else { 
        $string = $_GET["m"]; 
    } 
    $im = imagecreatefrompng("sigs.png"); 
    $colorWhite = imagecolorallocate($im, 255, 255, 255); 
    // SirThom's edit on next line
    $px = (imagesx($im) - (8 * strlen($string))) / 2; 
	imagettftext($im,30,0,$px,65,$colorWhite,"/fonts/lud.ttf",$string);
    imagepng($im); 
    imagedestroy($im); 

?>
 
here is the code i have and plankeye sent i cant evan get aneything to show up

Code:
<?

	// CGA Signature Image Creation Script
	
	// set the header type
	header("Content-type: image/png");
	
	// imagettftextalign (php.net comments from imagettftext)
	function imagettftextalign($image, $size, $angle, $x, $y, $color, $font, $text, $alignment='L') {
		// check width of the text
		$bbox = imagettfbbox ($size, $angle, $font, $text);
		$textWidth = $bbox[2] - $bbox[0];
		switch ($alignment) {
			case "R":
			$x -= $textWidth;
			break;
		case "C":
			$x -= $textWidth / 2;
			break;
		}
		
		//write text
		imagettftext ($image, $size, $angle, $x, $y, $color, $font, $text);
	}
	
	// configuration settings for backgrounds
	$signatureConfig = array(
		// Background => True Type Font Name, Font Size, Font Angle, Font Red, Font Green, Font Blue, Alignment, X Position, Vertical Alignment, Y Position
		"00" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60),
		"01" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60),
		"02" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60),
		"03" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60),
		"04" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60),
		"05" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60),
		"06" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60),
		"07" => array("font" => "crackman", "size" => 24, "angle" => 0, "r" => 255, "g" => 255, "b" => 255, "align" => "C", "x" => 0, "valign" => "", "y" => 60)
	);
	
	// pull in the member information
	if (!$_GET["m"]) {
		$string = "Unkown Player";
	} else {
		$string = $_GET["m"];
	}
	
	// pull in the preferred signature background
	if (!$_GET["s"]) {
		$background = "00";
	} else {
		$background = $_GET["s"];
		// check real quick to make sure the selected background exists
		if(!$signatureConfig[$background])
			$background = "00";
	}
	
	$im = imagecreatefrompng("./backgrounds/signature$background.png");
	$color = imagecolorallocate($im, $signatureConfig[$background]["r"], $signatureConfig[$background]["g"], $signatureConfig[$background]["b"]);
	$px = (imagesx($im) - 24 * strlen($string)) / 2;
	//$font = imageloadfont("./fonts/crackman.ttf");
	//imagestring($im, 5, $px, 43, $string, $colorWhite);
	imagettftext($im, 24, 0, $px, 60, $color, "./fonts/crackman.ttf", $string);
	imagepng($im);
	imagedestroy($im);

?>
 
Here's a banner from a different forum i use...

chickenbanner18et.jpg
 
would java applets be able to do this? Cause i've programmed similar java web applets.

Example java applet code, i'm not sure how I would do the name change, but it may be do able, as in I can make a string variable that is non static and pass in arguments to output the correct font on a background, and the applets could be inbedded in sigs in HTML from a central webhost area.



I dont know if it will work, what does our code experts say? Or am I the only one with java programming experience? o_O I can try to program a applet for this, but no guarentees.
PHP:
import java.awt.*;
import javax.swing.JApplet;

public class BarChart extends JApplet
{
	int total;
	int airPlane = 280;
	int hotel = 420;
	double airPlanePercent;
	double hotelPercent;
	
	public void init()
	{
		//calculate the total BarChart
		total = airPlane + hotel;
		//calculate the percentages for each item
		airPlanePercent = 100.0 * airPlane / total;
		hotelPercent = 100.0 * hotel / total;
	}
	public void paint (Graphics g)
	{
		//print the title
		g.setColor(Color.red);
		g.drawString("Vacation Expenses", 30, 50);
		
		//draw the bar chart
		g.setColor(Color.black);
		g.drawString("Airplane " + airPlanePercent + "%", 25, 85);
		g.setColor(Color.blue);
		g.fillRect(145, 70, (int)(4 * airPlanePercent), 20);
		g.setColor(Color.black);
		g.drawString("HOtel " + hotelPercent + "%", 25, 115);
		g.setColor(Color.blue);
		g.fillRect(145, 100, (int)(4 * hotelPercent), 20);
	}
}

With this code

PHP:
<applet code="http://www.compmil.com/cga/BarChart.class" height="300" width="300"></applet>
 
Last edited:
Back
Top