2012-03-09 12:15:27 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Name: Diabook
|
|
|
|
* Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
|
|
|
|
* Version:
|
|
|
|
* Author:
|
|
|
|
*/
|
|
|
|
|
|
|
|
$a->theme_info = array(
|
|
|
|
'extends' => 'diabook',
|
|
|
|
);
|
|
|
|
|
2012-03-14 07:50:11 -04:00
|
|
|
//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
|
|
|
|
|
2012-03-09 12:15:27 -05:00
|
|
|
$a->page['htmlhead'] .= <<< EOT
|
2012-03-12 16:09:16 -04:00
|
|
|
|
2012-03-09 12:15:27 -05:00
|
|
|
<script>
|
2012-03-10 07:22:41 -05:00
|
|
|
|
2012-03-09 12:15:27 -05:00
|
|
|
//contacts
|
|
|
|
$('html').click(function() {
|
|
|
|
$('#nav-contacts-linkmenu').removeClass('selected');
|
|
|
|
document.getElementById( "nav-contacts-menu" ).style.display = "none";
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#nav-contacts-linkmenu').click(function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
//messages
|
|
|
|
$('html').click(function() {
|
|
|
|
$('#nav-messages-linkmenu').removeClass('selected');
|
|
|
|
document.getElementById( "nav-messages-menu" ).style.display = "none";
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#nav-messages-linkmenu').click(function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
//notifications
|
|
|
|
$('html').click(function() {
|
|
|
|
$('#nav-notifications-linkmenu').removeClass('selected');
|
|
|
|
document.getElementById( "nav-notifications-menu" ).style.display = "none";
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#nav-notifications-linkmenu').click(function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
//usermenu
|
|
|
|
$('html').click(function() {
|
|
|
|
$('#nav-user-linkmenu').removeClass('selected');
|
|
|
|
document.getElementById( "nav-user-menu" ).style.display = "none";
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#nav-user-linkmenu').click(function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
//settingsmenu
|
|
|
|
$('html').click(function() {
|
|
|
|
$('#nav-site-linkmenu').removeClass('selected');
|
|
|
|
document.getElementById( "nav-site-menu" ).style.display = "none";
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#nav-site-linkmenu').click(function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
});
|
2012-03-12 16:09:16 -04:00
|
|
|
//appsmenu
|
|
|
|
$('html').click(function() {
|
|
|
|
$('#nav-apps-link').removeClass('selected');
|
|
|
|
document.getElementById( "nav-apps-menu" ).style.display = "none";
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#nav-apps-link').click(function(event){
|
|
|
|
event.stopPropagation();
|
|
|
|
});
|
|
|
|
|
|
|
|
$(function() {
|
2012-03-12 19:04:19 -04:00
|
|
|
$('a.lightbox').fancybox(); // Select all links with lightbox class
|
2012-03-12 16:09:16 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
2012-03-09 12:15:27 -05:00
|
|
|
EOT;
|