]> git.mxchange.org Git - friendica.git/commitdiff
add first,last to D* vcard
authorFriendika <info@friendika.com>
Sun, 9 Oct 2011 22:49:51 +0000 (15:49 -0700)
committerFriendika <info@friendika.com>
Sun, 9 Oct 2011 22:49:51 +0000 (15:49 -0700)
boot.php
view/diaspora_vcard.tpl

index b53dfb531d5550afb3936b2d02ba1ad712019a17..c8ec846810865eab338f174004d8dfb1fa0a25f3 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -8,7 +8,7 @@ require_once("include/pgettext.php");
 require_once('include/nav.php');
 
 define ( 'FRIENDIKA_PLATFORM',     'Free Friendika');
-define ( 'FRIENDIKA_VERSION',      '2.3.1128' );
+define ( 'FRIENDIKA_VERSION',      '2.3.1129' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.21'    );
 define ( 'DB_UPDATE_VERSION',      1094      );
 
@@ -920,11 +920,17 @@ function profile_sidebar($profile, $block = 0) {
                $location = $pdesc = $connect = $gender = $marital = $homepage = False;
        }
 
+       $firstname = ((strpos($profile['name'],' ')) 
+               ? trim(substr($profile['name'],0,strpos($profile['name'],' '))) : $profile['name']);
+       $lastname = (($firstname === $profile['name']) ? '' : trim(substr($profile['name'],strlen($firstname))));
+
        $diaspora = array(
                'podloc' => $a->get_baseurl(),
                'searchable' => (($profile['publish'] && $profile['net-publish']) ? 'true' : 'false' ),
                'nickname ' => $profile['nickname'],
                'fullname' => $profile['name'],
+               'firstname' => $firstname,
+               'lastname' => $lastname,
                'photo300' => $a->get_baseurl() . '/photo/custom/300/' . $profile['uid'] . '.jpg',
                'photo100' => $a->get_baseurl() . '/photo/custom/100/' . $profile['uid'] . '.jpg',
                'photo50' => $a->get_baseurl() . '/photo/custom/50/'  . $profile['uid'] . '.jpg',
index aa2c9eded952d248149e10fa09c7ab8204d10876..684b1d18def18bc53b095d33ac0c5c57bd242ee4 100644 (file)
                        <span class='fn'>$diaspora.fullname</span>
                </dd>
        </dl>
+
+       <dl class='entity_given_name'>
+               <dt>First name</dt>
+               <dd>
+               <span class='given_name'>$diaspora.firstname</span>
+               </dd>
+       </dl>
+       <dl class='entity_family_name'>
+               <dt>Family name</dt>
+               <dd>
+               <span class='family_name'>$diaspora.lastname</span>
+               </dd>
+       </dl>
        <dl class="entity_url">
                <dt>URL</dt>
                <dd>