]> git.mxchange.org Git - friendica.git/commitdiff
lots of fixes - most recent photo updates for contacts
authorMike Macgirvin <mike@macgirvin.com>
Mon, 9 Aug 2010 04:03:08 +0000 (21:03 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Mon, 9 Aug 2010 04:03:08 +0000 (21:03 -0700)
15 files changed:
boot.php
database.sql
include/items.php
include/poller.php
index.php
mod/dfrn_confirm.php
mod/dfrn_notify.php
mod/photos.php
mod/profile_photo.php
mod/profiles.php
mod/register.php
simplepie/simplepie.inc
view/atom_feed.tpl
view/profile_advanced.php
view/style.css

index c1fbf2985f14fe0a7c87bd324baa223502e0ede8..e70e2bf6b7c91a222064710c80807fad54f6a0e8 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -177,19 +177,20 @@ function replace_macros($s,$r) {
 }}
 
 
+if(! function_exists('load_translation_table')) {
 function load_translation_table($lang) {
        global $a;
 
-}
-
+}}
 
+if(! function_exists('t')) {
 function t($s) {
        global $a;
 
        if($a->strings[$s])
                return $a->strings[$s];
        return $s;
-}
+}}
 
 if(! function_exists('fetch_url')) {
 function fetch_url($url,$binary = false) {
@@ -423,17 +424,20 @@ function xmlify($str) {
        return($buffer);
 }}
 
+if(! function_exists('unxmlify')) {
 function unxmlify($s) {
        $ret = str_replace('&amp;','&', $s);
        $ret = str_replace(array('&lt;','&gt;','&quot;','&apos;'),array('<','>','"',"'"),$ret);
        return $ret;    
-}
+}}
 
+if(! function_exists('hex2bin')) {
 function hex2bin($s) {
        return(pack("H*",$s));
-}
+}}
 
 
+if(! function_exists('paginate')) {
 function paginate(&$a) {
        $o = '';
        $stripped = ereg_replace("(&page=[0-9]*)","",$_SERVER['QUERY_STRING']);
@@ -483,8 +487,9 @@ function paginate(&$a) {
                $o .= '</div>'."\r\n";
        }
        return $o;
-}
+}}
 
+if(! function_exists('expand_acl')) {
 function expand_acl($s) {
 
        if(strlen($s)) {
@@ -495,9 +500,9 @@ function expand_acl($s) {
                return $a;
        }
        return array();
-}              
-
+}}             
 
+if(! function_exists('sanitise_acl')) {
 function sanitise_acl(&$item) {
        $item = '<' . intval(notags(trim($item))) . '>';
-}
+}}
index 1411ec6da9bd1240f73099cdb20189e508cd47b8..eeba76f7ee16de1b4baec5ddbb747052d499fa2f 100644 (file)
@@ -60,6 +60,9 @@ CREATE TABLE IF NOT EXISTS `contact` (
   `ret-id` char(255) NOT NULL,
   `ret-pubkey` text NOT NULL,
   `last-update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `name-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `uri-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `avatar-date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
   `priority` tinyint(3) NOT NULL,
   `blocked` tinyint(1) NOT NULL DEFAULT '1',
   `readonly` tinyint(1) NOT NULL DEFAULT '0',
index e74132c6a797d2f1fb217213bc66aae665b34ee4..876f92330cd825baf1a53a1f62b4d2ce167fc0b5 100644 (file)
@@ -61,6 +61,7 @@ function get_feed_for(&$a,$dfrn_id,$owner_id,$last_update) {
 
        $r = q("SELECT `item`.*, `item`.`id` AS `item_id`, 
                `contact`.`name`, `contact`.`photo`, `contact`.`url`, 
+               `contact`.`name-date`, `contact`.`uri-date`, `contact`.`avatar-date`,
                `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`, 
                `contact`.`id` AS `contact-id`, `contact`.`uid` AS `contact-uid`
                FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
@@ -91,7 +92,12 @@ function get_feed_for(&$a,$dfrn_id,$owner_id,$last_update) {
                        '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', $updated . '+00:00' , 'Y-m-d\TH:i:s\Z')) ,
                        '$name' => xmlify($owner['name']),
                        '$profile_page' => xmlify($owner['url']),
-                       '$photo' => xmlify($owner['photo'])
+                       '$photo' => xmlify($owner['photo']),
+                       '$picdate' => xmlify(datetime_convert('UTC','UTC',$owner['avatar-date'] . '+00:00' , 'Y-m-d\TH:i:s\Z')) ,
+                       '$uridate' => xmlify(datetime_convert('UTC','UTC',$owner['uri-date'] . '+00:00' , 'Y-m-d\TH:i:s\Z')) ,
+                       '$namdate' => xmlify(datetime_convert('UTC','UTC',$owner['name-date'] . '+00:00' , 'Y-m-d\TH:i:s\Z')) ,
+
+
        ));
 
        foreach($items as $item) {
index be073b93b0b2c33badf1fe8ca1c44d86aba87b83..0ef4d126afe447a338be39303f271a9dd379234e 100644 (file)
@@ -123,6 +123,51 @@ echo "Length:" . strlen($xml) . "\r\n";
                $feed->enable_order_by_date(false);
                $feed->init();
 
+               $photo_rawupdate = $feed->get_feed_tags(NAMESPACE_DFRN,'icon-updated');
+               if($photo_rawupdate) {
+                       $photo_timestamp = datetime_convert('UTC','UTC',$photo_rawupdate[0]['data']);
+                       $photo_url = $feed->get_image_url();
+                       if(strlen($photo_url) && $photo_timestamp > $contact['avatar-date']) {
+
+                               require_once("Photo.php");
+
+                               $photo_failure = false;
+
+                               $r = q("SELECT `resource-id` FROM `photo` WHERE `contact-id` = %d AND `uid` = %d LIMIT 1",
+                                       intval($contact['id']),
+                                       intval($contact['uid'])
+                               );
+                               if(count($r)) {
+                                       $resource_id = $r[0]['resource-id'];
+                                       $img_str = fetch_url($photo_url,true);
+                                       $img = new Photo($img_str);
+                                       if($img) {
+                                               q("DELETE FROM `photo` WHERE `resource-id` = '%s' AND contact-id` = %d AND `uid` = %d",
+                                                       dbesc($resource_id),
+                                                       intval($contact['id']),
+                                                       intval($contact['uid'])
+                                               );
+
+                                               $img->scaleImageSquare(175);
+                                       
+                                               $hash = $resource_id;
+
+                                               $r = $img->store($contact['uid'], $contact['id'], $hash, basename($photo_url), t('Contact Photos') , 4);
+                                       
+                                               $img->scaleImage(80);
+                                               $r = $img->store($contact['uid'], $contact['id'], $hash, basename($photo_url), t('Contact Photos') , 5);
+                                               if($r)
+                                                       q("UPDATE `contact` SET `avatar-date` = '%s' WHERE `uid` = %d AND `id` = %d LIMIT 1",
+                                                               dbesc(datetime_convert()),
+                                                               intval($contact['uid']),
+                                                               intval($contact['id'])
+                                                       );
+                                       }
+                               }
+                       }
+               }
+
+               
                foreach($feed->get_items() as $item) {
 
                        $deleted = false;
@@ -145,14 +190,16 @@ echo "Length:" . strlen($xml) . "\r\n";
                                );
                                if(count($r)) {
                                        if($r[0]['uri'] == $r[0]['parent-uri']) {
-                                               $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s'
+                                               $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s',
+                                                       `body` = '', `title` = ''
                                                        WHERE `parent-uri` = '%s'",
                                                        dbesc($when),
                                                        dbesc($r[0]['uri'])
                                                );
                                        }
                                        else {
-                                               $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s' 
+                                               $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s',
+                                                       `body` = '', `title` = '' 
                                                        WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
                                                        dbesc($when),
                                                        dbesc($uri),
index e27d6f04fa5efb51ed2b49ca087f48b777b6d493..2353355f0cb0717c16eafd2c181d934bcbd89ede 100644 (file)
--- a/index.php
+++ b/index.php
@@ -36,6 +36,7 @@ if(strlen($a->module)) {
                $a->module_loaded = true;
        }
        else {
+               header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . t('Not Found'));
                notice( t('Page not found' ) . EOL);
        }
 }
