5 * Description: Diabook: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
10 $a->theme_info = array(
11 'extends' => 'diabook',
18 $nav['usermenu']=array();
25 $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
28 'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"),
29 'name' => $a->user['username'],
32 $ps['usermenu'][status] = Array('profile/' . $a->user['nickname'], t('Home'), "", t('Your posts and conversations'));
33 $ps['usermenu'][profile] = Array('profile/' . $a->user['nickname']. '?tab=profile', t('Profile'), "", t('Your profile page'));
34 $ps['usermenu'][photos] = Array('photos/' . $a->user['nickname'], t('Photos'), "", t('Your photos'));
35 $ps['usermenu'][events] = Array('events/', t('Events'), "", t('Your events'));
36 $ps['usermenu'][notes] = Array('notes/', t('Personal notes'), "", t('Your personal photos'));
37 $ps['usermenu'][community] = Array('community/', t('Community'), "", "");
39 if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) {
40 $tpl = get_markup_template('profile_side.tpl');
42 $a->page['aside'] .= replace_macros($tpl, array(
43 '$userinfo' => $userinfo,
50 $a->page['htmlhead'] .= <<< EOT
55 $('html').click(function() {
56 $('#nav-contacts-linkmenu').removeClass('selected');
57 document.getElementById( "nav-contacts-menu" ).style.display = "none";
60 $('#nav-contacts-linkmenu').click(function(event){
61 event.stopPropagation();
65 $('html').click(function() {
66 $('#nav-messages-linkmenu').removeClass('selected');
67 document.getElementById( "nav-messages-menu" ).style.display = "none";
70 $('#nav-messages-linkmenu').click(function(event){
71 event.stopPropagation();
75 $('html').click(function() {
76 $('#nav-notifications-linkmenu').removeClass('selected');
77 document.getElementById( "nav-notifications-menu" ).style.display = "none";
80 $('#nav-notifications-linkmenu').click(function(event){
81 event.stopPropagation();
85 $('html').click(function() {
86 $('#nav-user-linkmenu').removeClass('selected');
87 document.getElementById( "nav-user-menu" ).style.display = "none";
90 $('#nav-user-linkmenu').click(function(event){
91 event.stopPropagation();
95 $('html').click(function() {
96 $('#nav-site-linkmenu').removeClass('selected');
97 document.getElementById( "nav-site-menu" ).style.display = "none";
100 $('#nav-site-linkmenu').click(function(event){
101 event.stopPropagation();
104 $('html').click(function() {
105 $('#nav-apps-link').removeClass('selected');
106 document.getElementById( "nav-apps-menu" ).style.display = "none";
109 $('#nav-apps-link').click(function(event){
110 event.stopPropagation();
114 $('a.lightbox').fancybox(); // Select all links with lightbox class