add_hook("showthread_start", "threadavatar_show"); function threadavatar_info() { return array( "name" => "Thread avatar", "description" => "Pokazuje awatar autora wÄ…tku", "website" => "http://www.mybboard.pl", "author" => "Matslom", "authorsite" => "http://www.matslom.pl", "version" => "1.0", "guid" => "*", "compatibility" => "18*" ); } function threadavatar_activate() { } function threadavatar_deactivate() { } function threadavatar_show() { global $threadavatar, $tid, $db; $query = $db->query("SELECT u.avatar FROM ".TABLE_PREFIX."users u LEFT JOIN ".TABLE_PREFIX."threads t ON t.uid=u.uid WHERE t.tid = ".$tid); $avatar = $db->fetch_array($query); $threadavatar = format_avatar($avatar['avatar']); }