@@ -88,6 +89,11 @@ if(x($_SESSION,'sysmsg')) {
        unset($_SESSION['sysmsg']);
 }
 
+if(stristr($_SESSION['sysmsg'], t('Permission denied'))) {
+       header($_SERVER["SERVER_PROTOCOL"] . ' 403 ' . t('Permission denied.'));
+}
+
+
 // Feel free to comment out this line on production sites.
 $a->page['content'] .= $debug_text;
 
index a8a4b3b99cf3c9f734665fe0b7a18531e8780d1b..359ddef1772ffefeb115372a135387240863213b 100644 (file)
@@ -116,9 +116,12 @@ function dfrn_confirm_post(&$a) {
                                $thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
                        }
 
-                       $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `blocked` = 0, `pending` = 0 WHERE `id` = %d LIMIT 1",
+                       $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s', `blocked` = 0, `pending` = 0 WHERE `id` = %d LIMIT 1",
                                dbesc($photo),
                                dbesc($thumb),
+                               dbesc(datetime_convert()),
+                               dbesc(datetime_convert()),
+                               dbesc(datetime_convert()),
                                intval($dfrn_record)
                        );
                        if($r === false)
@@ -322,9 +325,12 @@ function dfrn_confirm_post(&$a) {
                        $thumb = $a->get_baseurl() . '/images/default-profile-sm.jpg';
                }
 
-               $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `blocked` = 0, `pending` = 0 WHERE `id` = %d LIMIT 1",
+               $r = q("UPDATE `contact` SET `photo` = '%s', `thumb` = '%s', `name-date` = '%s', `uri-date` = '%s', `avatar-date` = '%s', `blocked` = 0, `pending` = 0 WHERE `id` = %d LIMIT 1",
                        dbesc($photo),
                        dbesc($thumb),
+                       dbesc(datetime_convert()),
+                       dbesc(datetime_convert()),
+                       dbesc(datetime_convert()),
                        intval($contact_id)
                );
                if($r === false)
