From 42462cc1f00cd0d2e637ff3ddb62b30ae4a645c6 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Wed, 14 Mar 2012 12:50:11 +0100 Subject: add links to home, profile, photos, events, notes to aside in network-stream --- view/theme/diabook/profile_side.tpl | 19 ++++++++++++++++++ view/theme/diabook/style.css | 40 ++++++++++++++++++++++++++++++++++--- view/theme/diabook/theme.php | 37 ++++++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 view/theme/diabook/profile_side.tpl (limited to 'view/theme/diabook') diff --git a/view/theme/diabook/profile_side.tpl b/view/theme/diabook/profile_side.tpl new file mode 100644 index 000000000..595684bf5 --- /dev/null +++ b/view/theme/diabook/profile_side.tpl @@ -0,0 +1,19 @@ +
+ + + + +
+ + \ No newline at end of file diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css index 9edd989b0..df692cbc6 100644 --- a/view/theme/diabook/style.css +++ b/view/theme/diabook/style.css @@ -863,7 +863,42 @@ ul.menu-popup .empty { padding: 7px 7px 0px 0px; } - +/*profile_side*/ +#profile_side { + margin-bottom: 30px; +} +#ps-usericon{ + height: 25px + } +#ps-username{ + font-size: 1.17em; + font-weight: bold; + vertical-align: top; + position: absolute; + padding-top: 4px; + padding-left: 5px; + color: #2D2D2D; + } +#ps-username:hover{ + text-decoration: none; + } +.menu-profile-side{ + list-style: none; + padding-left: 16px; + min-height: 16px; + } +.menu-profile-list{ + height: auto; + overflow: auto; + padding-top: 3px; + padding-bottom: 3px; + } +.menu-profile-list:hover{ + background: #EEE; + } +.menu-profile-list-item:hover{ + text-decoration: none; + } /* aside */ aside { @@ -2346,5 +2381,4 @@ float: left; #photos-upload-newalbum-div { float: left; width: 175px; -} - +} \ No newline at end of file diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 5d3c2906d..9b3ed30b0 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -11,6 +11,43 @@ $a->theme_info = array( 'extends' => 'diabook', ); +//profile_side + + + +$nav['usermenu']=array(); +$userinfo = null; + +if(local_user()) { + + + +$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid'])); + +$userinfo = array( + 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"), + 'name' => $a->user['username'], + ); + +$ps['usermenu'][status] = Array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations')); +$ps['usermenu'][profile] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page')); +$ps['usermenu'][photos] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos')); +$ps['usermenu'][events] = Array('events/', t('Events'), "", t('Your events')); +$ps['usermenu'][notes] = Array('notes/', t('Personal notes'), "", t('Your personal photos')); + + +if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) { +$tpl = get_markup_template('profile_side.tpl'); + +$a->page['aside'] .= replace_macros($tpl, array( + '$userinfo' => $userinfo, + '$ps' => $ps, + )); +} +} + +//js script + $a->page['htmlhead'] .= <<< EOT