gibts denn dieses Signaturbildchen auch schon für PHP5 ? Meins will nu runter PHP4 ... hier mal der Code meines Bildchens :
Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Get basic (usernames + totals) online
// situation
//
$user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = " . intval($forum_id) : '';
$sql = "SELECT u.user_id, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
AND s.session_time >= ".( time() - 300 ) . "
$user_forum_sql";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}
$total_online_users = 0;
$prev_user_ip = '';
while( $row = $db->sql_fetchrow($result) )
{
if ( $row['session_ip'] != $prev_session_ip )
{
$total_online_users++;
}
}
$sql = 'SELECT max(topic_id)
FROM ' . TOPICS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Couldn\'t retrieve max of Topic_id data', '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result))
{
$max_topic_id = $row['max(topic_id)'];
}
$sql = 'SELECT topic_title
FROM ' . TOPICS_TABLE . '
WHERE topic_id = ' . $max_topic_id;
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'];
// Laenge des letzten Topics begrenzen
if (strlen($latest_topic)>24) {
$latest_topic = substr($latest_topic,0,21) . '...';
}
}
$image = "../images/signature.png";
$im = imagecreatefrompng($image);
$tc = ImageColorAllocate ($im, 0, 0, 0);
$sitename = $board_config['sitename'];
$total_users = get_db_stat('usercount');
$total_posts = get_db_stat('postcount');
$total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
ImageString($im, 3, 4, 2, "Forenstatistik von MSTS-Page.de", $tc);
ImageString($im, 2, 4, 15, "Neuster User", $tc);
ImageString($im, 2, 78, 15, ":", $tc);
ImageString($im, 2, 87, 15, "$newest_user", $tc);
ImageString($im, 2, 4, 25, "Mitglieder ", $tc);
ImageString($im, 2, 78, 25, ":", $tc);
ImageString($im, 2, 87, 25, "$total_users , $total_online_users User Online", $tc);
ImageString($im, 2, 4, 35, "Gepostet", $tc);
ImageString($im, 2, 78, 35, ":", $tc);
ImageString($im, 2, 87, 35, "$total_posts Beiträge", $tc);
ImageString($im, 2, 4, 45, "Letzt. Thema", $tc);
ImageString($im, 2, 78, 45, ":", $tc);
ImageString($im, 2, 87, 45, "$latest_topic", $tc);
header("Content-Type: image/png");
Imagepng($im,'',100);
ImageDestroy ($im);
?>