index 5655977e5a99cefa70ba978445c4979d7a6dfb36..6aed53a772615c945ce67ea3469dce6d5c06879e 100644 (file)
@@ -47,6 +47,9 @@ function dfrn_notify_post(&$a) {
        $feed->init();
 
        $ismail = false;
+       $photo_time = $feed->get_feed_tags( NAMESPACE_DFRN, 'icon-updated');
+       if($photo_time)
+               $avatar_update = $photo_time[0]['data'];
 
        $rawmail = $feed->get_feed_tags( NAMESPACE_DFRN, 'mail' );
        if(isset($rawmail[0]['child'][NAMESPACE_DFRN])) {
@@ -57,7 +60,7 @@ function dfrn_notify_post(&$a) {
                $msg['uid'] = $importer['uid'];
                $msg['from-name'] = notags(unxmlify($base['sender'][0]['child'][NAMESPACE_DFRN]['name'][0]['data']));
                $msg['from-photo'] = notags(unxmlify($base['sender'][0]['child'][NAMESPACE_DFRN]['avatar'][0]['data']));
-               $msg['from-url'] = notags(unxmlify($base['sender'][0]['child'][NAMESPACE_DFRN]['avatar'][0]['data']));
+               $msg['from-url'] = notags(unxmlify($base['sender'][0]['child'][NAMESPACE_DFRN]['uri'][0]['data']));
                $msg['contact-id'] = $importer['id'];
                $msg['title'] = notags(unxmlify($base['subject'][0]['data']));
                $msg['body'] = escape_tags(unxmlify($base['content'][0]['data']));
index 81d0718291f8d2649135d0bf1fb23cd7fb6bd81d..7b07f67295b593d61ed3550437c3ef2fab8b33e7 100644 (file)
@@ -375,7 +375,7 @@ function photos_post(&$a) {
                $dups = false;
                $item_hash = random_string();
 
-               $uri = "urn:X-dfrn:" . $a->get_hostname() . ':' . $profile_uid . ':' . $item_hash;
+               $uri = "urn:X-dfrn:" . $a->get_hostname() . ':' . $_SESSION['uid'] . ':' . $item_hash;
 
                $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' LIMIT 1",
                dbesc($uri));
index 151277249a1b7e8254691378c747c1ad032b354d..ebd9f1b48104caa8c3b44783ffcf0812011892b5 100644 (file)
@@ -74,6 +74,11 @@ function profile_photo_post(&$a) {
                                intval($_SESSION['uid'])
                        );
 
+                       $r = q("UPDATE `contact` SET `avatar-date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1",
+                               dbesc(datetime_convert()),
+                               intval($_SESSION['uid'])
+                       );
+
                }
                goaway($a->get_baseurl() . '/profiles');
                return; // NOTREACHED
index db442647446ab2c524e7599d394ed8fa4b8865d7..bfdff5f6b1371cd9fd1c8acc8b4d9136dcac2145 100644 (file)
@@ -7,16 +7,19 @@ function profiles_post(&$a) {
                notice( "Permission denied." . EOL);
                return;
        }
+
+       $namechanged = false;
+
        if(($a->argc > 1) && ($a->argv[1] != "new") && intval($a->argv[1])) {
-               $r = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+               $orig = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
                        intval($a->argv[1]),
                        intval($_SESSION['uid'])
                );
-               if(! count($r)) {
+               if(! count($orig)) {
                        $_SESSION['sysmsg'] .= "Profile not found." . EOL;
                        return;
                }
-               $is_default = (($r[0]['is-default']) ? 1 : 0);
+               $is_default = (($orig[0]['is-default']) ? 1 : 0);
 
                $profile_name = notags(trim($_POST['profile_name']));
                if(! strlen($profile_name)) {
@@ -39,6 +42,10 @@ function profiles_post(&$a) {
 
                        
                $name = notags(trim($_POST['name']));
+
+               if($orig[0]['name'] != $name)
+                       $namechanged = true;
+
                $gender = notags(trim($_POST['gender']));
                $address = notags(trim($_POST['address']));
                $locality = notags(trim($_POST['locality']));
@@ -132,7 +139,12 @@ function profiles_post(&$a) {
 
                        );
                }
-
+               if($namechanged && $is_default) {
+                       $r = q("UPDATE `contact` SET `name-date` = '%s' WHERE `self` = 1 AND `uid` = %d LIMIT 1",
+                               dbesc(datetime_convert()),
+                               intval($_SESSION['uid'])
+                       );
+               }
 
        }
 
index 62f4e60dcc8dbdc95deab52dbae2889d5ecdbf12..65b7fa6bed67b012723227fa8d520d50eb8f65d9 100644 (file)
@@ -138,8 +138,8 @@ function register_post(&$a) {
                        return;
                }
                $r = q("INSERT INTO `contact` ( `uid`, `created`, `self`, `name`, `photo`, `thumb`, `blocked`, `pending`, `url`,
-                       `request`, `notify`, `poll`, `confirm` )
-                       VALUES ( %d, '%s', 1, '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s' ) ",
+                       `request`, `notify`, `poll`, `confirm`, `name-date`, `uri-date`, `avatar-date` )
+                       VALUES ( %d, '%s', 1, '%s', '%s', '%s', 0, 0, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
                        intval($newuid),
                        datetime_convert(),
                        dbesc($username),
@@ -149,8 +149,10 @@ function register_post(&$a) {
                        dbesc($a->get_baseurl() . "/dfrn_request/$nickname"),
                        dbesc($a->get_baseurl() . "/dfrn_notify/$nickname"),
                        dbesc($a->get_baseurl() . "/dfrn_poll/$nickname"),
-                       dbesc($a->get_baseurl() . "/dfrn_confirm/$nickname")
-
+                       dbesc($a->get_baseurl() . "/dfrn_confirm/$nickname"),
+                       dbesc(datetime_convert()),
+                       dbesc(datetime_convert()),
+                       dbesc(datetime_convert())
                );
 
 
index cd5f469442dfd4a593d5c9a02acff80fc6f4fa4a..185e17bccf4b56c47d9689e1d83f392212cc3921 100644 (file)
@@ -2432,6 +2432,10 @@ class SimplePie
                        $uri = null;
                        $email = null;
                        $avatar = null;
+                       $name_date = null;
+                       $uri_date = null;
+                       $avatar_date = null;
+
                        if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
                        {
                                $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
@@ -2446,11 +2450,24 @@ class SimplePie
                        }
                        if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data']))
                        {
-                               $avatar = $this->sanitize($$author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]));
+                               $avatar = $this->sanitize($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]));
+                       }
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data']))
+                       {
+                               $name_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data'];
+                       }
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data']))
+                       {
+                               $uri_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data'];
                        }
