diff options
author | tomtom84 <63dc41d76451@ba77e90e49a6.anonbox.net> | 2012-03-24 23:50:05 -0700 |
---|---|---|
committer | tomtom84 <63dc41d76451@ba77e90e49a6.anonbox.net> | 2012-03-24 23:50:05 -0700 |
commit | 1b8ac30fae55ff842d7f34fa2d9086d42cc421f1 (patch) | |
tree | c9f41313380ffcc44f1da7ce89c638e30ba07548 /view/theme/diabook/theme.php | |
parent | ea29a26059aaca1792e512530bbfab8e0532c6fb (diff) | |
parent | 329a26d62ee65322d0227504b87c3c5ebb1ee480 (diff) | |
download | volse-hubzilla-1b8ac30fae55ff842d7f34fa2d9086d42cc421f1.tar.gz volse-hubzilla-1b8ac30fae55ff842d7f34fa2d9086d42cc421f1.tar.bz2 volse-hubzilla-1b8ac30fae55ff842d7f34fa2d9086d42cc421f1.zip |
Merge pull request #165 from tomtom84/master
fixes in diabook-derivates
Diffstat (limited to 'view/theme/diabook/theme.php')
-rwxr-xr-x | view/theme/diabook/theme.php | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index adf31746f..29cc64c18 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -18,6 +18,9 @@ $cssFile = null; /** * prints last community activity */ + + + function diabook_community_info(){ $a = get_app(); //right_aside at networkpages @@ -139,12 +142,49 @@ function diabook_community_info(){ $aside['$fostitJS'] = $fostitJS; + //Community Page + $page = '<div id="page-sidebar-right_aside" class="widget"> + <div class="title tool"> + <h3>'.t("Community Pages").'</h3></div> + <div id="sidebar-page-list"><ul>'; + + $pagelist = array(); + + $contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact` + WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d", + intval($a->user['uid']) + ); + + $pageD = array(); + + // Look if the profile is a community page + foreach($contacts as $contact) { + $pageD[] = array("url"=>$contact["url"], "name"=>$contact["name"], "id"=>$contact["id"], "micro"=>$contact['micro']); + }; + + + $contacts = $pageD; + + foreach($contacts as $contact) { + $page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" style="float: left; margin-right: 3px;" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" style="margin-top: 2px;" title="' . $contact['url'] . '" class="label" target="external-link">'. + $contact["name"]."</a></li>"; + } + $page .= '</ul></div></div>'; + if (sizeof($contacts) > 0) + + $aside['$page'] = $page; + //END Community Page + + $url = $a->get_baseurl($ssl_state); $aside['$url'] = $url; $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); $a->page['right_aside'] = replace_macros($tpl, $aside); + + + } @@ -167,7 +207,7 @@ if ($a->argv[0] === "network"){ $ps['usermenu']['events'] = Array('events/', t('Events'), "", t('Your events')); $ps['usermenu']['notes'] = Array('notes/', t('Personal notes'), "", t('Your personal photos')); $ps['usermenu']['community'] = Array('community/', t('Community'), "", ""); - $ps['usermenu']['pgroups'] = Array('http://dir.friendika.com/directory/forum', t('Public Groups'), "", ""); + $ps['usermenu']['pgroups'] = Array('http://dir.friendica.com/directory/forum', t('Public Groups'), "", ""); $tpl = get_markup_template('profile_side.tpl'); |