From bf4dd8ad1701c79a3de097b2792fa8ae2fc673b4 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 23 Mar 2012 02:36:34 +0100 Subject: add right_aside to theme diabook --- view/theme/diabook/theme.php | 234 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 231 insertions(+), 3 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 39479ce52..25808d7e9 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -11,9 +11,10 @@ $a->theme_info = array( 'extends' => 'diabook', ); -//profile_side - +//profile_side at networkpages +if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) { +// $nav['usermenu']=array(); $userinfo = null; @@ -36,14 +37,241 @@ $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, )); + } + +//right_aside at networkpages + +// last 12 users + $aside['$lastusers_title'] = t('Last users'); + $aside['$lastusers_items'] = array(); + $sql_extra = ""; + $publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " ); + $order = " ORDER BY `register_date` DESC "; + + $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` + FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` + WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ", + 0, + 12 + ); + $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); + if(count($r)) { + $photo = 'thumb'; + foreach($r as $rr) { + $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); + $entry = replace_macros($tpl,array( + '$id' => $rr['id'], + '$profile-link' => $profile_link, + '$photo' => $rr[$photo], + '$alt-text' => $rr['name'], + )); + $aside['$lastusers_items'][] = $entry; + } + } + +// last 10 liked items + $aside['$like_title'] = t('Last likes'); + $aside['$like_items'] = array(); + $r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM + (SELECT `parent-uri`, `created`, `author-name` AS `liker`,`author-link` AS `liker-link` + FROM `item` WHERE `verb`='http://activitystrea.ms/schema/1.0/like' GROUP BY `parent-uri` ORDER BY `created` DESC) AS T1 + INNER JOIN `item` ON `item`.`uri`=`T1`.`parent-uri` + WHERE `T1`.`liker-link` LIKE '%s%%' OR `item`.`author-link` LIKE '%s%%' + GROUP BY `uri` + ORDER BY `T1`.`created` DESC + LIMIT 0,10", + $a->get_baseurl(),$a->get_baseurl() + ); + + foreach ($r as $rr) { + $author = '' . $rr['liker'] . ''; + $objauthor = '' . $rr['author-name'] . ''; + + //var_dump($rr['verb'],$rr['object-type']); killme(); + switch($rr['verb']){ + case 'http://activitystrea.ms/schema/1.0/post': + switch ($rr['object-type']){ + case 'http://activitystrea.ms/schema/1.0/event': + $post_type = t('event'); + break; + default: + $post_type = t('status'); + } + break; + default: + if ($rr['resource-id']){ + $post_type = t('photo'); + $m=array(); preg_match("/\[url=([^]]*)\]/", $rr['body'], $m); + $rr['plink'] = $m[1]; + } else { + $post_type = t('status'); + } + } + $plink = '' . $post_type . ''; + + $aside['$like_items'][] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); + + } +// last 12 photos + $aside['$photos_title'] = t('Last photos'); + $aside['$photos_items'] = array(); + $r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM + (SELECT `resource-id`, MAX(`scale`) as maxscale FROM `photo` + WHERE `profile`=0 AND `contact-id`=0 AND `album` NOT IN ('Contact Photos', '%s', 'Profile Photos', '%s') + AND `allow_cid`='' AND `allow_gid`='' AND `deny_cid`='' AND `deny_gid`='' GROUP BY `resource-id`) AS `t1` + INNER JOIN `photo` ON `photo`.`resource-id`=`t1`.`resource-id` AND `photo`.`scale` = `t1`.`maxscale`, + `user` + WHERE `user`.`uid` = `photo`.`uid` + AND `user`.`blockwall`=0 + ORDER BY `photo`.`edited` DESC + LIMIT 0, 12", + dbesc(t('Contact Photos')), + dbesc(t('Profile Photos')) + ); + if(count($r)) { + $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); + foreach($r as $rr) { + $photo_page = $a->get_baseurl() . '/photos/' . $rr['nickname'] . '/image/' . $rr['resource-id']; + $photo_url = $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] .'.jpg'; + + $entry = replace_macros($tpl,array( + '$id' => $rr['id'], + '$profile-link' => $photo_page, + '$photo' => $photo_url, + '$alt-text' => $rr['username']." : ".$rr['desc'], + )); + + $aside['$photos_items'][] = $entry; + } + } + + + $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); + $a->page['right_aside'] = replace_macros($tpl, $aside); + +} + +//right_aside at profile pages + +if($is_url = preg_match ("/\bprofile\b/i", $_SERVER['REQUEST_URI'])) { +//right_aside + +// last 12 users + $aside['$lastusers_title'] = t('Last users'); + $aside['$lastusers_items'] = array(); + $sql_extra = ""; + $publish = (get_config('system','publish_all') ? '' : " AND `publish` = 1 " ); + $order = " ORDER BY `register_date` DESC "; + + $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` + FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` + WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ", + 0, + 12 + ); + $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); + if(count($r)) { + $photo = 'thumb'; + foreach($r as $rr) { + $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']); + $entry = replace_macros($tpl,array( + '$id' => $rr['id'], + '$profile-link' => $profile_link, + '$photo' => $rr[$photo], + '$alt-text' => $rr['name'], + )); + $aside['$lastusers_items'][] = $entry; + } + } + +// last 10 liked items + $aside['$like_title'] = t('Last likes'); + $aside['$like_items'] = array(); + $r = q("SELECT `T1`.`created`, `T1`.`liker`, `T1`.`liker-link`, `item`.* FROM + (SELECT `parent-uri`, `created`, `author-name` AS `liker`,`author-link` AS `liker-link` + FROM `item` WHERE `verb`='http://activitystrea.ms/schema/1.0/like' GROUP BY `parent-uri` ORDER BY `created` DESC) AS T1 + INNER JOIN `item` ON `item`.`uri`=`T1`.`parent-uri` + WHERE `T1`.`liker-link` LIKE '%s%%' OR `item`.`author-link` LIKE '%s%%' + GROUP BY `uri` + ORDER BY `T1`.`created` DESC + LIMIT 0,10", + $a->get_baseurl(),$a->get_baseurl() + ); + + foreach ($r as $rr) { + $author = '' . $rr['liker'] . ''; + $objauthor = '' . $rr['author-name'] . ''; + + //var_dump($rr['verb'],$rr['object-type']); killme(); + switch($rr['verb']){ + case 'http://activitystrea.ms/schema/1.0/post': + switch ($rr['object-type']){ + case 'http://activitystrea.ms/schema/1.0/event': + $post_type = t('event'); + break; + default: + $post_type = t('status'); + } + break; + default: + if ($rr['resource-id']){ + $post_type = t('photo'); + $m=array(); preg_match("/\[url=([^]]*)\]/", $rr['body'], $m); + $rr['plink'] = $m[1]; + } else { + $post_type = t('status'); + } + } + $plink = '' . $post_type . ''; + + $aside['$like_items'][] = sprintf( t('%1$s likes %2$s\'s %3$s'), $author, $objauthor, $plink); + + } +// last 12 photos + $aside['$photos_title'] = t('Last photos'); + $aside['$photos_items'] = array(); + $r = q("SELECT `photo`.`id`, `photo`.`resource-id`, `photo`.`scale`, `photo`.`desc`, `user`.`nickname`, `user`.`username` FROM + (SELECT `resource-id`, MAX(`scale`) as maxscale FROM `photo` + WHERE `profile`=0 AND `contact-id`=0 AND `album` NOT IN ('Contact Photos', '%s', 'Profile Photos', '%s') + AND `allow_cid`='' AND `allow_gid`='' AND `deny_cid`='' AND `deny_gid`='' GROUP BY `resource-id`) AS `t1` + INNER JOIN `photo` ON `photo`.`resource-id`=`t1`.`resource-id` AND `photo`.`scale` = `t1`.`maxscale`, + `user` + WHERE `user`.`uid` = `photo`.`uid` + AND `user`.`blockwall`=0 + ORDER BY `photo`.`edited` DESC + LIMIT 0, 12", + dbesc(t('Contact Photos')), + dbesc(t('Profile Photos')) + ); + if(count($r)) { + $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); + foreach($r as $rr) { + $photo_page = $a->get_baseurl() . '/photos/' . $rr['nickname'] . '/image/' . $rr['resource-id']; + $photo_url = $a->get_baseurl() . '/photo/' . $rr['resource-id'] . '-' . $rr['scale'] .'.jpg'; + + $entry = replace_macros($tpl,array( + '$id' => $rr['id'], + '$profile-link' => $photo_page, + '$photo' => $photo_url, + '$alt-text' => $rr['username']." : ".$rr['desc'], + )); + + $aside['$photos_items'][] = $entry; + } + } + + + $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); + $a->page['right_aside'] = replace_macros($tpl, $aside); + } //js scripts -- cgit v1.2.3 From c35b9ec24f1449a691afeeb985a41fbaf07b2af1 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 23 Mar 2012 10:16:11 +0100 Subject: fix in css right_aside --- view/theme/diabook/theme.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 25808d7e9..feb140abb 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -274,9 +274,24 @@ if($is_url = preg_match ("/\bprofile\b/i", $_SERVER['REQUEST_URI'])) { } +//change css on network and profilepages +$cssFile = null; + +if($is_url = preg_match ("/\bnetwork\b/i", $_SERVER['REQUEST_URI'])) { + $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-network.css"; + } + +if($is_url = preg_match ("/\bprofile\b/i", $_SERVER['REQUEST_URI'])) { + $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-profile.css"; + } + + + //js scripts $a->page['htmlhead'] .= <<< EOT + + EOT; + -- cgit v1.2.3 From d76b052f90346b49d64aeef9024ab56f8be79f53 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 24 Mar 2012 04:05:21 +0100 Subject: add PostIt to right_aside, fixes in css --- view/theme/diabook/theme.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index b487b8f88..4600c92fb 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -130,6 +130,15 @@ function diabook_community_info(){ } } + $fostitJS = "javascript: (function() { + the_url = '".$a->get_baseurl($ssl_state)."/view/theme/diabook/fpostit/fpostit.php?url=' + encodeURIComponent(window.location.href) + '&title=' + encodeURIComponent(document.title) + '&text=' + encodeURIComponent(''+(window.getSelection ? window.getSelection() : document.getSelection ? document.getSelection() : document.selection.createRange().text)); + a_funct = function() { + if (!window.open(the_url, 'fpostit', 'location=yes,links=no,scrollbars=no,toolbar=no,width=600,height=300')) location.href = the_url}; + if (/Firefox/.test(navigator.userAgent)) {setTimeout(a_funct, 0)} + else {a_funct()}})()" ; + + $aside['$fostitJS'] = $fostitJS; + $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); $a->page['right_aside'] = replace_macros($tpl, $aside); -- cgit v1.2.3 From 378762fed21b4145db9a153489fc732a3d110ef5 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sat, 24 Mar 2012 06:17:14 +0100 Subject: add connectable services to right_aside --- view/theme/diabook/theme.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 4600c92fb..adf31746f 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -139,6 +139,8 @@ function diabook_community_info(){ $aside['$fostitJS'] = $fostitJS; + $url = $a->get_baseurl($ssl_state); + $aside['$url'] = $url; $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); $a->page['right_aside'] = replace_macros($tpl, $aside); -- cgit v1.2.3 From 329a26d62ee65322d0227504b87c3c5ebb1ee480 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 25 Mar 2012 08:47:17 +0200 Subject: move community_pages to right_aside, fixes in css --- view/theme/diabook/theme.php | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index adf31746f..29cc64c18 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -18,6 +18,9 @@ $cssFile = null; /** * prints last community activity */ + + + function diabook_community_info(){ $a = get_app(); //right_aside at networkpages @@ -139,12 +142,49 @@ function diabook_community_info(){ $aside['$fostitJS'] = $fostitJS; + //Community Page + $page = '
+
+

'.t("Community Pages").'

+
'; + if (sizeof($contacts) > 0) + + $aside['$page'] = $page; + //END Community Page + + $url = $a->get_baseurl($ssl_state); $aside['$url'] = $url; $tpl = file_get_contents(dirname(__file__).'/communityhome.tpl'); $a->page['right_aside'] = replace_macros($tpl, $aside); + + + } @@ -167,7 +207,7 @@ if ($a->argv[0] === "network"){ $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'), "", ""); - $ps['usermenu']['pgroups'] = Array('http://dir.friendika.com/directory/forum', t('Public Groups'), "", ""); + $ps['usermenu']['pgroups'] = Array('http://dir.friendica.com/directory/forum', t('Public Groups'), "", ""); $tpl = get_markup_template('profile_side.tpl'); -- cgit v1.2.3 From baeb7353153924489d8d79a36d9b21c28c5f2ac4 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Sun, 25 Mar 2012 19:43:42 +0200 Subject: small fixes --- view/theme/diabook/theme.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 29cc64c18..5b87e3142 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -36,7 +36,7 @@ function diabook_community_info(){ FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ", 0, - 12 + 9 ); $tpl = file_get_contents( dirname(__file__).'/directory_item.tpl'); if(count($r)) { @@ -64,7 +64,7 @@ function diabook_community_info(){ WHERE `T1`.`liker-link` LIKE '%s%%' OR `item`.`author-link` LIKE '%s%%' GROUP BY `uri` ORDER BY `T1`.`created` DESC - LIMIT 0,10", + LIMIT 0,5", $a->get_baseurl(),$a->get_baseurl() ); @@ -112,7 +112,7 @@ function diabook_community_info(){ AND `user`.`blockwall`=0 AND `user`.`hidewall`=0 ORDER BY `photo`.`edited` DESC - LIMIT 0, 12", + LIMIT 0, 9", dbesc(t('Contact Photos')), dbesc(t('Profile Photos')) ); @@ -189,7 +189,7 @@ function diabook_community_info(){ //profile_side at networkpages -if ($a->argv[0] === "network"){ +if ($a->argv[0] === "network" && local_user()){ // USER MENU if(local_user()) { @@ -251,6 +251,14 @@ $a->page['htmlhead'] .= <<< EOT $(function() { $('a.lightbox').fancybox(); // Select all links with lightbox class }); + + $(document).ready(function () +$('iframe').each(function() +var url = $(this).attr("src"); +$(this).attr("src",url+"?wmode=transparent"); +); +); + EOT; -- cgit v1.2.3 From 37f02424f801b3132b75b39d4132f35025667a75 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 26 Mar 2012 07:02:27 +0200 Subject: small fix --- view/theme/diabook/theme.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 5b87e3142..5bd206100 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -252,12 +252,7 @@ $a->page['htmlhead'] .= <<< EOT $('a.lightbox').fancybox(); // Select all links with lightbox class }); - $(document).ready(function () -$('iframe').each(function() -var url = $(this).attr("src"); -$(this).attr("src",url+"?wmode=transparent"); -); -); + EOT; -- cgit v1.2.3 From c4c69959e21f1053224166c65b80a7dcdc2357ad Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 26 Mar 2012 09:37:14 +0200 Subject: add screenshots to diabook --- view/theme/diabook/theme.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 5bd206100..0279dd925 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -251,9 +251,7 @@ $a->page['htmlhead'] .= <<< EOT $(function() { $('a.lightbox').fancybox(); // Select all links with lightbox class }); - - - + EOT; -- cgit v1.2.3 From 579c4f3079b9d1912cab6f70a9d95ebab1ca8743 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Mon, 26 Mar 2012 09:48:38 +0200 Subject: diabook: small fix in theme_info array --- view/theme/diabook/theme.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 5bd206100..e4af9d3f3 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -8,7 +8,7 @@ */ $a->theme_info = array( - 'extends' => 'diabook', + //'extends' => 'diabook', //it's diabook, don't need to extend himself... ); //change css on network and profilepages -- cgit v1.2.3 From aaddee0d948832be7967c769fe4fafe7bdce2c0f Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Mon, 26 Mar 2012 13:52:44 +0200 Subject: minor css fixes in diabook --- view/theme/diabook/theme.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 8064fb7e7..798eef422 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -7,9 +7,6 @@ * Author: */ -$a->theme_info = array( - //'extends' => 'diabook', //it's diabook, don't need to extend himself... -); //change css on network and profilepages $cssFile = null; -- cgit v1.2.3 From e7bc3f2bd0f578d04c271029d869e1fbc36cbec4 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Tue, 27 Mar 2012 08:28:47 +0200 Subject: add "find friends" to right_aside to diabook, fixes in css in diabook --- view/theme/diabook/theme.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 798eef422..6eb623d95 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -139,6 +139,17 @@ function diabook_community_info(){ $aside['$fostitJS'] = $fostitJS; + //right_aside FIND FRIENDS + if(local_user()) { + $nv = array(); + $nv['directory'] = Array('directory', t('Directory'), "", ""); + $nv['match'] = Array('match', t('Similar Interests'), "", ""); + $nv['suggest'] = Array('suggest', t('Friend Suggestions'), "", ""); + $nv['invite'] = Array('invite', t('Invite Friends'), "", ""); + + $aside['$nv'] = $nv; + }; + //Community Page $page = '
@@ -200,6 +211,7 @@ if ($a->argv[0] === "network" && local_user()){ $ps = array('usermenu'=>array()); $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']['contacts'] = Array('contacts' , t('Contacts'), "", t('Your contacts')); $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')); -- cgit v1.2.3 From 31fbc3fde3d6dba46b01498c21cb3e5ba74be987 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Tue, 27 Mar 2012 19:02:07 +0200 Subject: provide a close-option for boxes in right_aside and store info via js and cookies --- view/theme/diabook/theme.php | 111 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 105 insertions(+), 6 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 6eb623d95..5a447cc9b 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -151,9 +151,10 @@ function diabook_community_info(){ }; //Community Page + if(local_user()) { $page = '
-

