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'));
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,
51 $a->page['htmlhead'] .= <<< EOT
56 $('html').click(function() {
57 $('#nav-contacts-linkmenu').removeClass('selected');
58 document.getElementById( "nav-contacts-menu" ).style.display = "none";
61 $('#nav-contacts-linkmenu').click(function(event){
62 event.stopPropagation();
66 $('html').click(function() {
67 $('#nav-messages-linkmenu').removeClass('selected');
68 document.getElementById( "nav-messages-menu" ).style.display = "none";
71 $('#nav-messages-linkmenu').click(function(event){
72 event.stopPropagation();
76 $('html').click(function() {
77 $('#nav-notifications-linkmenu').removeClass('selected');
78 document.getElementById( "nav-notifications-menu" ).style.display = "none";
81 $('#nav-notifications-linkmenu').click(function(event){
82 event.stopPropagation();
86 $('html').click(function() {
87 $('#nav-user-linkmenu').removeClass('selected');
88 document.getElementById( "nav-user-menu" ).style.display = "none";
91 $('#nav-user-linkmenu').click(function(event){
92 event.stopPropagation();
96 $('html').click(function() {
97 $('#nav-site-linkmenu').removeClass('selected');
98 document.getElementById( "nav-site-menu" ).style.display = "none";
101 $('#nav-site-linkmenu').click(function(event){
102 event.stopPropagation();
105 $('html').click(function() {
106 $('#nav-apps-link').removeClass('selected');
107 document.getElementById( "nav-apps-menu" ).style.display = "none";
110 $('#nav-apps-link').click(function(event){
111 event.stopPropagation();
115 $('a.lightbox').fancybox(); // Select all links with lightbox class