#1 (permalink)  
Alt 13.07.2004, 10:11
Erfahrener Benutzer
 
Registriert seit: 12.09.2003
Beiträge: 110
Standard

Hallo, ich habe folgende Idee, aber ein paar Probleme.
Ich habe in meiner language.conf einen Eintrag Shopname hinzugef?gt.

Jetzt m?chte ich auf der Startseite ein nettes Bildchen generieren, auf dem man
den Namen des Shops sieht. Gut finde ich das Beispiel von XAMP:
Das Coole ist, dass es gut aussieht und man beliebige tft Fonts benutzen kann!

Code:
<?
$text={#Shopname#};
if($egal==0)
	{
 if($art==0)$art=rand(1000,9999);
 $artn=rand(1000,9999);
?>
<html>
<head>
<body>
<img src="iart.php?egal=<? echo $art;?>&text=<?=urlencode($text)?>>"> 
</body>

</html>
<?
	exit;
	}

	$fontfile=".\AnkeCalligraph.TTF";

	$size=0;
	$h=100;
	$w=1024;

	$im = ImageCreate ( $w, $h );

	//$fill = ImageColorAllocate ( $im , 251, 121, 34 );  
	//$light = ImageColorAllocate ( $im, 255, 255, 255 );  
	//$corners = ImageColorAllocate ( $im , 153 , 153 , 102 );  
	//$dark = ImageColorAllocate ( $im , 51, 51 , 0 );  
	//$black = ImageColorAllocate ( $im , 0, 0 , 0 );  

	$colors[1] = ImageColorAllocate ( $im , 255 , 255 , 255 );  
	$colors[2] = ImageColorAllocate ( $im , 255*0.95 , 255*0.95 , 255*0.95 );  
	$colors[3] = ImageColorAllocate ( $im , 255*0.9 , 255*0.9 , 255*0.9 );  
	$colors[4] = ImageColorAllocate ( $im , 255*0.85 , 255*0.85 , 255*0.85 );  

	header("Content-Type: image/png");  

	srand($egal);
	$c=1;
	$anz=80;
	$step=4/$anz;
	for($i=0;$i<$anz;$i+=1)
	{
 $size=rand(1,40);
 $x=rand(-390,390);
 $y=rand(-100,400);
 $color=$colors[$c];
 $c+=$step;
 ImageTTFText ($im, $size, 0, $x, $y, $color, $fontfile, $text);
	}

	ImageLine ( $im , 0 ,0, $w-1, 0, $light );  
	ImageLine ( $im , 0 ,0, 0, $h-2, $light );  
	ImageLine ( $im , $w-1,0, $w-1, $h, $dark );  
	ImageLine ( $im , 0 ,$h-1, $w-1, $h-1, $dark );  
	ImageSetPixel ( $im , 0 ,$h-1, $corners );  
	ImageSetPixel ( $im , $w-1 ,0, $corners );  

	ImagePNG ( $im );
?>
Wenn ich den Code jetzt in die index.html des templates einbinde bekomme ich einen Smarty Fehler :-(
Vielleicht kann mir jemand dabei helfen ?
Wenn es fertig ist, bin ich nat?rlich auch bereit es der Community zur Verf?gung zu stellen.
Lieber Gru?
Sven
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 13.07.2004, 10:12
Benutzerbild von mzanier
xt:Commerce GmbH, Geschäftsführung
 
Registriert seit: 18.04.2003
Beiträge: 27.414
Standard

b?de frage, aber f?r was soll das gut sein ? =)
__________________
xt:Commerce Helpdesk
xt:Commerce Blog

xt:Commerce Warenwirtschaft

###

Offene Stellen bei xt:Commerce!
xt:Commerce stellt ein
###
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 13.07.2004, 10:22
Erfahrener Benutzer
 
Registriert seit: 12.09.2003
Beiträge: 110
Standard

Hmm, damit k?nnte man eine z.B. 50x200 gro?e Box mit dem Namen des Shops einbauen. Welchen man ganz oben anstelle des XT-Commerce Logos einbauen k?nnte.
Da muss man dann nur in der language.conf den Shopnamen angeben und hat dann ein Logo in der jeweiligen Sprache.
Das sieht irgendwie auch gut aus, da der Text einpaar mal in 4 verschiedenen Farben und an randomisierten Stellen ausgegeben wird.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
bild, generieren, shopname

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 09:28 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand