1
1
Fork 0

fixed photo comments, msg typo, and changed cursor when hovering

over "special friends" where SSO is allowed
This commit is contained in:
Mike Macgirvin 2010-09-27 19:48:45 -07:00
parent 0c66172292
commit 01d36785b0
13 changed files with 150 additions and 39 deletions

View file

@ -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>';

View file

@ -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']),

View file

@ -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']),

View file

@ -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']),

View file

@ -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,10 +406,31 @@ 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
@ -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']),

View file

@ -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']),

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -1586,3 +1586,7 @@ input#dfrn-url {
bottom: 5px;
right: 5px;
}
.sparkle {
cursor: crosshair;
}

View file

@ -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

View file

@ -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