diff options
-rw-r--r-- | mod/contacts.php | 24 | ||||
-rw-r--r-- | mod/display.php | 30 | ||||
-rw-r--r-- | mod/message.php | 13 | ||||
-rw-r--r-- | mod/network.php | 35 | ||||
-rw-r--r-- | mod/photos.php | 39 | ||||
-rw-r--r-- | mod/profile.php | 26 | ||||
-rw-r--r-- | view/contact_edit.tpl | 2 | ||||
-rw-r--r-- | view/contact_template.tpl | 2 | ||||
-rw-r--r-- | view/mail_conv.tpl | 2 | ||||
-rw-r--r-- | view/mail_list.tpl | 2 | ||||
-rw-r--r-- | view/theme/default/style.css | 4 | ||||
-rw-r--r-- | view/wall_item.tpl | 4 | ||||
-rw-r--r-- | view/wallwall_item.tpl | 6 |
13 files changed, 150 insertions, 39 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 50cc1586a..438b37aaf 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -168,6 +168,14 @@ function contacts_content(&$a) { break; } + if($r[0]['rel'] != REL_FAN) { + $url = "redir/{$r[0]['id']}"; + $sparkle = ' class="sparkle" '; + } + else { + $url = $r[0]['url']; + $sparkle = ''; + } $o .= replace_macros($tpl,array( '$poll_interval' => contact_poll_interval($r[0]['priority']), '$last_update' => (($r[0]['last-update'] == '0000-00-00 00:00:00') @@ -186,7 +194,8 @@ function contacts_content(&$a) { '$name' => $r[0]['name'], '$dir_icon' => $dir_icon, '$alt_text' => $alt_text, - '$url' => (($r[0]['rel'] != REL_FAN) ? "redir/{$r[0]['id']}" : $r[0]['url'] ) + '$sparkle' => $sparkle, + '$url' => $url )); @@ -258,6 +267,16 @@ function contacts_content(&$a) { break; } + if($rr['rel'] != REL_FAN) { + $url = "redir/{$rr['id']}"; + $sparkle = ' class="sparkle" '; + } + else { + $url = $rr['url']; + $sparkle = ''; + } + + $o .= replace_macros($tpl, array( '$img_hover' => t('Visit ') . $rr['name'] . t('\'s profile'), '$edit_hover' => t('Edit contact'), @@ -266,7 +285,8 @@ function contacts_content(&$a) { '$dir_icon' => $dir_icon, '$thumb' => $rr['thumb'], '$name' => $rr['name'], - '$url' => (($rr['rel'] != REL_FAN) ? "redir/{$rr['id']}" : $rr['url'] ) + '$sparkle' => $sparkle, + '$url' => $url )); } $o .= '<div id="contact-edit-end"></div>'; diff --git a/mod/display.php b/mod/display.php index f695dc205..2bc85f190 100644 --- a/mod/display.php +++ b/mod/display.php @@ -113,24 +113,28 @@ function display_content(&$a) { if(count($r)) { foreach($r as $item) { - + $sparkle = ''; if(($item['verb'] == ACTIVITY_LIKE) && ($item['id'] != $item['parent'])) { $url = $item['url']; - if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; + $sparkle = ' class="sparkle"'; + } if(! is_array($alike[$item['parent'] . '-l'])) $alike[$item['parent'] . '-l'] = array(); $alike[$item['parent']] ++; - $alike[$item['parent'] . '-l'][] = '<a href="'. $url . '">' . $item['name'] . '</a>'; + $alike[$item['parent'] . '-l'][] = '<a href="'. $url . '"' . $sparkle . '>' . $item['name'] . '</a>'; } if(($item['verb'] == ACTIVITY_DISLIKE) && ($item['id'] != $item['parent'])) { $url = $item['url']; - if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; + $sparkle = ' class="sparkle"'; + } if(! is_array($dlike[$item['parent'] . '-l'])) $dlike[$item['parent'] . '-l'] = array(); $dlike[$item['parent']] ++; - $dlike[$item['parent'] . '-l'][] = '<a href="'. $url . '">' . $item['name'] . '</a>'; + $dlike[$item['parent'] . '-l'][] = '<a href="'. $url . '"' . $sparkle . '>' . $item['name'] . '</a>'; } } @@ -163,14 +167,22 @@ function display_content(&$a) { $profile_url = $item['url']; + $sparkle = ''; $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) { + $profile_url = $redirect_url; + $sparkle = ' sparkle'; + } + // Top-level wall post not written by the wall owner (wall-to-wall) // First figure out who owns it. + $osparkle = ''; + if(($item['parent'] == $item['item_id']) && (! $item['self'])) { if($item['type'] === 'wall') { @@ -189,9 +201,11 @@ function display_content(&$a) { $template = $wallwall; $commentww = 'ww'; // If it is our contact, use a friendly redirect link - if(($item['owner-link'] == $item['url']) && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD)) - $owner_url = $redirect_url; + if(($item['owner-link'] == $item['url']) && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD)) { $owner_url = $redirect_url; + $osparkle = ' sparkle'; + } + } } @@ -219,6 +233,8 @@ function display_content(&$a) { '$id' => $item['item_id'], '$profile_url' => $profile_link, '$name' => $profile_name, + '$sparkle' => $sparkle, + '$osparkle' => $osparkle, '$thumb' => $profile_avatar, '$title' => $item['title'], '$body' => bbcode($item['body']), diff --git a/mod/message.php b/mod/message.php index b544b552a..114f558db 100644 --- a/mod/message.php +++ b/mod/message.php @@ -211,6 +211,7 @@ function message_content(&$a) { '$id' => $rr['id'], '$from_name' =>$rr['from-name'], '$from_url' => $a->get_baseurl() . '/redir/' . $rr['contact-id'], + '$sparkle' => ' sparkle', '$from_photo' => $rr['from-photo'], '$subject' => (($rr['mailseen']) ? $rr['title'] : '<strong>' . $rr['title'] . '</strong>'), '$delete' => t('Delete conversation'), @@ -261,11 +262,19 @@ function message_content(&$a) { $tpl = load_view_file('view/mail_conv.tpl'); foreach($messages as $message) { + if($message['from-url'] == $myprofile) { + $from_url = $myprofile; + $sparkle = ''; + } + else { + $from_url = $a->get_baseurl() . '/redir/' . $message['contact-id']; + $sparkle = ' sparkle'; + } $o .= replace_macros($tpl, array( '$id' => $message['id'], '$from_name' =>$message['from-name'], - '$from_url' => (($message['from-url'] == $myprofile) - ? $myprofile : $a->get_baseurl() . '/redir/' . $message['contact-id']), + '$from_url' => $from_url, + '$sparkle' => $sparkle, '$from_photo' => $message['from-photo'], '$subject' => $message['title'], '$body' => bbcode($message['body']), diff --git a/mod/network.php b/mod/network.php index 541e10494..26e4b0524 100644 --- a/mod/network.php +++ b/mod/network.php @@ -135,23 +135,29 @@ function network_content(&$a, $update = 0) { if(count($r)) { foreach($r as $item) { + $sparkle = ''; + if(($item['verb'] == ACTIVITY_LIKE) && ($item['id'] != $item['parent'])) { $url = $item['url']; - if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; + $sparkle = ' class="sparkle"'; + } if(! is_array($alike[$item['parent'] . '-l'])) $alike[$item['parent'] . '-l'] = array(); $alike[$item['parent']] ++; - $alike[$item['parent'] . '-l'][] = '<a href="'. $url . '">' . $item['name'] . '</a>'; + $alike[$item['parent'] . '-l'][] = '<a href="'. $url . '"' . $sparkle . '>' . $item['name'] . '</a>'; } if(($item['verb'] == ACTIVITY_DISLIKE) && ($item['id'] != $item['parent'])) { $url = $item['url']; - if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; + $sparkle = ' class="sparkle"'; + } if(! is_array($dlike[$item['parent'] . '-l'])) $dlike[$item['parent'] . '-l'] = array(); $dlike[$item['parent']] ++; - $dlike[$item['parent'] . '-l'][] = '<a href="'. $url . '">' . $item['name'] . '</a>'; + $dlike[$item['parent'] . '-l'][] = '<a href="'. $url . '"' . $sparkle . '>' . $item['name'] . '</a>'; } } @@ -170,6 +176,8 @@ function network_content(&$a, $update = 0) { // Top-level wall post not written by the wall owner (wall-to-wall) // First figure out who owns it. + $osparkle = ''; + if(($item['parent'] == $item['item_id']) && (! $item['self'])) { if($item['type'] === 'wall') { @@ -188,8 +196,11 @@ function network_content(&$a, $update = 0) { $template = $wallwall; $commentww = 'ww'; // If it is our contact, use a friendly redirect link - if(($item['owner-link'] == $item['url']) && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD)) + if(($item['owner-link'] == $item['url']) + && ($item['rel'] == REL_VIP || $item['rel'] == REL_BUD)) { $owner_url = $redirect_url; + $osparkle = ' sparkle'; + } } } @@ -223,8 +234,10 @@ function network_content(&$a, $update = 0) { - if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'] )) { $profile_url = $redirect_url; + $sparkle = ' sparkle'; + } $photo = $item['photo']; $thumb = $item['thumb']; @@ -239,10 +252,14 @@ function network_content(&$a, $update = 0) { // Can we use our special contact URL for this author? if(strlen($item['author-link'])) { - if($item['author-link'] == $item['url']) + if($item['author-link'] == $item['url']) { $profile_link = $redirect_url; - else + $sparkle = ' sparkle'; + } + else { $profile_link = $item['author-link']; + $sparkle = ''; + } } @@ -257,6 +274,8 @@ function network_content(&$a, $update = 0) { '$profile_url' => $profile_link, '$name' => $profile_name, '$thumb' => $profile_avatar, + '$osparkle' => $osparkle, + '$sparkle' => $sparkle, '$title' => $item['title'], '$body' => bbcode($item['body']), '$ago' => relative_date($item['created']), 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']), diff --git a/mod/profile.php b/mod/profile.php index 8395bc1f6..a0cdcfcc7 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -268,29 +268,35 @@ function profile_content(&$a, $update = 0) { foreach($r as $item) { + $sparkle = ''; + if(($item['verb'] == ACTIVITY_LIKE) && ($item['id'] != $item['parent'])) { $url = $item['url']; - if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; + $sparkle = ' class="sparkle" '; + } if(! is_array($alike[$item['parent'] . '-l'])) $alike[$item['parent'] . '-l'] = array(); $alike[$item['parent']] ++; - $alike[$item['parent'] . '-l'][] = '<a href="'. $url . '">' . $item['name'] . '</a>'; + $alike[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['name'] . '</a>'; } if(($item['verb'] == ACTIVITY_DISLIKE) && ($item['id'] != $item['parent'])) { $url = $item['url']; - if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) + if(($item['rel'] == REL_VIP || $item['rel'] == REL_BUD) && (! $item['self'])) { $url = $a->get_baseurl() . '/redir/' . $item['contact-id']; + $sparkle = ' class="sparkle" '; + } if(! is_array($dlike[$item['parent'] . '-l'])) $dlike[$item['parent'] . '-l'] = array(); $dlike[$item['parent']] ++; - $dlike[$item['parent'] . '-l'][] = '<a href="'. $url . '">' . $item['name'] . '</a>'; + $dlike[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['name'] . '</a>'; } } foreach($r as $item) { - + $sparkle = ''; $comment = ''; $likebuttons = ''; @@ -313,7 +319,7 @@ function profile_content(&$a, $update = 0) { '$parent' => $item['parent'], '$profile_uid' => $a->profile['profile_uid'], '$mylink' => $contact['url'], - '$mytitle' => t('Me'), + '$mytitle' => t('This is you'), '$myphoto' => $contact['thumb'], '$ww' => '' )); @@ -327,9 +333,12 @@ function profile_content(&$a, $update = 0) { // I can go directly to their profile as an authenticated guest. if(local_user() && ($item['contact-uid'] == $_SESSION['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 + $sparkle = ''; // We received this post via a remote feed. It's either a wall-to-wall or a remote comment. The author is // known to us and is reflected in the contact-id for this item. We can use the contact url or redirect rather than @@ -357,6 +366,7 @@ function profile_content(&$a, $update = 0) { '$profile_url' => $profile_link, '$name' => $profile_name, '$thumb' => $profile_avatar, + '$sparkle' => $sparkle, '$title' => $item['title'], '$body' => bbcode($item['body']), '$ago' => relative_date($item['created']), diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl index a049c232f..acea1da4e 100644 --- a/view/contact_edit.tpl +++ b/view/contact_edit.tpl @@ -9,7 +9,7 @@ <div id="contact-edit-photo-wrapper" > <img id="contact-edit-direction-icon" src="$dir_icon" alt="$alt_text" title="$alt_text" /> <div id="contact-edit-photo" > - <a href="$url" title="Visit $name's profile" /><img src="$photo" alt="$name" /></a> + <a href="$url" title="Visit $name's profile" /><img src="$photo" $sparkle alt="$name" /></a> </div> <div id="contact-edit-photo-end" ></div> </div> diff --git a/view/contact_template.tpl b/view/contact_template.tpl index 763cde00b..5b99f1be1 100644 --- a/view/contact_template.tpl +++ b/view/contact_template.tpl @@ -13,7 +13,7 @@ </div> <div class="contact-entry-nav-end"></div> <div class="contact-entry-photo" id="contact-entry-photo-$id" > - <a href="$url" title="$img_hover" /><img src="$thumb" alt="$name" /></a> + <a href="$url" title="$img_hover" /><img src="$thumb" $sparkle alt="$name" /></a> </div> </div> diff --git a/view/mail_conv.tpl b/view/mail_conv.tpl index 3c26a9c54..779ef39ee 100644 --- a/view/mail_conv.tpl +++ b/view/mail_conv.tpl @@ -1,6 +1,6 @@ <div class="mail-conv-outside-wrapper"> <div class="mail-conv-sender" > - <a href="$from_url" class="mail-conv-sender-url" ><img class="mail-conv-sender-photo" src="$from_photo" alt="$from_name" /></a> + <a href="$from_url" class="mail-conv-sender-url" ><img class="mail-conv-sender-photo$sparkle" src="$from_photo" alt="$from_name" /></a> </div> <div class="mail-conv-detail" > <div class="mail-conv-sender-name" >$from_name</div> diff --git a/view/mail_list.tpl b/view/mail_list.tpl index ee64f15e0..1ef714f7a 100644 --- a/view/mail_list.tpl +++ b/view/mail_list.tpl @@ -1,6 +1,6 @@ <div class="mail-list-outside-wrapper"> <div class="mail-list-sender" > - <a href="$from_url" class="mail-list-sender-url" ><img class="mail-list-sender-photo" src="$from_photo" alt="$from_name" /></a> + <a href="$from_url" class="mail-list-sender-url" ><img class="mail-list-sender-photo$sparkle" src="$from_photo" alt="$from_name" /></a> </div> <div class="mail-list-detail"> <div class="mail-list-sender-name" >$from_name</div> diff --git a/view/theme/default/style.css b/view/theme/default/style.css index a97ad9331..a7dee04b6 100644 --- a/view/theme/default/style.css +++ b/view/theme/default/style.css @@ -1586,3 +1586,7 @@ input#dfrn-url { bottom: 5px; right: 5px; } + +.sparkle { + cursor: crosshair; +} diff --git a/view/wall_item.tpl b/view/wall_item.tpl index 479a72ce2..58a7727a8 100644 --- a/view/wall_item.tpl +++ b/view/wall_item.tpl @@ -2,11 +2,11 @@ <div class="wall-item-content-wrapper$indent" id="wall-item-content-wrapper-$id" > <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" > <a href="$profile_url" title="View $name's profile" class="wall-item-photo-link" id="wall-item-photo-link-$id"> - <img src="$thumb" class="wall-item-photo" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a> + <img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a> </div> <div class="wall-item-wrapper" id="wall-item-wrapper-$id" > - <a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a> + <a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name$sparkle" id="wall-item-name-$id" >$name</span></a> <div class="wall-item-ago" id="wall-item-ago-$id">$ago</div> <div class="wall-item-location" id="wall-item-location-$id">$location</div> $vote diff --git a/view/wallwall_item.tpl b/view/wallwall_item.tpl index 0ff2ff6f7..d98289901 100644 --- a/view/wallwall_item.tpl +++ b/view/wallwall_item.tpl @@ -2,16 +2,16 @@ <div class="wall-item-content-wrapper$indent" id="wall-item-content-wrapper-$id" > <div class="wall-item-photo-wrapper" id="wall-item-ownerphoto-wrapper-$id" > <a href="$owner_url" title="View $owner_name's profile" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$id"> - <img src="$owner_photo" class="wall-item-photo" id="wall-item-ownerphoto-$id" height="80" width="80" alt="$owner_name" /></a> + <img src="$owner_photo" class="wall-item-photo$osparkle" id="wall-item-ownerphoto-$id" height="80" width="80" alt="$owner_name" /></a> </div> <div class="wall-item-arrowphoto-wrapper" ><img src="images/larrow.gif" alt="Wall-To-Wall" /></div> <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" > <a href="$profile_url" title="View $name's profile" class="wall-item-photo-link" id="wall-item-photo-link-$id"> - <img src="$thumb" class="wall-item-photo" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a> + <img src="$thumb" class="wall-item-photo$sparkle" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a> </div> <div class="wall-item-wrapper" id="wall-item-wrapper-$id" > - <a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a> to <a href="$owner_url" title="View $owner_name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-ownername-$id">$owner_name</span></a> via Wall-To-Wall:<br /> + <a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name$sparkle" id="wall-item-name-$id" >$name</span></a> to <a href="$owner_url" title="View $owner_name's profile" class="wall-item-name-link"><span class="wall-item-name$osparkle" id="wall-item-ownername-$id">$owner_name</span></a> via Wall-To-Wall:<br /> <div class="wall-item-ago" id="wall-item-ago-$id">$ago</div> <div class="wall-item-location" id="wall-item-location-$id">$location</div> $vote |