本外掛不可以用中文,
但可以從圖片中改~
以下我試過用的免費空間(應該其他都可以,但我沒試):
host.sk
開一個新signature.php:
代碼: 選擇全部
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
Header("Content-type: image/PNG");
//如果要用中文請delete以下10至26行的"//"和修改一些?#123;式.....
//我只試過可以用utf-8印出來,但轉不到中文.......
// /* need iconv module */
//
// function big52uni($text) {
// $rtext="";
// $max=strlen($text);
// for($i=0;$i<$max;$i++){
// $h=ord($text[$i]);\r
// if($h>=160 && $i<$max-1){
// $rtext.="&#".base_convert(bin2hex(iconv("big5","ucs-2",
// substr($text,$i,2))),16,10).";";
// $i++;
// }else{
// $rtext.=$text[$i];
// }
// }
// return $rtext;
// }
//Mowd(TM) 計數器專用 如果you沒有請把下四行注解
$time=time()-10800;
$sql="SELECT time FROM stat WHERE time > $time";
$result=mysql_query($sql);
$stat=mysql_num_rows($result);
// Get basic (usernames + totals) online
// situation
//
$user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = " . intval($forum_id) : '';
$sql = "SELECT u.username, u.user_id, s.session_logged_in, 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
ORDER BY u.username ASC, s.session_ip ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}
$logged_online = 0;
$prev_user_id = 0;
while( $row = $db->sql_fetchrow($result) )
{
// User is logged in and therefor not a guest
if ( $row['session_logged_in'] )
{
// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
{
$logged_online++;
}
$prev_user_id = $row['user_id'];
}
}
$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'];
}
$total_users = get_db_stat('usercount');
$total_posts = get_db_stat('postcount');
$total_topics = get_db_stat('topiccount');
if(getenv('HTTP_CLIENT_IP')) {
$onlineip = getenv('HTTP_CLIENT_IP');
} elseif(getenv('HTTP_X_FORWARDED_FOR')) {
$onlineip = getenv('HTTP_X_FORWARDED_FOR');
} elseif(getenv('REMOTE_ADDR')) {
$onlineip = getenv('REMOTE_ADDR');
} else {
$onlineip = $HTTP_SERVER_VARS['REMOTE_ADDR'];
}
$currenttime = date("d-m-Y d M Y A");
$im = @imagecreatefromgif("statspng.gif");
$white = ImageColorAllocate($im, 255,255,255);
$black = ImageColorAllocate($im, 0,0,0);
//imagestring($im, 3, 160, 2, $stat, $black); //要有Mowd(TM) 計數器\r
//imagestring($im, 3, 160, 3, $stat, $black); //要有Mowd(TM) 計數器\r
//imagestring($im, 3, 159, 1, $stat, $white); //要有Mowd(TM) 計數器,如沒有,請把下3行的注解取消
//imagestring($im, 3, 160, 2, 'Unknow', $black); //要有Mowd(TM) 計數器,如有,請把上3行的注解取消
//imagestring($im, 3, 160, 3, 'Unknow', $black); //要有Mowd(TM) 計數器\r
//imagestring($im, 3, 159, 1, 'Unknow', $white); //要有Mowd(TM) 計數器\r
imagestring($im, 3, 160, 17, $total_posts, $black); //your論壇總篇數\r
imagestring($im, 3, 160, 18, $total_posts, $black); //your論壇總篇數\r
imagestring($im, 3, 159, 16, $total_posts, $white); //your論壇總篇數\r
imagestring($im, 3, 160, 32, $total_users, $black); //your論壇總會員數\r
imagestring($im, 3, 160, 33, $total_users, $black); //your論壇總會員數\r
imagestring($im, 3, 159, 31, $total_users, $white); //your論壇總會員數\r
imagestring($im, 3, 287, 2, $onlineip, $black); //訪客ip
imagestring($im, 3, 287, 3, $onlineip, $black); //訪客ip
imagestring($im, 3, 286, 1, $onlineip, $white); //訪客ip
imagestring($im, 3, 287, 17, $logged_online, $black); //your論壇在線人數\r
imagestring($im, 3, 287, 18, $logged_online, $black); //your論壇在線人數\r
imagestring($im, 3, 286, 16, $logged_online, $white); //your論壇在線人數\r
imagestring($im, 3, 287, 32, $currenttime, $black); //日期
imagestring($im, 3, 287, 33, $currenttime, $black); //日期
imagestring($im, 3, 286, 31, $currenttime, $white); //日期
imagestring($im, 3, 135, 48, 'http://tytsim.host.sk/bbs/index.php', $black); //修改your網?#125;
imagestring($im, 3, 135, 49, 'http://tytsim.host.sk/bbs/index.php', $black); //修改your網?#125;
imagestring($im, 3, 134, 47, 'http://tytsim.host.sk/bbs/index.php', $white); //修改your網?#125;
imagestring($im, 3, 410, 48, 'by tytsim', $black); //by (your名字 only english)
imagestring($im, 3, 410, 49, 'by tytsim', $black); //by (your名字 only english)
imagestring($im, 3, 409, 47, 'by tytsim', $white); //by (your名字 only english)
ImagePNG($im);
ImageDestroy($im);
?>

範例:
http://tytsim.host.sk/bbs/signature.php