From 01d36785b052f722c982700bcfe29e7ea26d1321 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 27 Sep 2010 19:48:45 -0700 Subject: fixed photo comments, msg typo, and changed cursor when hovering over "special friends" where SSO is allowed --- mod/photos.php | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 693d068e4..f5d4258ac 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -166,7 +166,7 @@ function photos_post(&$a) { $drop_id = intval($i[0]['id']); $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - $proc_debug = get_config('system','proc_debug']); + $proc_debug = get_config('system','proc_debug'); // send the notification upstream/downstream as the case may be @@ -406,11 +406,32 @@ function photos_content(&$a) { $owner_uid = $a->data['user']['uid']; + + + $contact = null; + $remote_contact = false; + if(remote_user()) { $contact_id = $_SESSION['visitor_id']; $groups = init_groups_visitor($contact_id); + $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", + intval($contact_id), + intval($owner_uid) + ); + if(count($r)) { + $contact = $r[0]; + $remote_contact = true; + } } + if(! $remote_contact) { + if(local_user()) { + $contact_id = $_SESSION['cid']; + $contact = $a->contact; + } + } + + // default permissions - anonymous user $sql_extra = " AND `allow_cid` = '' AND `allow_gid` = '' AND `deny_cid` = '' AND `deny_gid` = '' "; @@ -669,6 +690,9 @@ function photos_content(&$a) { '$id' => $i1[0]['id'], '$parent' => $i1[0]['id'], '$profile_uid' => $a->data['user']['uid'], + '$mylink' => $contact['url'], + '$mytitle' => t('This is you'), + '$myphoto' => $contact['thumb'], '$ww' => '' )); } @@ -691,16 +715,24 @@ function photos_content(&$a) { '$id' => $item['item_id'], '$parent' => $item['parent'], '$profile_uid' => $a->data['user']['uid'], + '$mylink' => $contact['url'], + '$mytitle' => t('This is you'), + '$myphoto' => $contact['thumb'], '$ww' => '' )); } } - $profile_url = $item['url']; if(local_user() && ($item['contact-uid'] == get_uid()) - && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) + && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) { $profile_url = $redirect_url; + $sparkle = ' sparkle'; + } + else { + $profile_url = $item['url']; + $sparkle = ''; + } $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); @@ -717,6 +749,7 @@ function photos_content(&$a) { '$profile_url' => $profile_link, '$name' => $profile_name, '$thumb' => $profile_avatar, + '$sparkle' => $sparkle, '$title' => $item['title'], '$body' => bbcode($item['body']), '$ago' => relative_date($item['created']), -- cgit v1.2.3