* based on pages plugin by * Author: Michael Vogel * */ function page_install() { register_hook('page_end', 'addon/page/page.php', 'page_page_end'); } function page_uninstall() { unregister_hook('page_end', 'addon/page/page.php', 'page_page_end'); } function page_getpage($uid) { $pagelist = array(); $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", intval($uid) ); $page = array(); // Look if the profile is a community page foreach($contacts as $contact) { $page[] = array("url"=>$contact["url"], "name"=>$contact["name"], "id"=>$contact["id"], "micro"=>$contact['micro']); } return($page); } function page_page_end($a,&$b) { // Only move on if if it's the "network" module and there is a logged on user if (($a->module != "network") OR ($a->user['uid'] == 0)) return; $page = '

'.t("Forums").'

"; if (sizeof($contacts) > 0) $a->page['aside'] = $page . $a->page['aside']; } ?>