https://wiki.mibbit.com/api.php?action=feedcontributions&user=221.135.120.154&feedformat=atomMibbit Wiki - User contributions [en-gb]2024-03-29T12:35:31ZUser contributionsMediaWiki 1.31.5https://wiki.mibbit.com/index.php?title=Widget:Advanced_iframe&diff=1139Widget:Advanced iframe2008-05-03T11:15:23Z<p>221.135.120.154: </p>
<hr />
<div>here an example how to integrate a chat window into your site (stored as "myMibbit.php"):<br />
<nowiki><br />
<?PHP<br />
// default: irc.mibbit.com <br />
$server = 'www.hrindian.com'; <br />
$room = 'my_room'; // w./o. # or %23 !<br />
$uri = 'http://embed.mibbit.com/'<br />
. '?forcePrompt=true&nick=prefix_' . mt_rand(10000, 99999)<br />
. '&needSendButton=true' // some mobile phones need it<br />
. '&tabFontFamily=verdana,sans-serif'<br />
. '&chatOutputShowTimes=true'; // type /dset for more settings<br />
if (!empty($room)) {$uri .= '&channel=%23' . $room;} <br />
if (!empty($server )) {$uri .= '&server=' . $server;} <br />
?><html><br />
<head><title>my chat on <?php echo empty($server) ? 'irc.mibbit.com' : $server; ?></title><br />
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/><br />
<style><br />
body{font:93% verdana,sans-serif;background:#999;color:#fff;}<br />
iframe{width:96%;height:75% /* % doesn't work in strict mode*/;}<br />
</style><br />
</head><br />
<body><center><br />
<h3>IRC server: <?php echo empty($server) ? 'irc.mibbit.com' : $server; ?></h3><br />
(start channel: <?php echo empty($room) ? '#chat' : '#' . $room; ?>)<br />
<iframe src="<?PHP echo $uri; ?>" frameborder="0"></iframe><br />
[Your user agent does not support frames or is currently configured<br />
not to display frames. However, you may want to open the<br />
<A href="<?PHP echo $uri; ?>"<br />
target="_blank"> chat in a new browser window ...</A>]<br />
</iframe><br />
<br>(no spaces, interpunctuation or leading ciphers in your /nick name)<br />
<h4>type /help to learn about available commands</h4><br />
</center></body></html><br />
</nowiki><br />
if you link/open this in a new window you avoid unintentional leaving the chat when hitting the back button/key:<br />
<nowiki><a href="myMibbit.php" target="_blank">myMibbit</a></nowiki><br />
-- [[User:HerculeP|HerculeP]] March 2008</div>221.135.120.154