'.t("Community Pages").'

+

'.t("Community Pages").'

'; - if (sizeof($contacts) > 0) + //if (sizeof($contacts) > 0) - $aside['$page'] = $page; + $aside['$page'] = $page; + } //END Community Page @@ -227,31 +229,38 @@ if ($a->argv[0] === "network" && local_user()){ } + $ccCookie = $_COOKIE['close_pages'] + $_COOKIE['close_helpers'] + $_COOKIE['close_services'] + $_COOKIE['close_friends'] + $_COOKIE['close_postit'] + $_COOKIE['close_lastusers'] + $_COOKIE['close_lastphotos'] + $_COOKIE['close_lastlikes']; + + if($ccCookie != "8") { // COMMUNITY diabook_community_info(); // CUSTOM CSS $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-network.css"; - + } } //right_aside at profile pages if ($a->argv[0] === "profile"){ - + if($ccCookie != "8") { // COMMUNITY diabook_community_info(); // CUSTOM CSS $cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook/style-profile.css"; - + } } // custom css if (!is_null($cssFile)) $a->page['htmlhead'] .= sprintf('', $cssFile); +//load jquery.cookie.js +$cookieJS = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/js/jquery.cookie.js"; +$a->page['htmlhead'] .= sprintf(' + + + + EOT; -- cgit v1.2.3 From 211d00a1f550094931e737b062d7f70797bde652 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Tue, 27 Mar 2012 23:27:43 +0200 Subject: fixes in diabook --- view/theme/diabook/theme.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'view/theme/diabook/theme.php') diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php index 5a447cc9b..53424a084 100755 --- a/view/theme/diabook/theme.php +++ b/view/theme/diabook/theme.php @@ -154,7 +154,7 @@ function diabook_community_info(){ if(local_user()) { $page = '
-

'.t("Community Pages").'

+

'.t("Community Pages").'