Mod for use in phpBB3
Download link:
gagalive_phpbb3_1_1.zip
To use a secure chat room allowing nick linkage to phpBB and specify admins who have IP ban/kick access etc
Create a secure chat room and recieve an authorization key using Create/manage secure chat room
Open: includes/functions.php
FIND:
header('Pragma: no-cache');
ADD AFTER
// !!!S START OF GAGALIVE CHAT MOD
// Modify options below
// chatroom: Chatroom name
// enter alphanumeric name for chat room and chat room creation will be instaneous
// secure chat rooms(room name start with ~) allow nick linkage with membership system and for security require authorization key
// secure chat rooms require creation at http://www.gagalive.com
$chatroom = "Chatroom Name";
// roomkey: Secure chat room authorization key
// use only when using secure chat rooms that start with ~, otherwise leave blank
$roomkey = "";
// gagaadmin: Chat room administrator IDs here. For multiple adminstrators seperate with ,(commas)
// only available when using secure chat rooms that start with ~, otherwise leave blank
$gagaadmin = "";
// heightz: Height of chat room in pixels
$heightz = 100;
// End of options
$gagaadmin = preg_replace('/\s*,\s*/', ',', $gagaadmin);
$gagaadmins = split(',', $gagaadmin);
$userz = $user->data['username'];
$usernickz = $user->data['username'];
function userKey($user, $roomKey)
{
return md5(md5($user . $roomKey) . $roomKey);
}
$userkey = userKey($usernickz, $roomkey);
foreach($gagaadmins as $value)
{
if($userz == $value)
{
$userkey = userKey(userKey($usernickz, $roomkey),$roomkey);
}
}
$usernickz = urlencode($usernickz);
$chatroom=urlencode($chatroom);
if($user->data['user_id'] != ANONYMOUS)
{
$chathtml = '<center>quality\',\'high\',\'pluginspage\',\'http://www.macromedia.com/go/getflashplayer\',\'movie\',\'http://en.gagalive.com/livechat1?&chatroom='.$chatroom.'&user='.$usernickz.'&encrypt='.$userkey.'\' );</script><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%>" height='.$heightz.'" title="Gagalive LiveChat"> <param name="movie" value="http://en.gagalive.com/livechat1.swf?&chatroom='.$chatroom.'&user='.$usernickz.'&encrypt='.$userkey.'"><param name="quality" value="high"><embed src="http://en.gagalive.com/livechat1.swf?&chatroom='.$chatroom.'&user='.$usernickz.'&encrypt='.$userkey.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="'.$heightz.'"></embed></object></center>';
}
else
{
$chathtml = '<center><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%>" height='.$heightz.'" title="Gagalive LiveChat"> <param name="movie" value="http://en.gagalive.com/livechat1.swf?&chatroom='.$chatroom.'"><param name="quality" value="high"><embed src="http://en.gagalive.com/livechat1.swf?&chatroom='.$chatroom.'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="100%" height="'.$heightz.'"></embed></object></center>';
}
$template->assign_vars(array(
'SITE_DESCRIPTION' => $config['site_desc'] . $chathtml
));
// !!!END OF GAGALIVE CHAT MOD