Integration of lightIRC with your website/message board/blog

Passing parameters from the query string

Rename your index.html to index.php and keep everything else intact. Use this snippet in your index file instead of the original JavaScript block to parse custom parameters from the query string (like index.php?nick=test) but to use all other parameters from your config.js:

<script type="text/javascript">
    <?php
        foreach($_GET as $key => $value) {
            echo "params.".htmlentities($key)." = \"".htmlentities($value)."\";\n";
        }
    ?>
    swfobject.embedSWF("lightIRC.swf", "lightIRC", "100%", "100%", "10.0.0", "expressInstall.swf", params);
</script>

Passing the nickname from phpBB 3

Rename your config.js to config.php and use the following code snippet. Remember to adjust the path to your config in the index.html file. Be also sure to copy your other parameters inside.

<?php

define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);

$user->session_begin();
$auth->acl($user->data);
header('Content-type: text/javascript');

?>

params.nick = "<?=$user->data['username']?>";

... other parameters

Passing the nickname from myBB

Please see this myBB mod: http://community.mybb.com/mods.php?action=view&pid=130

Rename your config.js to config.php and use the following code snippet. Remember to adjust the path to your config in the index.html file. Be also sure to copy your other parameters inside.
You have to adjust the path to global.php inside the myBB folder.

<?php

define("IN_MYBB", 1);
include("path/to/your/global.php");
header('Content-type: text/javascript');

?>

params.nick = "<?=(($mybb->user['uid'] > 0) ? $mybb->user['username'] : "Guest_%")?>";

... other parameters

Passing the nickname from Wordpress

See #512

Passing the nickname from SocialEngine

External link