]> git.mxchange.org Git - friendica.git/blob - view/theme/diabook-blue/theme.php
add links to home, profile, photos, events, notes to aside in network-stream
[friendica.git] / view / theme / diabook-blue / theme.php
1 <?php
2
3 /*
4  * Name: Diabook-blue
5  * Description: Diabook-blue: report bugs and request here: http://pad.toktan.org/p/diabook or contact me : thomas_bierey@friendica.eu
6  * Version: 
7  * Author: 
8  */
9
10 $a->theme_info = array(
11   'extends' => 'diabook',
12 );
13
14 //profile_side
15
16
17
18 $nav['usermenu']=array();
19 $userinfo = null;
20
21 if(local_user()) {
22         
23
24
25 $r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($a->user['uid']));
26                 
27 $userinfo = array(
28                         'icon' => (count($r) ? $r[0]['micro']: $a->get_baseurl()."/images/default-profile-mm.jpg"),
29                         'name' => $a->user['username'],
30                 );      
31         
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
38
39 if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) {
40 $tpl = get_markup_template('profile_side.tpl');
41
42 $a->page['aside'] .= replace_macros($tpl, array(
43                 '$userinfo' => $userinfo,
44                 '$ps' => $ps,
45         ));
46 }
47 }
48
49 //js scripts
50 $a->page['htmlhead'] .= <<< EOT
51
52 <script>
53
54 //contacts
55 $('html').click(function() {
56  $('#nav-contacts-linkmenu').removeClass('selected');
57  document.getElementById( "nav-contacts-menu" ).style.display = "none";
58  });
59  
60  $('#nav-contacts-linkmenu').click(function(event){
61      event.stopPropagation();
62  });
63
64 //messages
65 $('html').click(function() {
66  $('#nav-messages-linkmenu').removeClass('selected');
67  document.getElementById( "nav-messages-menu" ).style.display = "none";
68  });
69
70  $('#nav-messages-linkmenu').click(function(event){
71      event.stopPropagation();
72  });
73
74 //notifications
75 $('html').click(function() {
76  $('#nav-notifications-linkmenu').removeClass('selected');
77  document.getElementById( "nav-notifications-menu" ).style.display = "none";
78  });
79
80  $('#nav-notifications-linkmenu').click(function(event){
81      event.stopPropagation();
82  });
83
84 //usermenu
85 $('html').click(function() {
86  $('#nav-user-linkmenu').removeClass('selected');
87  document.getElementById( "nav-user-menu" ).style.display = "none";
88  });
89
90  $('#nav-user-linkmenu').click(function(event){
91      event.stopPropagation();
92  });
93  
94  //settingsmenu
95  $('html').click(function() {
96  $('#nav-site-linkmenu').removeClass('selected');
97  document.getElementById( "nav-site-menu" ).style.display = "none";
98  });
99
100  $('#nav-site-linkmenu').click(function(event){
101      event.stopPropagation();
102  });
103  //appsmenu
104  $('html').click(function() {
105  $('#nav-apps-link').removeClass('selected');
106  document.getElementById( "nav-apps-menu" ).style.display = "none";
107  });
108
109  $('#nav-apps-link').click(function(event){
110      event.stopPropagation();
111  });
112  
113  $(function() {
114         $('a.lightbox').fancybox(); // Select all links with lightbox class
115 });
116
117  
118  </script>
119 EOT;