diff --git a/page.tgz b/page.tgz new file mode 100644 index 00000000..ade28eb2 Binary files /dev/null and b/page.tgz differ diff --git a/page/page.php b/page/page.php new file mode 100755 index 00000000..584ac556 --- /dev/null +++ b/page/page.php @@ -0,0 +1,60 @@ + + * 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("Community Pages").'

+
"; + if (sizeof($contacts) > 0) + $a->page['aside'] = $page . $a->page['aside']; +} +?> diff --git a/smiley_pack.tgz b/smiley_pack.tgz index be092b08..23528119 100644 Binary files a/smiley_pack.tgz and b/smiley_pack.tgz differ