]> git.mxchange.org Git - friendica-addons.git/blob - irc/irc.php
Merge pull request #16 from CatoTH/master
[friendica-addons.git] / irc / irc.php
1 <?php
2 /**
3 * Name: IRC Chat Plugin
4 * Description: add an Internet Relay Chat chatroom
5 * Version: 1.0
6 * Author: tony baldwin <http://tonybaldwin.me>
7 */
8
9
10 function irc_install() {
11 register_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
12 }
13
14 function irc_uninstall() {
15 unregister_hook('app_menu', 'addon/irc/irc.php', 'irc_app_menu');
16
17 }
18
19 function irc_app_menu($a,&$b) {
20 $b['app_menu'][] = '<div class="app-title"><a href="irc">' . t('irc Chatroom') . '</a></div>';
21 }
22
23
24 function irc_module() {
25 return;
26 }
27
28
29 function irc_content(&$a) {
30
31 $baseurl = $a->get_baseurl() . '/addon/irc';
32 $o = '';
33
34
35  // add the chatroom frame and some html
36   $o .= <<< EOT
37 <h2>IRC chat</h2>
38 <iframe src="http://webchat.freenode.net?channels=friendica" width="600" height="600"></iframe>
39 EOT;
40
41 return $o;
42     
43 }
44
45