07.01.2010, 12:42
seltsamm jetzt sehe ich sie auch und wie kann ich den hintergrund ändern
also ich meine das ich ein Bild ansteller der Farbe habe
also ich meine das ich ein Bild ansteller der Farbe habe
<?php
/**
* MyBB Statistic Signature Variant By Ooka and querschlaeger
*/
// Here you can set some parameters
$backgroundimage='./images/mybbsig.png';
$cachefile='./cache/statsig.cache'; // normally don't touch
$cachegap=600; // how many seconds should cache file life?
// If no cache file exists or it't too old we have to create it
if(!file_exists($cachefile)||(time()-filemtime($cachefile))>=$cachegap){
// First we do the MyBB part
define('IN_MYBB',1);
define('NO_ONLINE',1);
require_once './global.php';
$lang->load('stats');
$stats=$cache->read('stats');
// Then we create the image
$img=imagecreatefrompng($backgroundimage);
$fontcolor=imagecolorallocate($img,200,200,200);
imagestring($img,2,110,45, "Bordgründungstag hier eintragen",$fontcolor);
imagestring($img,2,200,45,utf8_decode($lang->members).' '.$stats['numusers'],$fontcolor);
imagestring($img,2,110,65,utf8_decode($lang->threads).' '.$stats['numthreads'],$fontcolor);
imagestring($img,2,200,65,utf8_decode($lang->posts).' '.$stats['numposts'],$fontcolor);
// imagestring($img,2,50,40,utf8_decode($mybb->settings['bbname']).' - '.$mybb->settings['bburl'],$fontcolor);
imagepng($img,$cachefile,9);
imagedestroy($img);
}
// Yeah, finally we just load the cache file and die
header('Content-type: image/png');
header('Last-Modified: '.gmdate('r',filemtime($cachefile)));
header('Expires: '.gmdate('r',time()+$cachegap));
die(file_get_contents($cachefile));
?>
imagestring($img,2,450,20,utf8_decode($lang->username).' '.$mybb->user['username'],$fontcolor);
<?php
/**
* MyBB Statistic Signature Variant By Ooka and querschlaeger
*/
// Here you can set some parameters
$backgroundimage='./images/xtreme/signature.png';
$cachefile='./cache/statsig.cache'; // normally don't touch
$cachegap=0; // how many seconds should cache file life?
// If no cache file exists or it't too old we have to create it
if(!file_exists($cachefile)||(time()-filemtime($cachefile))>=$cachegap){
// First we do the MyBB part
define('IN_MYBB',1);
define('NO_ONLINE',1);
require_once './global.php';
$lang->load('stats');
$stats=$cache->read('stats');
$uid = intval($mybb->input['uid']);
$query = $db->simple_select("users", "username", "uid='$uid'");
$result = $db->fetch_array($query);
// Then we create the image
$img=imagecreatefrompng($backgroundimage);
$fontcolor=imagecolorallocate($img,200,200,200);
imagestring($img,2,450,20,utf8_decode($lang->username).' '.$result['username'],$fontcolor);
imagestring($img,2,110,45, "15.12.2010",$fontcolor);
imagestring($img,2,200,45,utf8_decode($lang->members).' '.$stats['numusers'],$fontcolor);
imagestring($img,2,110,65,utf8_decode($lang->threads).' '.$stats['numthreads'],$fontcolor);
imagestring($img,2,200,65,utf8_decode($lang->posts).' '.$stats['numposts'],$fontcolor);
// imagestring($img,2,50,40,utf8_decode($mybb->settings['bbname']).' - '.$mybb->settings['bburl'],$fontcolor);
imagepng($img,$cachefile,9);
imagedestroy($img);
}
// Yeah, finally we just load the cache file and die
header('Content-type: image/png');
header('Last-Modified: '.gmdate('r',filemtime($cachefile)));
header('Expires: '.gmdate('r',time()+$cachegap));
die(file_get_contents($cachefile));
?>