]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/diabook/theme.php
Merge remote branch 'upstream/master'
[friendica.git] / view / theme / diabook / theme.php
index 1617dd7f0ab01be0507e58f8fae54e9f3ea6f95d..39479ce522269e8db387c17aaebb5cfbf9d29213 100755 (executable)
@@ -11,12 +11,43 @@ $a->theme_info = array(
   'extends' => 'diabook',
 );
 
-$a->page['htmlhead'] .= <<< EOT
+//profile_side
+
+
+
+$nav['usermenu']=array();
+$userinfo = null;
 
+if(local_user()) {
+       
 
-<script type="text/javascript" src="view/theme/diabook/lightbox/js/jquery.lightbox-0.5.js"></script>
-<link rel="stylesheet" type="text/css" href="view/theme/diabook/lightbox/css/jquery.lightbox-0.5.css" media="screen" />
 
+$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>
 
@@ -80,7 +111,7 @@ $('html').click(function() {
  });
  
  $(function() {
-       $('a.lightbox').lightBox(); // Select all links with lightbox class
+       $('a.lightbox').fancybox(); // Select all links with lightbox class
 });