Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Chat Status 1.0 Beta 6

edited June 2007 in Vanilla 1.0 Help
Base on the Chat Status 1.0 Beta 5, I add QQ network status. First,Open the StatusUtil.php, and add following function above the code "?>": function GetQQStatus( $uin ) { $reques = "GET /pa?p=1:".$uin.":1 HTTP/1.1\r\n"; $reques .= "Host: wpa.qq.com\r\n"; $reques .= "User-Agent: PHP_QQ_SPY\r\n\r\n"; if ( !( $socket = socket_create( AF_INET, SOCK_STREAM, SOL_TCP ) ) ) return(-1); if ( !( socket_connect( $socket, "wpa.qq.com", 80 ) ) ) return(-1); if ( !( socket_write( $socket, $reques ) ) ) return(-1); if ( !( $respon = socket_read( $socket, 1024, PHP_BINARY_READ ) ) ) return(-1);; socket_close( $socket ); $field = explode( "\r\n", $respon ); for ( $i=0; $i<count($field); $i++ ) { if ( strncasecmp($field[$i], "Location:", 9) == 0 ) { if ( strpos( $field[$i], "online") ) { $ret = 1; } else if ( strpos( $field[$i], "offline") ) { $ret = 0; } else { $ret = -1; } // if break; } // if } // for return( $ret ); } Second,Open the default.php at line 38, add this $Context->Configuration['CUSTOMIZATION_QQ_UIN'] = ''; at line 44,add these $Context->Dictionary['CUSTOMIZATION_QQ_UIN'] = 'QQ'; $Context->Dictionary['CUSTOMIZATION_QQ_UIN_DESCRIPTION'] = 'If you provide your QQ, your online status will automatically be displayed on your profile page.'; at line 53,add this $Context->Dictionary['Chat_QQStatus'] = 'QQ Status'; at line 144,add these $SN = $Account->User->Customization('CUSTOMIZATION_QQ_UIN'); if ($SN != '') { $Status = GetQQStatus($SN); switch ($Status) { case -1: $K = 'Chat_Unknown'; $C = 'Unknown'; break; case 0: $K = 'Chat_Offline'; $C = 'Offline'; break; case 1: $K = 'Chat_Online'; $C = 'Online'; break; } PrintChatStatus($Account->Context, 'Chat_QQStatus', ('<a href="tencent://message/?uin=' . $SN . '&Site=tvplay.info&Menu=yes">' . $SN . '</a>'), $K, $C); } Now, you can enjoy it!
This discussion has been closed.