*/ function mibbit_install() { register_hook('app_menu', 'addon/mibbit/mibbit.php', 'mibbit_app_menu'); } function mibbit_uninstall() { unregister_hook('app_menu', 'addon/mibbit/mibbit.php', 'mibbit_app_menu'); } function mibbit_app_menu($a,&$b) { $b['app_menu'][] = '
' . t('Mibbit IRC Chatroom') . '
'; } function mibbit_module() { return; } function mibbit_content(&$a) { $baseurl = $a->get_baseurl() . '/addon/mibbit'; $o = ''; // this stuff is supposed to go in the page header $a->page['htmlhead'] .= 'session_start(); $nick = empty($_SESSION[\'user_name\']) ? \'Wdg\' : $_SESSION[\'user_name\']; $server = \"irc.mibbit.net\"; // default: $room = \"friendica\"; // w/o # or %23 ! $uri = \"https://widget.mibbit.com/\" . \"?nick=$nick_%3F%3F\" . // each %3F(=?) will be replaced by a random digit \"&customprompt=Welcome%20to%20$server/$room\" . \"&customloading=maybe%20you%20need%20to%20close%20other%20Mibbit%20windows%20first...\" . \"&settings=c76462e5055bace06e32d325963b39f2\"; // etc. if (!empty($room)) {$uri .= \'&channel=%23\' . $room;} if (!empty($server )) {$uri .= \'&server=\' . $server;}' // add the chatroom frame and some html $o .= '

chat

'; $o .= '
'; $o .= ''; $o .= '
(no spaces, interpunctuation or leading ciphers in your /nick name)'; $o .= '

type /help to learn about special commands

'; $o .= '

' }