diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-05 16:55:40 +0200 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-09-05 16:55:40 +0200 |
commit | 08e54234e30c10e3130b7d71caba9fd43e3593e3 (patch) | |
tree | dd9242b14387c833346f4172e3f190659db56ff7 /boot.php | |
parent | c7a9b1ae32675ce1035834c3a6a64465adf1b5b1 (diff) | |
download | volse-hubzilla-08e54234e30c10e3130b7d71caba9fd43e3593e3.tar.gz volse-hubzilla-08e54234e30c10e3130b7d71caba9fd43e3593e3.tar.bz2 volse-hubzilla-08e54234e30c10e3130b7d71caba9fd43e3593e3.zip |
profiles popup menu in sidebar
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -860,9 +860,36 @@ function profile_sidebar($profile, $block = 0) { $connect = False; - // show edit to yourself + // show edit profile to yourself if ($profile['uid'] == local_user()) { $profile['edit'] = array($a->get_baseurl(). '/profiles', t('Profiles'),"", t('Manage/edit profiles')); + + $r = q("SELECT * FROM `profile` WHERE `uid` = %d", + local_user()); + + $profile['menu'] = array( + 'chg_photo' => t('Change profile photo'), + 'cr_new' => t('Create New Profile'), + 'entries' => array(), + ); + + if(count($r)) { + + foreach($r as $rr) { + $profile['menu']['entries'][] = array( + 'photo' => $rr['thumb'], + 'id' => $rr['id'], + 'alt' => t('Profile Image'), + 'profile_name' => $rr['profile-name'], + 'visible' => (($rr['is-default']) ? '<strong>' . t('visible to everybody') . '</strong>' + : '<a href="' . $a->get_baseurl() . '/profperm/' . $rr['id'] . '" />' . t('Edit visibility') . '</a>') + ); + } + + + } + + } |