Created
December 2, 2012 23:35
-
-
Save EricTendian/4191586 to your computer and use it in GitHub Desktop.
freenode IRC chat in MyBB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define("IN_MYBB", 1); //init mybb | |
require('global.php'); //make sure this is being executed in the same dir as global.php or change accordingly | |
if ($mybb->user['uid'] > 0) | |
{ | |
$uid = $mybb->user['uid']; | |
$user = get_user($uid); | |
$name = $user['username']; | |
} else $name = "anon".rand(1, 100); //since user is not logged in | |
?> | |
<iframe src="http://webchat.freenode.net?nick=<?php echo $name; ?>&channels=REPLACE_WITH_CHANNEL_NAME&uio=d4" width="647" height="400"></iframe> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment