1
0
Fork 0

show lockstate on messages, sparkle failure on profile page,

comments on typo checker
This commit is contained in:
Mike Macgirvin 2010-09-28 22:12:27 -07:00
parent dd3f754e23
commit 18287a3656
7 changed files with 36 additions and 3 deletions

View file

@ -85,7 +85,7 @@ function display_content(&$a) {
} }
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
@ -149,6 +149,12 @@ function display_content(&$a) {
if((($item['verb'] == ACTIVITY_LIKE) || ($item['verb'] == ACTIVITY_DISLIKE)) && ($item['id'] != $item['parent'])) if((($item['verb'] == ACTIVITY_LIKE) || ($item['verb'] == ACTIVITY_DISLIKE)) && ($item['id'] != $item['parent']))
continue; continue;
$lock = (($item['uid'] == get_uid()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))
? '<div class="wall-item-lock"><img src="images/lock_icon.gif" alt="Private Message" /></div>'
: '<div class="wall-item-lock"></div>');
if(can_write_wall($a,$a->profile['uid'])) { if(can_write_wall($a,$a->profile['uid'])) {
if($item['last-child']) { if($item['last-child']) {
$comment = replace_macros($cmnt_tpl,array( $comment = replace_macros($cmnt_tpl,array(
@ -239,6 +245,7 @@ function display_content(&$a) {
'$title' => $item['title'], '$title' => $item['title'],
'$body' => bbcode($item['body']), '$body' => bbcode($item['body']),
'$ago' => relative_date($item['created']), '$ago' => relative_date($item['created']),
'$lock' => $lock,
'$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''), '$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''),
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
'$owner_url' => $owner_url, '$owner_url' => $owner_url,

View file

@ -173,6 +173,13 @@ function network_content(&$a, $update = 0) {
if((($item['verb'] == ACTIVITY_LIKE) || ($item['verb'] == ACTIVITY_DISLIKE)) && ($item['id'] != $item['parent'])) if((($item['verb'] == ACTIVITY_LIKE) || ($item['verb'] == ACTIVITY_DISLIKE)) && ($item['id'] != $item['parent']))
continue; continue;
$lock = (($item['uid'] == get_uid()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))
? '<div class="wall-item-lock"><img src="images/lock_icon.gif" alt="Private Message" /></div>'
: '<div class="wall-item-lock"></div>');
// Top-level wall post not written by the wall owner (wall-to-wall) // Top-level wall post not written by the wall owner (wall-to-wall)
// First figure out who owns it. // First figure out who owns it.
@ -279,6 +286,7 @@ function network_content(&$a, $update = 0) {
'$title' => $item['title'], '$title' => $item['title'],
'$body' => bbcode($item['body']), '$body' => bbcode($item['body']),
'$ago' => relative_date($item['created']), '$ago' => relative_date($item['created']),
'$lock' => $lock,
'$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''), '$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''),
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
'$owner_url' => $owner_url, '$owner_url' => $owner_url,

View file

@ -231,7 +231,7 @@ function profile_content(&$a, $update = 0) {
$a->set_pager_total($r[0]['total']); $a->set_pager_total($r[0]['total']);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid` `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id` FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
@ -307,6 +307,14 @@ function profile_content(&$a, $update = 0) {
if((($item['verb'] == ACTIVITY_LIKE) || ($item['verb'] == ACTIVITY_DISLIKE)) && ($item['id'] != $item['parent'])) if((($item['verb'] == ACTIVITY_LIKE) || ($item['verb'] == ACTIVITY_DISLIKE)) && ($item['id'] != $item['parent']))
continue; continue;
$lock = (($item['uid'] == get_uid()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))
? '<div class="wall-item-lock"><img src="images/lock_icon.gif" alt="Private Message" /></div>'
: '<div class="wall-item-lock"></div>');
if(can_write_wall($a,$a->profile['profile_uid'])) { if(can_write_wall($a,$a->profile['profile_uid'])) {
if($item['id'] == $item['parent']) { if($item['id'] == $item['parent']) {
$likebuttons = replace_macros($like_tpl,array('$id' => $item['id'])); $likebuttons = replace_macros($like_tpl,array('$id' => $item['id']));
@ -370,6 +378,7 @@ function profile_content(&$a, $update = 0) {
'$title' => $item['title'], '$title' => $item['title'],
'$body' => bbcode($item['body']), '$body' => bbcode($item['body']),
'$ago' => relative_date($item['created']), '$ago' => relative_date($item['created']),
'$lock' => $lock,
'$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''), '$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''),
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
'$drop' => $drop, '$drop' => $drop,

View file

@ -1,4 +1,8 @@
<?php <?php
// Tired of chasing typos and finding them after a commit.
// Run this from cmdline in basedir and quickly see if we've
// got any parse errors in our application files.
include 'boot.php'; include 'boot.php';
$a = new App(); $a = new App();

View file

@ -702,9 +702,12 @@ input#dfrn-url {
float: left; float: left;
} }
.wall-item-wrapper { .wall-item-wrapper {
margin-top: 30px;
float: left; float: left;
} }
.wall-item-lock {
height: 20px;
margin-top: 10px;
}
.wall-item-ago { .wall-item-ago {
color: #888888; color: #888888;

View file

@ -6,6 +6,7 @@
</div> </div>
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" > <div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
$lock
<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> <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-ago" id="wall-item-ago-$id">$ago</div>
<div class="wall-item-location" id="wall-item-location-$id">$location</div> <div class="wall-item-location" id="wall-item-location-$id">$location</div>

View file

@ -11,6 +11,7 @@
</div> </div>
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" > <div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
$lock
<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 /> <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-ago" id="wall-item-ago-$id">$ago</div>
<div class="wall-item-location" id="wall-item-location-$id">$location</div> <div class="wall-item-location" id="wall-item-location-$id">$location</div>