aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook/theme.php
blob: 9093ac2ca229abe9497a5ca3c19c77e27d817fc9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php

/*
 * Name: Diabook-blue
 * Description: Diabook-blue: 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',
);

//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'));
$ps['usermenu'][community] = Array('community/', t('Community'), "", "");

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 scripts
$a->page['htmlhead'] .= <<< EOT

<script>

//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();
 });
 //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() {
	$('a.lightbox').fancybox(); // Select all links with lightbox class
});

 
 </script>
EOT;