.htconfig.php
\#*
+wip
+include/jquery-1.4.2.min.js
\ No newline at end of file
$parent_id = 0;
dbesc_array($arr);
-dbg(3);
+//dbg(3);
$r = q("INSERT INTO `item` (`"
. implode("`, `", array_keys($arr))
. "`) VALUES ('"
<?php
+
+if(x($_SESSION['uid'])) {
+ $a->page['nav'] .= "<a id=\"nav-logout-link\" class=\"nav-link\" href=\"logout\">Logout</a>\r\n";
+}
+
$a->page['nav'] .= "<span id=\"nav-link-wrapper\" >\r\n";
if(($a->module != 'home') && (! (x($_SESSION['uid']))))
$a->page['nav'] .= "<a id=\"nav-home-link\" class=\"nav-commlink\" href=\"\">Home</a>\r\n";
- $a->page['nav'] .= "<a id=\"nav-directory-link\" class=\"nav-commlink\" href=\"directory\">Site Directory</a>\r\n";
+ $a->page['nav'] .= "<a id=\"nav-directory-link\" class=\"nav-link\" href=\"directory\">Site Directory</a>\r\n";
if(x($_SESSION,'uid')) {
- $a->page['nav'] .= "<a id=\"nav-notify-link\" class=\"nav-commlink\" href=\"notifications\">Notifications</a>\r\n";
+ $a->page['nav'] .= "<a id=\"nav-network-link\" class=\"nav-commlink\" href=\"network\">Network</a><span id=\"net-update\" class=\"nav-ajax-left\"></span>\r\n";
- $a->page['nav'] .= "<a id=\"nav-messages-link\" class=\"nav-commlink\" href=\"Messages\">Messages</a>\r\n";
+ $a->page['nav'] .= "<a id=\"nav-home-link\" class=\"nav-commlink\" href=\"profile/{$a->user['nickname']}\">Home</a><span id=\"home-update\" class=\"nav-ajax-left\"></span>\r\n";
+
+ $a->page['nav'] .= "<a id=\"nav-notify-link\" class=\"nav-commlink\" href=\"notifications\">Notifications</a><span id=\"notify-update\" class=\"nav-ajax-left\"></span>\r\n";
+
+ $a->page['nav'] .= "<a id=\"nav-messages-link\" class=\"nav-commlink\" href=\"Messages\">Messages</a><span id=\"mail-update\" class=\"nav-ajax-left\"></span>\r\n";
- $a->page['nav'] .= "<div id=\"nav-notify\" class=\"nav-notify\"></div>\r\n";
- $a->page['nav'] .= "<a id=\"nav-logout-link\" class=\"nav-link\" href=\"logout\">Logout</a>\r\n";
$a->page['nav'] .= "<a id=\"nav-settings-link\" class=\"nav-link\" href=\"settings\">Settings</a>\r\n";
$a->page['nav'] .= "<a id=\"nav-contacts-link\" class=\"nav-link\" href=\"contacts\">Contacts</a>\r\n";
- $a->page['nav'] .= "<a id=\"nav-home-link\" class=\"nav-link\" href=\"profile/{$a->user['nickname']}\">Home</a>\r\n";
- $a->page['nav'] .= "<a id=\"nav-network-link\" class=\"nav-link\" href=\"network\">Network</a>\r\n";
}
}
- $photo = str_replace('-4.jpg', '' , $r[0]['photo']);
- $photos = q("SELECT `id` FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d",
- dbesc($photo),
- intval($_SESSION['uid'])
- );
+// $photo = str_replace('-4.jpg', '' , $r[0]['photo']);
+// $photos = q("SELECT `id` FROM `photo` WHERE `resource-id` = '%s' AND `uid` = %d",
+// dbesc($photo),
+// intval($_SESSION['uid'])
+// );
if($cmd == 'block') {
$blocked = (($orig_record[0]['blocked']) ? 0 : 1);
$r = q("DELETE FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($contact_id),
intval($_SESSION['uid']));
- if(count($photos)) {
- foreach($photos as $p) {
- q("DELETE FROM `photos` WHERE `id` = %d LIMIT 1",
- $p['id']);
- }
- }
+
+// if(count($photos)) {
+// foreach($photos as $p) {
+// q("DELETE FROM `photos` WHERE `id` = %d LIMIT 1",
+// $p['id']);
+// }
+// }
+
if(intval($contact_id))
q("DELETE FROM `item` WHERE `contact-id` = %d LIMIT 1",
intval($contact_id)
function dfrn_notify_post(&$a) {
-dbg(3);
+
$dfrn_id = notags(trim($_POST['dfrn_id']));
$challenge = notags(trim($_POST['challenge']));
$data = $_POST['data'];
$contact_id = $a->cid;
+ $r = q("UPDATE `item` SET `unseen` = 0
+ WHERE `unseen` = 1 AND `uid` = %d",
+ intval($_SESSION['uid'])
+ );
+
$tpl = file_get_contents('view/jot-header.tpl');
// Profile owner - everything is visible
- if(local_user() && ($_SESSION['uid'] == $a->profile['profile_uid']))
+ if(local_user() && ($_SESSION['uid'] == $a->profile['profile_uid'])) {
$sql_extra = '';
+
+ // Oh - while we're here... reset the Unseen messages
+
+ $r = q("UPDATE `item` SET `unseen` = 0
+ WHERE `type` != 'remote' AND `unseen` = 1 AND `uid` = %d",
+ intval($_SESSION['uid'])
+ );
+
+ }
// authenticated visitor - here lie dragons
elseif(remote_user()) {
function profile_photo_init(&$a) {
- if((! local_user()) {
+ if(! local_user()) {
return;
}
require_once("mod/profile.php");
- profile_load($a,$_SESSION['uid']);
+ profile_load($a,$a->user['nickname']);
}
function profile_photo_post(&$a) {
- if((! local_user()) {
+ if(! local_user()) {
notice ( "Permission denied." . EOL );
return;
}
dbesc($base_image['filename']),
intval($im->getHeight()),
intval($im->getWidth()),
- dbesc($im->imageString()
+ dbesc($im->imageString())
);
if($r === false)
dbesc($base_image['filename']),
intval($im->getHeight()),
intval($im->getWidth()),
- dbesc($im->imageString()
+ dbesc($im->imageString())
);
if($r === false)
// Unset the profile photo flag from any other photos I own
- $r = q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource-id` != '%s' AND `uid` = %d"
+ $r = q("UPDATE `photo` SET `profile` = 0 WHERE `profile` = 1 AND `resource-id` != '%s' AND `uid` = %d",
dbesc($base_image['resource-id']),
intval($_SESSION['uid'])
- )
+ );
}
goaway($a->get_baseurl() . '/profiles');
dbesc(basename($filename)),
intval($ph->getHeight()),
intval($ph->getWidth()),
- dbesc($ph->imageString()
+ dbesc($ph->imageString())
);
if($r === false)
notice("Image size reduction (640) failed." . EOL );
<id>$feed_id</id>
<title>$feed_title</title>
+ <icon>$photo</icon>
+ <dfrn:icon-updated>0000-00-00T00:00:00Z</dfrn:icon-updated>
<updated>$feed_updated</updated>
<author>
<name>$name</name>
+ <dfrn:name-updated>0000-00-00T00:00:00Z</dfrn:name-updated>
<uri>$profile_page</uri>
- <dfrn:avatar>$photo</dfrn:avatar>
- </author>
+ <dfrn:uri-updated>0000-00-00T00:00:00Z</dfrn:uri-updated>
+ <dfrn:avatar>$thumb</dfrn:avatar>
+ <dfrn:avatar-updated>0000-00-00T00:00:00Z</dfrn:avatar-updated>
+ </author>
<div id="contact-edit-profile-select-text">
<h4>Profile Visibility</h4>
-<p>Please choose the profile you would like to display to $name - when he/she connects securely to your profile page.
+<p>Please choose the profile you would like to display to $name when viewing your profile securely.
</p>
</div>
$profile_select
<div class="directory-item" id="directory-item-$id" >
<div class="directory-photo-wrapper" id="directory-photo-wrapper-$id" >
-<div class="directory-photo" id="directory-photo-$id" ><a href="$profile-link" class="directory-profile-link" id="directory-profile-link-$id" ><img src="$photo" alt="$alt-text" title="$alt-text" /></a>
+<div class="directory-photo" id="directory-photo-$id" ><a href="$profile-link" class="directory-profile-link" id="directory-profile-link-$id" ><img class="directory-photo-img" src="$photo" alt="$alt-text" title="$alt-text" /></a>
</div>
</div>
<div class="directory-photo-end"></div>
<script type="text/javascript" src="$baseurl/include/main.js" ></script>
<script type="text/javascript">
-// $(document).ready(function() { setTimeout(NavUpdate,10 * 1000); });
+ $(document).ready(function() { NavUpdate(); });
function NavUpdate()
{
{
$(data).find('result').each(function() {
var net = $(this).find('net').text();
- alert(net);
+ if(net == 0) { net = ''; }
+ $('#net-update').html(net);
+ var home = $(this).find('home').text();
+ if(home == 0) { home = ''; }
+ $('#home-update').html(home);
+ var mail = $(this).find('mail').text();
+ if(mail == 0) { mail = ''; }
+ $('#mail-update').html(mail);
+ var intro = $(this).find('intro').text();
+ if(intro == 0) { intro = ''; }
+ $('#notify-update').html(intro);
});
}) ;
- setTimeout(NavUpdate,10 * 1000);
+ setTimeout(NavUpdate,30000);
}
</script>
}
+.nav-ajax-left {
+ margin-left: 1px;
+ float: left;
+ font-size: 0.6em;
+ font-weight: bold;
+ color: #FF0000;
+}
+
+.nav-ajax-right {
+ margin-left: 1px;
+ float: right;
+ font-size: 0.6em;
+ font-weight: bold;
+ color: #FF0000;
+}
+
.nav-commlink {
float: left;
margin-left: 10px;
#directory-search-end {
}
+.directory-photo-img {
+ border: none;
+}
+
+
.pager {
padding: 10px;
text-align: center;
overflow: auto;
}
+#group-new-submit-wrapper {
+ margin-top: 30px;
+}
#acl-allow-group-label,
#acl-allow-contact-label,
-profile photo to self contact page? - resolve profile photo inconsistency
- pre-load profile photos and use in conversations instead of contact photos
- (done for profile owner)
-
- ensure correct photo is pushed with notify/poll and used in wall/wall comments/posts
- use photo hash to notify of changes?
-
-
+finish one world photo resolution (update timestamps in atom feeds)
>>>>>>>>contact editor
>>>>>>>> block photo
atom elements
- thread
tombstone
activity