-                       if ($name !== null || $email !== null || $uri !== null || $avatar !== null)
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data']))
                        {
-                               $authors[] = new $this->author_class($name, $uri, $email, $avatar);
+                               $avatar_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data'];
+                       }
+
+                       if ($name !== null || $email !== null || $uri !== null || $avatar !== null || $name_date !== null || $uri_date !== null || $avatar_date !== null )
+                       {
+                               $authors[] = new $this->author_class($name, $uri, $email, $avatar, $name_date, $uri_date, $avatar_date);
                        }
                }
                if ($author = $this->get_channel_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
@@ -3481,6 +3498,9 @@ class SimplePie_Item
                        $uri = null;
                        $email = null;
                        $avatar = null;
+                       $name_date = null;
+                       $uri_date = null;
+                       $avatar_date = null;
                        if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
                        {
                                $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
@@ -3497,10 +3517,22 @@ class SimplePie_Item
                        {
                                $avatar = $this->sanitize($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]));
                        }
-                       if ($name !== null || $email !== null || $uri !== null || $avatar !== null)
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data']))
+                       {
+                               $name_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data'];
+                       }
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data']))
+                       {
+                               $uri_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data'];
+                       }
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data']))
                        {
-                               $authors[] = new $this->feed->author_class($name, $uri, $email, $avatar);
+                               $avatar_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data'];
+                       }
 
