From 7c6c3d36f589d38de5e8b36f2ba1d940c8150e2c Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 27 Mar 2012 01:31:47 -0700 Subject: profile wall privacy --- mod/profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index 428679ffc..782d17d83 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -107,7 +107,7 @@ function profile_content(&$a, $update = 0) { $is_owner = ((local_user()) && (local_user() == $a->profile['profile_uid']) ? true : false); - if($a->user['hidewall'] && (! $is_owner) && (! $remote_contact)) { + if($a->profile['hidewall'] && (! $is_owner) && (! $remote_contact)) { notice( t('Access to this profile has been restricted.') . EOL); return; } -- cgit v1.2.3 From 581b54c974a9b9a050a8a0b9a17a19bd41b1f2f5 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Sun, 1 Apr 2012 21:28:31 -0400 Subject: allow users to set categories on their posts --- mod/profile.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index 782d17d83..26b33d5f1 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -2,6 +2,11 @@ function profile_init(&$a) { + require_once('include/contact_widgets.php'); + + if(! x($a->page,'aside')) + $a->page['aside'] = ''; + $blocked = (((get_config('system','block_public')) && (! local_user()) && (! remote_user())) ? true : false); if($a->argc > 1) @@ -59,6 +64,13 @@ function profile_init(&$a) { function profile_content(&$a, $update = 0) { + if (x($a->category)) { + $category = $a->category; + } + else { + $category = ((x($_GET,'category')) ? $_GET['category'] : ''); + } + if(get_config('system','block_public') && (! local_user()) && (! remote_user())) { return login(); } @@ -112,7 +124,8 @@ function profile_content(&$a, $update = 0) { return; } - + $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); + if(! $update) { if(x($_GET,'tab')) $tab = notags(trim($_GET['tab'])); @@ -135,6 +148,7 @@ function profile_content(&$a, $update = 0) { $celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false); + if(can_write_wall($a,$a->profile['profile_uid'])) { $x = array( @@ -178,6 +192,10 @@ function profile_content(&$a, $update = 0) { } else { + if(x($category)) { + $sql_extra .= file_tag_file_query('item',$category,'category'); + } + $r = q("SELECT COUNT(*) AS `total` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0 @@ -204,6 +222,7 @@ function profile_content(&$a, $update = 0) { intval($a->profile['profile_uid']) ); + } $parents_arr = array(); -- cgit v1.2.3 From dbe16afcd41376ce3cc93fe7ec98a83a71644878 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Apr 2012 19:16:02 -0700 Subject: include contact_widgets for categories_widget when doing updates --- mod/profile.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index 26b33d5f1..66386160f 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -124,6 +124,8 @@ function profile_content(&$a, $update = 0) { return; } + require_once('include/contact_widgets.php'); + $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); if(! $update) { -- cgit v1.2.3 From 96abee53e49c70679919dc0f0ac8a44439e36aa3 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Apr 2012 19:20:39 -0700 Subject: this is better --- mod/profile.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mod/profile.php') diff --git a/mod/profile.php b/mod/profile.php index 66386160f..68d73fba3 100755 --- a/mod/profile.php +++ b/mod/profile.php @@ -124,11 +124,9 @@ function profile_content(&$a, $update = 0) { return; } - require_once('include/contact_widgets.php'); + if(! $update) { - $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); - if(! $update) { if(x($_GET,'tab')) $tab = notags(trim($_GET['tab'])); @@ -150,6 +148,7 @@ function profile_content(&$a, $update = 0) { $celeb = ((($a->profile['page-flags'] == PAGE_SOAPBOX) || ($a->profile['page-flags'] == PAGE_COMMUNITY)) ? true : false); + $a->page['aside'] .= categories_widget($a->get_baseurl(true) . '/profile/' . $a->profile['nickname'],(x($category) ? xmlify($category) : '')); if(can_write_wall($a,$a->profile['profile_uid'])) { -- cgit v1.2.3