
Ich habe mir einen Banner für die Signatur gemacht (für phpbb3), funktioniert auch soweit schon wie ich will, ich hätte nur gerne noch die Anzahl der User die gerade online sind mit drin. Ich habe mit den Code für die " wer ist online" Box im Portal und in der index.php angesehen aber wirklich geholfen hat das nicht.
Also das sieht jetzt so aus:
[ externes Bild ]
Und mein Code:
Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path = './../';
include($phpbb_root_path . 'common.'.$phpEx);
$sql = "SELECT t.topic_title, p.post_time
FROM (" . TOPICS_TABLE . " t, " . POSTS_TABLE . " p)
LEFT JOIN " . FORUMS_TABLE . " f
ON t.forum_id = f.forum_id
WHERE p.post_id = t.topic_last_post_id
ORDER BY t.topic_last_post_id DESC LIMIT 0,1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t retrieve Topic_id data', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result))
{
$latest_topic = $row['topic_title'];
}
$sql= "SELECT *
FROM phpbb_arcade_games
WHERE game_id <> 0 ";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t retrieve game data', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result))
{
$games = $row['game_id'];
}
$image = "../sis.gif/signature.png";
$im = imagecreatefrompng($image);
$tc = ImageColorAllocate ($im, 0, 0, 0);
$red = ImageColorAllocate ($im, 255, 153, 0);
$blue = ImageColorAllocate ($im, 0, 102, 153);
$newest_user = $newest_userdata['username'];
ImageString($im, 3, 148, 2, 'Forumstatistik: @ ' .$config['sitename'], $tc);
ImageString($im, 3, 278, 2, "$sitename", $blue);
ImageString($im, 2, 148, 15, 'Mitglieder : ' . $config['num_users'] , $tc);
ImageString($im, 2, 148, 25, "Letztes Thema:", $tc);
ImageString($im, 2, 238, 25, "$latest_topic", $blue);
ImageString($im, 2, 148, 35, 'Wir haben ' . $config['num_posts'] . ' Beiträge in ' . $config['num_topics']. ' Themen', $tc);
ImageString($im, 2, 300, 45, "Neuester User:", $tc);
ImageString($im, 2, 385, 45, "$newest_user" . $config['newest_username'], $blue);
ImageString($im, 2, 148, 45, "Spiele Installiert:", $tc);
ImageString($im, 2, 264, 45, "$games", $blue);
header("Content-Type: image/png");
Imagepng($im);
ImageDestroy ($im);
?>