+                       if ($name !== null || $email !== null || $uri !== null || $avatar !== null || $name_date !== null || $uri_date !== null || $avatar_date !== null )
+                       {
+                               $authors[] = new $this->feed->author_class($name, $uri, $email, $avatar, $name_date, $uri_date, $avatar_date);
                        }
                }
                if ($author = $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
@@ -5909,6 +5941,10 @@ class SimplePie_Source
                        $uri = null;
                        $email = null;
                        $avatar = null;
+                       $name_date = null;
+                       $uri_date = null;
+                       $avatar_date = null;
+
                        if (isset($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data']))
                        {
                                $name = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['name'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
@@ -5921,13 +5957,26 @@ class SimplePie_Source
                        {
                                $email = $this->sanitize($author['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['email'][0]['data'], SIMPLEPIE_CONSTRUCT_TEXT);
                        }
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data']))
                        {
                                $avatar = $this->sanitize($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar'][0]));
                        }
-                       if ($name !== null || $email !== null || $uri !== null || $avatar !== null)
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data']))
+                       {
+                               $name_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['name-updated'][0]['data'];
+                       }
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data']))
+                       {
+                               $uri_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['uri-updated'][0]['data'];
+                       }
+                       if (isset($author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data']))
                        {
-                               $authors[] = new $this->item->feed->author_class($name, $uri, $email, $avatar);
+                               $avatar_date = $author['child']['http://purl.org/macgirvin/dfrn/1.0']['avatar-updated'][0]['data'];
+                       }
 
+                       if ($name !== null || $email !== null || $uri !== null || $avatar !== null || $name_date !== null || $uri_date !== null || $avatar_date !== null )
+                       {
+                               $authors[] = new $this->item->feed->author_class($name, $uri, $email, $avatar, $name_date, $uri_date, $avatar_date);
                        }
                }
                if ($author = $this->get_source_tags(SIMPLEPIE_NAMESPACE_ATOM_03, 'author'))
@@ -6300,14 +6349,20 @@ class SimplePie_Author
        var $link;
        var $email;
        var $avatar;
+       var $name_date;
+       var $uri_date;
+       var $avatar_date;
 
        // Constructor, used to input the data
-       function SimplePie_Author($name = null, $link = null, $email = null, $avatar = null)
+       function SimplePie_Author($name = null, $link = null, $email = null, $avatar = null, $name_date = null, $uri_date = null, $avatar_date = null)
        {
                $this->name = $name;
                $this->link = $link;
                $this->email = $email;
                $this->avatar = $avatar;
+               $this->name_date = $name_date;
+               $this->uri_date = $uri_date;
+               $this->avatar_date = $avatar_date;
        }
 
        function __toString()
@@ -6364,6 +6419,40 @@ class SimplePie_Author
                }
        }
 
+       function get_name_date()
+       {
+               if ($this->name_date !== null)
+               {
+                       return $this->name_date;
+               }
+               else
+               {
+                       return null;
+               }
+       }
+       function get_uri_date()
+       {
+               if ($this->uri_date !== null)
+               {
+                       return $this->uri_date;
+               }
+               else
+               {
+                       return null;
+               }
+       }
+       function get_avatar_date()
+       {
+               if ($this->avatar_date !== null)
+               {
+                       return $this->avatar_date;
+               }
+               else
+               {
+                       return null;
+               }
+       }
+
 
 }
 
index a620a2578199ea6c2a9889d8670a9ce5a7b8b514..fc2816ef97a5a292c415c60d5093e002bb83fe0b 100644 (file)
@@ -7,14 +7,14 @@
   <id>$feed_id</id>
   <title>$feed_title</title>
   <icon>$photo</icon>
-  <dfrn:icon-updated>0000-00-00T00:00:00Z</dfrn:icon-updated>
+  <dfrn:icon-updated>$picdate</dfrn:icon-updated>
   <updated>$feed_updated</updated>
 
   <author>
     <name>$name</name>
-    <dfrn:name-updated>0000-00-00T00:00:00Z</dfrn:name-updated>
+    <dfrn:name-updated>$namdate</dfrn:name-updated>
     <uri>$profile_page</uri>
-    <dfrn:uri-updated>0000-00-00T00:00:00Z</dfrn:uri-updated>
+    <dfrn:uri-updated>$uridate</dfrn:uri-updated>
     <dfrn:avatar>$thumb</dfrn:avatar>
-    <dfrn:avatar-updated>0000-00-00T00:00:00Z</dfrn:avatar-updated>
+    <dfrn:avatar-updated>$picdate</dfrn:avatar-updated>
  </author>
index 78053fe0b5674ad4ad2ea3a012971d60f66f0768..73a155409f3185573b04f6db6775f35968adff86 100644 (file)
@@ -60,7 +60,7 @@ EOT;
 if($a->profile['marital']) {
 $o .= <<< EOT
 <div id="advanced-profile-marital-wrapper" >
-<div id="advanced-profile-marital-text">Status:</div>
+<div id="advanced-profile-marital-text"><span class="heart">&hearts;</span> Status:</div>
 <div id="advanced-profile-marital">{$a->profile['marital']}</div>
 </div>
 <div id="advanced-profile-marital-end"></div>
@@ -90,7 +90,7 @@ EOT;
 if($a->profile['politic']) {
 $o .= <<< EOT
 <div id="advanced-profile-politic-wrapper" >
-<div id="advanced-profile-politic-text">Political Leaning:</div>
+<div id="advanced-profile-politic-text">Political Views:</div>
 <div id="advanced-profile-politic">{$a->profile['politic']}</div>
 </div>
 <div id="advanced-profile-politic-end"></div>
@@ -121,7 +121,7 @@ EOT;
 if($txt = bbcode($a->profile['interest'])) {
 $o .= <<< EOT
 <div id="advanced-profile-interest-wrapper" >
-<div id="advanced-profile-interest-text">Interests/Hobbies:</div>
+<div id="advanced-profile-interest-text">Hobbies/Interests:</div>
 <br />
 <div id="advanced-profile-interest">$txt</div>
 </div>
@@ -132,7 +132,7 @@ EOT;
 if($txt = bbcode($a->profile['contact'])) {
 $o .= <<< EOT
 <div id="advanced-profile-contact-wrapper" >
-<div id="advanced-profile-contact-text">Contact:</div>
+<div id="advanced-profile-contact-text">Contact information and Social Networks:</div>
 <br />
 <div id="advanced-profile-contact">$txt</div>
 </div>
@@ -143,7 +143,7 @@ EOT;
 if($txt = bbcode($a->profile['music'])) {
 $o .= <<< EOT
 <div id="advanced-profile-music-wrapper" >
-<div id="advanced-profile-music-text">Music:</div>
+<div id="advanced-profile-music-text">Musical interests:</div>
 <br />
 <div id="advanced-profile-music">$txt</div>
 </div>
@@ -154,7 +154,7 @@ EOT;
 if($txt = bbcode($a->profile['book'])) {
 $o .= <<< EOT
 <div id="advanced-profile-book-wrapper" >
-<div id="advanced-profile-book-text">Books:</div>
+<div id="advanced-profile-book-text">Books, literature:</div>
 <br />
 <div id="advanced-profile-book">$txt</div>
 </div>
@@ -176,7 +176,7 @@ EOT;
 if($txt = bbcode($a->profile['film'])) {
 $o .= <<< EOT
 <div id="advanced-profile-film-wrapper" >
-<div id="advanced-profile-film-text">Film:</div>
+<div id="advanced-profile-film-text">Film/dance/culture/entertainment:</div>
 <br />
 <div id="advanced-profile-film">$txt</div>
 </div>
@@ -187,7 +187,7 @@ EOT;
 if($txt = bbcode($a->profile['romance'])) {
 $o .= <<< EOT
 <div id="advanced-profile-romance-wrapper" >
-<div id="advanced-profile-romance-text">Romance:</div>
+<div id="advanced-profile-romance-text">Love/romance:</div>
 <br />
 <div id="advanced-profile-romance">$txt</div>
 </div>
@@ -198,7 +198,7 @@ EOT;
 if($txt = bbcode($a->profile['work'])) {
 $o .= <<< EOT
 <div id="advanced-profile-work-wrapper" >
-<div id="advanced-profile-work-text">work:</div>
+<div id="advanced-profile-work-text">Work/employment:</div>
 <br />
 <div id="advanced-profile-work">$txt</div>
 </div>
@@ -209,7 +209,7 @@ EOT;
 if($txt = bbcode($a->profile['education'])) {
 $o .= <<< EOT
 <div id="advanced-profile-education-wrapper" >
-<div id="advanced-profile-education-text">Education:</div>
+<div id="advanced-profile-education-text">School/education:</div>
 <br />
 <div id="advanced-profile-education">$txt</div>
 </div>
index 777f938b82ea7f93d809c6847bb1012fa7898be3..c3dee16c30a8353a6e640043f67cb76094a87061 100644 (file)
@@ -832,7 +832,7 @@ input#dfrn-url {
 #advanced-profile-romance-text,
 #advanced-profile-work-text,
 #advanced-profile-education-text {
-       width: 250px;
+       width: 300px;
        float: left;
 }