]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #2807 from Hypolite/frio-larger-view-develop
authorrabuzarus <rabuzarus@t-online.de>
Wed, 28 Sep 2016 18:32:11 +0000 (20:32 +0200)
committerGitHub <noreply@github.com>
Wed, 28 Sep 2016 18:32:11 +0000 (20:32 +0200)
[frio] Changes to shared post display (width, base font size)

31 files changed:
.gitignore
boot.php
database.sql
doc/api.md
include/Contact.php
include/api.php
include/dbstructure.php
include/delivery.php
include/dfrn.php
include/identity.php
include/notifier.php
mod/contacts.php
mod/profiles.php
mod/settings.php
update.php
view/templates/contact_edit.tpl
view/templates/field_radio.tpl
view/templates/pagetypes.tpl
view/templates/profile_edit.tpl
view/templates/profile_vcard.tpl
view/theme/frio/css/style.css
view/theme/frio/templates/contact_edit.tpl
view/theme/frio/templates/profile_edit.tpl
view/theme/frio/templates/profile_vcard.tpl
view/theme/frost/style.css
view/theme/frost/templates/profile_edit.tpl
view/theme/frost/templates/profile_vcard.tpl
view/theme/quattro/templates/profile_vcard.tpl
view/theme/vier/templates/contact_edit.tpl
view/theme/vier/templates/profile_edit.tpl
view/theme/vier/templates/profile_vcard.tpl

index b300f579e299ab2526462792c2ac1bf03a338c83..8376ea87e8e5e8303d442e3e13e1b269ab3d7372 100644 (file)
@@ -42,3 +42,9 @@ nbproject
 \r
 #ignore local folder\r
 /local/\r
+\r
+#ignore config files from Visual Studio\r
+/.vs/\r
+/php_friendica.phpproj\r
+/php_friendica.sln\r
+/php_friendica.phpproj.user\r
index c979dde7694d19973621c7dcf79ec5b08e2f41e7..ea14428fd0565f2fc6fe5fbb4ba8a5d468d34044 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -38,7 +38,7 @@ define ( 'FRIENDICA_PLATFORM',     'Friendica');
 define ( 'FRIENDICA_CODENAME',     'Asparagus');
 define ( 'FRIENDICA_VERSION',      '3.5.1-dev' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.23'    );
-define ( 'DB_UPDATE_VERSION',      1202      );
+define ( 'DB_UPDATE_VERSION',      1203      );
 
 /**
  * @brief Constant with a HTML line break.
@@ -181,6 +181,28 @@ define ( 'PAGE_BLOG',              4 );
 define ( 'PAGE_PRVGROUP',          5 );
 /** @}*/
 
+/**
+ * @name account types
+ *
+ * ACCOUNT_TYPE_PERSON - the account belongs to a person
+ *     Associated page types: PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE
+ *
+ * ACCOUNT_TYPE_ORGANISATION - the account belongs to an organisation
+ *     Associated page type: PAGE_SOAPBOX
+ *
+ * ACCOUNT_TYPE_NEWS - the account is a news reflector
+ *     Associated page type: PAGE_SOAPBOX
+ *
+ * ACCOUNT_TYPE_COMMUNITY - the account is community forum
+ *     Associated page types: PAGE_COMMUNITY, PAGE_PRVGROUP
+ * @{
+ */
+define ( 'ACCOUNT_TYPE_PERSON',      0 );
+define ( 'ACCOUNT_TYPE_ORGANISATION',1 );
+define ( 'ACCOUNT_TYPE_NEWS',        2 );
+define ( 'ACCOUNT_TYPE_COMMUNITY',   3 );
+/** @}*/
+
 /**
  * @name CP
  * 
index 03ebc5fe4a801092e3a5c64ad234d9f2e49cecb2..ecd2be1529f4e29b963f1fb47355a9d07738b08b 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
--- Friendica 3.5-dev (Asparagus)
--- DB_UPDATE_VERSION 1200
+-- Friendica 3.5.1-dev (Asparagus)
+-- DB_UPDATE_VERSION 1203
 -- ------------------------------------------
 
 
@@ -118,6 +118,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
        `about` text,
        `keywords` text,
        `gender` varchar(32) NOT NULL DEFAULT '',
+       `xmpp` varchar(255) NOT NULL DEFAULT '',
        `attag` varchar(255) NOT NULL DEFAULT '',
        `avatar` varchar(255) NOT NULL DEFAULT '',
        `photo` text,
@@ -157,6 +158,7 @@ CREATE TABLE IF NOT EXISTS `contact` (
        `writable` tinyint(1) NOT NULL DEFAULT 0,
        `forum` tinyint(1) NOT NULL DEFAULT 0,
        `prv` tinyint(1) NOT NULL DEFAULT 0,
+       `contact-type` int(11) unsigned NOT NULL DEFAULT 0,
        `hidden` tinyint(1) NOT NULL DEFAULT 0,
        `archive` tinyint(1) NOT NULL DEFAULT 0,
        `pending` tinyint(1) NOT NULL DEFAULT 1,
@@ -771,6 +773,17 @@ CREATE TABLE IF NOT EXISTS `poll_result` (
         INDEX `choice` (`choice`)
 ) DEFAULT CHARSET=utf8mb4;
 
+--
+-- TABLE process
+--
+CREATE TABLE IF NOT EXISTS `process` (
+       `pid` int(10) unsigned NOT NULL,
+       `command` varchar(32) NOT NULL DEFAULT '',
+       `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+        PRIMARY KEY(`pid`),
+        INDEX `command` (`command`)
+) DEFAULT CHARSET=utf8mb4;
+
 --
 -- TABLE profile
 --
@@ -812,6 +825,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
        `education` text,
        `contact` text,
        `homepage` varchar(255) NOT NULL DEFAULT '',
+       `xmpp` varchar(255) NOT NULL DEFAULT '',
        `photo` varchar(255) NOT NULL DEFAULT '',
        `thumb` varchar(255) NOT NULL DEFAULT '',
        `publish` tinyint(1) NOT NULL DEFAULT 0,
@@ -1048,6 +1062,7 @@ CREATE TABLE IF NOT EXISTS `user` (
        `cntunkmail` int(11) NOT NULL DEFAULT 10,
        `notify-flags` int(11) unsigned NOT NULL DEFAULT 65535,
        `page-flags` int(11) unsigned NOT NULL DEFAULT 0,
+       `account-type` int(11) unsigned NOT NULL DEFAULT 0,
        `prvnets` tinyint(1) NOT NULL DEFAULT 0,
        `pwdreset` varchar(255) NOT NULL DEFAULT '',
        `maxreq` int(11) NOT NULL DEFAULT 10,
index 0570e8e9908b2c2c2619b3e491c2c2f978ba98b4..bf1507adba7527bb20e62d7b71a92369212e46d1 100644 (file)
@@ -744,6 +744,38 @@ On success:
 On error:\r
 * different JSON returns {"result":"error","message":"searchstring not specified"}\r
 \r
+---\r
+### friendica/profile/show (GET; AUTH)\r
+show data of all profiles or a single profile of the authenticated user\r
+\r
+#### Parameters\r
+* profile_id: id of the profile to be returned (optional, if omitted all profiles are returned by default)\r
+\r
+#### Return values\r
+On success: Array of:\r
+\r
+* multi_profiles: true if user has activated multi_profiles\r
+* global_dir: URL of the global directory set in server settings\r
+* friendica_owner: user data of the authenticated user\r
+* profiles: array of the profile data\r
+\r
+On error: \r
+HTTP 403 Forbidden: when no authentication provided\r
+HTTP 400 Bad Request: if given profile_id is not in db or not assigned to authenticated user\r
+\r
+General description of profile data in API returns:\r
+* profile_id\r
+* profile_name\r
+* is_default: true if this is the public profile\r
+* hide_friends: true if friends are hidden\r
+* profile_photo\r
+* profile_thumb\r
+* publish: true if published on the server's local directory\r
+* net_publish: true if published to global_dir\r
+* description ... homepage: different data fields from 'profile' table in database\r
+* users: array with the users allowed to view this profile (empty if is_default=true)\r
+\r
+\r
 ---\r
 ## Not Implemented API calls\r
 The following API calls are implemented in GNU Social but not in Friendica: (incomplete)\r
index 1dbf21c73755557b84a1dfcfa73c997380498886..004d3aa2870fbbf22e6cba883416977485e3cf88 100644 (file)
@@ -209,21 +209,21 @@ function get_contact_details_by_url($url, $uid = -1, $default = array()) {
 
        // Fetch contact data from the contact table for the given user
        $r = q("SELECT `id`, `id` AS `cid`, 0 AS `gid`, 0 AS `zid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`,
-                       `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `bd` AS `birthday`, `self`
+                       `xmpp`, `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `bd` AS `birthday`, `self`
                FROM `contact` WHERE `nurl` = '%s' AND `uid` = %d",
                        dbesc(normalise_link($url)), intval($uid));
 
        // Fetch the data from the contact table with "uid=0" (which is filled automatically)
        if (!$r)
                $r = q("SELECT `id`, 0 AS `cid`, `id` AS `zid`, 0 AS `gid`, `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`,
-                               `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `bd` AS `birthday`, 0 AS `self`
+                               `xmpp`, `keywords`, `gender`, `photo`, `thumb`, `micro`, `forum`, `prv`, (`forum` | `prv`) AS `community`, `bd` AS `birthday`, 0 AS `self`
                        FROM `contact` WHERE `nurl` = '%s' AND `uid` = 0",
                                dbesc(normalise_link($url)));
 
        // Fetch the data from the gcontact table
        if (!$r)
                $r = q("SELECT 0 AS `id`, 0 AS `cid`, `id` AS `gid`, 0 AS `zid`, 0 AS `uid`, `url`, `nurl`, `alias`, `network`, `name`, `nick`, `addr`, `location`, `about`,
-                               `keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `birthday`, 0 AS `self`
+                               '' AS `xmpp`, `keywords`, `gender`, `photo`, `photo` AS `thumb`, `photo` AS `micro`, `community` AS `forum`, 0 AS `prv`, `community`, `birthday`, 0 AS `self`
                        FROM `gcontact` WHERE `nurl` = '%s'",
                                dbesc(normalise_link($url)));
 
index a9c5e7a46820736fb22faf6adcca65efbccbc506..b93f8cf72a32b0ce14dcabe9f1754b54f17431c1 100644 (file)
 
        }
 
+
+       /**
+        * @brief return data from profiles
+        *
+        * @param array $profile array containing data from db table 'profile'
+        * @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
+        * @return array
+        */
+       function api_format_items_profiles(&$profile = null, $type = "json") {
+               if ($profile != null) {
+                       $profile = array('profile_id' => $profile['id'],
+                                                       'profile_name' => $profile['profile-name'],
+                                                       'is_default' => $profile['is-default'] ? true : false,
+                                                       'hide_friends'=> $profile['hide-friends'] ? true : false,
+                                                       'profile_photo' => $profile['photo'],
+                                                       'profile_thumb' => $profile['thumb'],
+                                                       'publish' => $profile['publish'] ? true : false,
+                                                       'net_publish' => $profile['net-publish'] ? true : false,
+                                                       'description' => $profile['pdesc'],
+                                                       'date_of_birth' => $profile['dob'],
+                                                       'address' => $profile['address'],
+                                                       'city' => $profile['locality'],
+                                                       'region' => $profile['region'],
+                                                       'postal_code' => $profile['postal-code'],
+                                                       'country' => $profile['country-name'],
+                                                       'hometown' => $profile['hometown'],
+                                                       'gender' => $profile['gender'],
+                                                       'marital' => $profile['marital'],
+                                                       'marital_with' => $profile['with'],
+                                                       'marital_since' => $profile['howlong'],
+                                                       'sexual' => $profile['sexual'],
+                                                       'politic' => $profile['politic'],
+                                                       'religion' => $profile['religion'],
+                                                       'public_keywords' => $profile['pub_keywords'],
+                                                       'private_keywords' => $profile['prv_keywords'],
+                                                       'likes' => bbcode(api_clean_plain_items($profile['likes']), false, false, 2, true),
+                                                       'dislikes' => bbcode(api_clean_plain_items($profile['dislikes']), false, false, 2, true),
+                                                       'about' => bbcode(api_clean_plain_items($profile['about']), false, false, 2, true),
+                                                       'music' => bbcode(api_clean_plain_items($profile['music']), false, false, 2, true),
+                                                       'book' => bbcode(api_clean_plain_items($profile['book']), false, false, 2, true),
+                                                       'tv' => bbcode(api_clean_plain_items($profile['tv']), false, false, 2, true),
+                                                       'film' => bbcode(api_clean_plain_items($profile['film']), false, false, 2, true),
+                                                       'interest' => bbcode(api_clean_plain_items($profile['interest']), false, false, 2, true),
+                                                       'romance' => bbcode(api_clean_plain_items($profile['romance']), false, false, 2, true),
+                                                       'work' => bbcode(api_clean_plain_items($profile['work']), false, false, 2, true),
+                                                       'education' => bbcode(api_clean_plain_items($profile['education']), false, false, 2, true),
+                                                       'social_networks' => bbcode(api_clean_plain_items($profile['contact']), false, false, 2, true),
+                                                       'homepage' => $profile['homepage'],
+                                                       'users' => null);
+                       return $profile;
+               } 
+       }
+
        /**
         * @brief format items to be returned by api
         *
        api_register_func('api/friendica/direct_messages_search', 'api_friendica_direct_messages_search', true);
 
 
+       /**
+        * @brief return data of all the profiles a user has to the client
+        *
+        * @param string $type Known types are 'atom', 'rss', 'xml' and 'json'
+        * @return string
+        */
+       function api_friendica_profile_show($type){
+               $a = get_app();
+
+               if (api_user()===false) throw new ForbiddenException();
+
+               // input params
+               $profileid = (x($_REQUEST,'profile_id') ? $_REQUEST['profile_id'] : 0);
+
+               // retrieve general information about profiles for user
+               $multi_profiles = feature_enabled(api_user(),'multi_profiles');
+               $directory = get_config('system', 'directory');
+
+// get data of the specified profile id or all profiles of the user if not specified
+               if ($profileid != 0) {
+                       $r = q("SELECT * FROM `profile` WHERE `uid` = %d AND `id` = %d",
+                               intval(api_user()),
+                               intval($profileid));
+                       // error message if specified gid is not in database
+                       if (count($r) == 0)
+                               throw new BadRequestException("profile_id not available");
+               }
+               else
+                       $r = q("SELECT * FROM `profile` WHERE `uid` = %d",
+                               intval(api_user()));
+
+               // loop through all returned profiles and retrieve data and users
+               $k = 0;
+               foreach ($r as $rr) {
+                       $profile = api_format_items_profiles($rr, $type);
+
+                       // select all users from contact table, loop and prepare standard return for user data
+                       $users = array();
+                       $r = q("SELECT `id`, `nurl` FROM `contact` WHERE `uid`= %d AND `profile-id` = %d",
+                               intval(api_user()),
+                               intval($rr['profile_id']));
+
+                       foreach ($r as $rr) {
+                               $user = api_get_user($a, $rr['nurl']);
+                               ($type == "xml") ? $users[$k++.":user"] = $user : $users[] = $user;
+                       }
+                       $profile['users'] = $users;
+
+                       // add prepared profile data to array for final return
+                       if ($type == "xml") {
+                               $profiles[$k++.":profile"] = $profile;
+                       } else {
+                               $profiles[] = $profile;
+                       }
+               }
+
+               // return settings, authenticated user and profiles data
+               $result = array('multi_profiles' => $multi_profiles ? true : false,
+                                               'global_dir' => $directory,
+                                               'friendica_owner' => api_get_user($a, intval(api_user())),
+                                               'profiles' => $profiles);
+               return api_format_data("friendica_profiles", $type, array('$result' => $result));
+       }
+       api_register_func('api/friendica/profile/show', 'api_friendica_profile_show', true, API_METHOD_GET);
+
 /*
 To.Do:
     [pagename] => api/1.1/statuses/lookup.json
@@ -3905,6 +4023,9 @@ account/update_profile_background_image
 account/update_profile_image
 blocks/create
 blocks/destroy
+friendica/profile/update
+friendica/profile/create
+friendica/profile/delete
 
 Not implemented in status.net:
 statuses/retweeted_to_me
index e7514872fd31de12e65012685a82b47b2dac38bf..411def5d0d942ef7924736f437e96825f21cf749 100644 (file)
@@ -459,6 +459,7 @@ function db_definition() {
                                        "about" => array("type" => "text"),
                                        "keywords" => array("type" => "text"),
                                        "gender" => array("type" => "varchar(32)", "not null" => "1", "default" => ""),
+                                       "xmpp" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "attag" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "avatar" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "photo" => array("type" => "text"),
@@ -498,6 +499,7 @@ function db_definition() {
                                        "writable" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "forum" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "prv" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
+                                       "contact-type" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
                                        "hidden" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "archive" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "pending" => array("type" => "tinyint(1)", "not null" => "1", "default" => "1"),
@@ -1164,6 +1166,7 @@ function db_definition() {
                                        "education" => array("type" => "text"),
                                        "contact" => array("type" => "text"),
                                        "homepage" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
+                                       "xmpp" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "photo" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "thumb" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "publish" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
@@ -1400,6 +1403,7 @@ function db_definition() {
                                        "cntunkmail" => array("type" => "int(11)", "not null" => "1", "default" => "10"),
                                        "notify-flags" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "65535"),
                                        "page-flags" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
+                                       "account-type" => array("type" => "int(11) unsigned", "not null" => "1", "default" => "0"),
                                        "prvnets" => array("type" => "tinyint(1)", "not null" => "1", "default" => "0"),
                                        "pwdreset" => array("type" => "varchar(255)", "not null" => "1", "default" => ""),
                                        "maxreq" => array("type" => "int(11)", "not null" => "1", "default" => "10"),
index fe337743820dcb85940262fefdb4abe099c4d530..7c0ba63a6b41b9649cf30e925df64cf089e6ccd8 100644 (file)
@@ -178,7 +178,7 @@ function delivery_run(&$argv, &$argc){
 
                $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`,
                        `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
-                       `user`.`page-flags`, `user`.`prvnets`
+                       `user`.`page-flags`, `user`.`account-type`, `user`.`prvnets`
                        FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
                        WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
                        intval($uid)
index 27fc644c6b21d2dbbf99d6b17f36c43cb1dfaa52..e9cfb228f65f7b8781bdc23cbe283fdf88e04e36 100644 (file)
@@ -98,9 +98,9 @@ class dfrn {
 
                $sql_extra = " AND `item`.`allow_cid` = '' AND `item`.`allow_gid` = '' AND `item`.`deny_cid`  = '' AND `item`.`deny_gid`  = '' ";
 
-               $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags`
+               $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags`, `user`.`account-type`
                        FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
-                       WHERE `contact`.`self` = 1 AND `user`.`nickname` = '%s' LIMIT 1",
+                       WHERE `contact`.`self` AND `user`.`nickname` = '%s' LIMIT 1",
                        dbesc($owner_nick)
                );
 
@@ -440,9 +440,13 @@ class dfrn {
                        xml::add_element($doc, $root, "link", "", $attributes);
                }
 
+               // For backward compatibility we keep this element
                if ($owner['page-flags'] == PAGE_COMMUNITY)
                        xml::add_element($doc, $root, "dfrn:community", 1);
 
+               // The former element is replaced by this one
+               xml::add_element($doc, $root, "dfrn:account_type", $owner["account-type"]);
+
                /// @todo We need a way to transmit the different page flags like "PAGE_PRVGROUP"
 
                xml::add_element($doc, $root, "updated", datetime_convert("UTC", "UTC", "now", ATOM_TIME));
@@ -512,14 +516,16 @@ class dfrn {
                        xml::add_element($doc, $author, "dfrn:birthday", $birthday);
 
                // Only show contact details when we are allowed to
-               $r = q("SELECT `profile`.`about`, `profile`.`name`, `profile`.`homepage`, `user`.`nickname`, `user`.`timezone`,
-                               `profile`.`locality`, `profile`.`region`, `profile`.`country-name`, `profile`.`pub_keywords`, `profile`.`dob`
+               $r = q("SELECT `profile`.`about`, `profile`.`name`, `profile`.`homepage`, `user`.`nickname`,
+                               `user`.`timezone`, `profile`.`locality`, `profile`.`region`, `profile`.`country-name`,
+                               `profile`.`pub_keywords`, `profile`.`xmpp`, `profile`.`dob`
                        FROM `profile`
                                INNER JOIN `user` ON `user`.`uid` = `profile`.`uid`
                                WHERE `profile`.`is-default` AND NOT `user`.`hidewall` AND `user`.`uid` = %d",
                        intval($owner['uid']));
                if ($r) {
                        $profile = $r[0];
+
                        xml::add_element($doc, $author, "poco:displayName", $profile["name"]);
                        xml::add_element($doc, $author, "poco:updated", $namdate);
 
@@ -550,12 +556,10 @@ class dfrn {
 
                        }
 
-                       /// @todo When we are having the XMPP address in the profile we should propagate it here
-                       $xmpp = "";
-                       if (trim($xmpp) != "") {
+                       if (trim($profile["xmpp"]) != "") {
                                $ims = $doc->createElement("poco:ims");
                                xml::add_element($doc, $ims, "poco:type", "xmpp");
-                               xml::add_element($doc, $ims, "poco:value", $xmpp);
+                               xml::add_element($doc, $ims, "poco:value", $profile["xmpp"]);
                                xml::add_element($doc, $ims, "poco:primary", "true");
                                $author->appendChild($ims);
                        }
@@ -1143,7 +1147,7 @@ class dfrn {
                $author["link"] = $xpath->evaluate($element."/atom:uri/text()", $context)->item(0)->nodeValue;
 
                $r = q("SELECT `id`, `uid`, `url`, `network`, `avatar-date`, `name-date`, `uri-date`, `addr`,
-                               `name`, `nick`, `about`, `location`, `keywords`, `bdyear`, `bd`, `hidden`
+                               `name`, `nick`, `about`, `location`, `keywords`, `xmpp`, `bdyear`, `bd`, `hidden`
                                FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `network` != '%s'",
                        intval($importer["uid"]), dbesc(normalise_link($author["link"])), dbesc(NETWORK_STATUSNET));
                if ($r) {
@@ -1219,9 +1223,13 @@ class dfrn {
                        if ($value != "")
                                $poco["location"] = $value;
 
+                       /// @todo Only search for elements with "poco:type" = "xmpp"
+                       $value = $xpath->evaluate($element."/poco:ims/poco:value/text()", $context)->item(0)->nodeValue;
+                       if ($value != "")
+                               $poco["xmpp"] = $value;
+
                        /// @todo Add support for the following fields that we don't support by now in the contact table:
                        /// - poco:utcOffset
-                       /// - poco:ims
                        /// - poco:urls
                        /// - poco:locality
                        /// - poco:region
@@ -1308,12 +1316,13 @@ class dfrn {
 
                                q("UPDATE `contact` SET `name` = '%s', `nick` = '%s', `about` = '%s', `location` = '%s',
                                        `addr` = '%s', `keywords` = '%s', `bdyear` = '%s', `bd` = '%s', `hidden` = %d,
-                                       `name-date`  = '%s', `uri-date` = '%s'
+                                       `xmpp` = '%s', `name-date`  = '%s', `uri-date` = '%s'
                                        WHERE `id` = %d AND `network` = '%s'",
                                        dbesc($contact["name"]), dbesc($contact["nick"]), dbesc($contact["about"]), dbesc($contact["location"]),
                                        dbesc($contact["addr"]), dbesc($contact["keywords"]), dbesc($contact["bdyear"]),
-                                       dbesc($contact["bd"]), intval($contact["hidden"]), dbesc($contact["name-date"]),
-                                       dbesc($contact["uri-date"]), intval($contact["id"]), dbesc($contact["network"]));
+                                       dbesc($contact["bd"]), intval($contact["hidden"]), dbesc($contact["xmpp"]),
+                                       dbesc($contact["name-date"]), dbesc($contact["uri-date"]),
+                                       intval($contact["id"]), dbesc($contact["network"]));
                        }
 
                        update_contact_avatar($author["avatar"], $importer["uid"], $contact["id"],
index 91b31c078484b84563c83867a50507cb20afe561..def50a98fc560316632d1814a972bbc74bd35682 100644 (file)
@@ -337,6 +337,8 @@ function profile_sidebar($profile, $block = 0) {
 
        $about = ((x($profile,'about') == 1) ?  t('About:') : False);
 
+       $xmpp = ((x($profile,'xmpp') == 1) ?  t('XMPP:') : False);
+
        if(($profile['hidewall'] || $block) && (! local_user()) && (! remote_user())) {
                $location = $pdesc = $gender = $marital = $homepage = $about = False;
        }
@@ -405,6 +407,7 @@ function profile_sidebar($profile, $block = 0) {
        $tpl = get_markup_template('profile_vcard.tpl');
        $o .= replace_macros($tpl, array(
                '$profile' => $p,
+               '$xmpp' => $xmpp,
                '$connect'  => $connect,
                '$remoteconnect'  => $remoteconnect,
                '$subscribe_feed' => $subscribe_feed,
index 0610a4e398df5a9baba95ba58e4e9df7a6927b03..584555d4ac40989f31c95b928b31f3e55563df35 100644 (file)
@@ -134,7 +134,7 @@ function notifier_run(&$argv, &$argc){
        } elseif($cmd === 'removeme') {
                $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`,
                                `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
-                               `user`.`page-flags`, `user`.`prvnets`, `user`.`guid`
+                               `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`, `user`.`guid`
                        FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
                                WHERE `contact`.`uid` = %d AND `contact`.`self` LIMIT 1",
                                intval($item_id));
@@ -204,7 +204,7 @@ function notifier_run(&$argv, &$argc){
 
        $r = q("SELECT `contact`.*, `user`.`pubkey` AS `upubkey`, `user`.`prvkey` AS `uprvkey`,
                `user`.`timezone`, `user`.`nickname`, `user`.`sprvkey`, `user`.`spubkey`,
-               `user`.`page-flags`, `user`.`prvnets`
+               `user`.`page-flags`, `user`.`prvnets`, `user`.`account-type`
                FROM `contact` INNER JOIN `user` ON `user`.`uid` = `contact`.`uid`
                WHERE `contact`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
                intval($uid)
index ba8ad45c39926568deceb9fab40f1e945cefef86..be8135f5cbc4cb1ad722eb8ba4c85df16db9aede 100644 (file)
@@ -626,6 +626,8 @@ function contacts_content(&$a) {
                        'account_type' => (($contact['forum'] || $contact['prv']) ? t('Forum') : ''),
                        '$location' => bbcode($contact["location"]),
                        '$location_label' => t("Location:"),
+                       '$xmpp' => bbcode($contact["xmpp"]),
+                       '$xmpp_label' => t("XMPP:"),
                        '$about' => bbcode($contact["about"], false, false),
                        '$about_label' => t("About:"),
                        '$keywords' => $contact["keywords"],
index d770e75c3af21f52549517f359f8aee257d08817..943742e3a2edfd7dfbc076656fafd5fa43595d59 100644 (file)
@@ -303,6 +303,7 @@ function profiles_post(&$a) {
                }
 
                $sexual = notags(trim($_POST['sexual']));
+               $xmpp = notags(trim($_POST['xmpp']));
                $homepage = notags(trim($_POST['homepage']));
                if ((strpos($homepage, 'http') !== 0) && (strlen($homepage))) {
                        // neither http nor https in URL, add them
@@ -368,6 +369,10 @@ function profiles_post(&$a) {
                                $changes[] = t('Sexual Preference');
                                $value = $sexual;
                        }
+                       if($xmpp != $orig[0]['xmpp']) {
+                               $changes[] = t('XMPP');
+                               $value = $xmpp;
+                       }
                        if($homepage != $orig[0]['homepage']) {
                                $changes[] = t('Homepage');
                                $value = $homepage;
@@ -409,6 +414,7 @@ function profiles_post(&$a) {
                        `with` = '%s',
                        `howlong` = '%s',
                        `sexual` = '%s',
+                       `xmpp` = '%s',
                        `homepage` = '%s',
                        `hometown` = '%s',
                        `politic` = '%s',
@@ -443,6 +449,7 @@ function profiles_post(&$a) {
                        dbesc($with),
                        dbesc($howlong),
                        dbesc($sexual),
+                       dbesc($xmpp),
                        dbesc($homepage),
                        dbesc($hometown),
                        dbesc($politic),
@@ -725,6 +732,7 @@ function profiles_content(&$a) {
                        '$howlong' => array('howlong', t('Since [date]:'), ($r[0]['howlong'] === '0000-00-00 00:00:00' ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong']))),
                        '$sexual' => sexpref_selector($r[0]['sexual']),
                        '$about' => array('about', t('Tell us about yourself...'), $r[0]['about']),
+                       '$xmpp' => array('xmpp', t('XMPP (Jabber) address:'), $r[0]['xmpp'], t("The XMPP address will be propagated to your contacts so that they can follow you.")),
                        '$homepage' => array('homepage', t('Homepage URL:'), $r[0]['homepage']),
                        '$hometown' => array('hometown', t('Hometown:'), $r[0]['hometown']),
                        '$politic' => array('politic', t('Political Views:'), $r[0]['politic']),
index e2d3f4d367bf94ebdea47c62c85d3df3fb5d8f22..908d828456650584f7cdc47874db9895ffdb261d 100644 (file)
@@ -420,6 +420,7 @@ function settings_post(&$a) {
        $publish          = (((x($_POST,'profile_in_directory')) && (intval($_POST['profile_in_directory']) == 1)) ? 1: 0);
        $net_publish      = (((x($_POST,'profile_in_netdirectory')) && (intval($_POST['profile_in_netdirectory']) == 1)) ? 1: 0);
        $old_visibility   = (((x($_POST,'visibility')) && (intval($_POST['visibility']) == 1)) ? 1 : 0);
+       $account_type     = (((x($_POST,'account-type')) && (intval($_POST['account-type']))) ? intval($_POST['account-type']) : 0);
        $page_flags       = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0);
        $blockwall        = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted!
        $blocktags        = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted!
@@ -453,6 +454,16 @@ function settings_post(&$a) {
        if(x($_POST,'notify8'))
                $notify += intval($_POST['notify8']);
 
+       // Adjust the page flag if the account type doesn't fit to the page flag.
+       if (($account_type == ACCOUNT_TYPE_PERSON) AND !in_array($page_flags, array(PAGE_NORMAL, PAGE_SOAPBOX, PAGE_FREELOVE)))
+               $page_flags = PAGE_NORMAL;
+       elseif (($account_type == ACCOUNT_TYPE_ORGANISATION) AND !in_array($page_flags, array(PAGE_SOAPBOX)))
+               $page_flags = PAGE_SOAPBOX;
+       elseif (($account_type == ACCOUNT_TYPE_NEWS) AND !in_array($page_flags, array(PAGE_SOAPBOX)))
+               $page_flags = PAGE_SOAPBOX;
+       elseif (($account_type == ACCOUNT_TYPE_COMMUNITY) AND !in_array($page_flags, array(PAGE_COMMUNITY, PAGE_PRVGROUP)))
+               $page_flags = PAGE_COMMUNITY;
+
        $email_changed = false;
 
        $err = '';
@@ -553,7 +564,7 @@ function settings_post(&$a) {
        $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s',
                                `openid` = '%s', `timezone` = '%s',
                                `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s',
-                               `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s',
+                               `notify-flags` = %d, `page-flags` = %d, `account-type` = %d, `default-location` = '%s',
                                `allow_location` = %d, `maxreq` = %d, `expire` = %d, `openidserver` = '%s',
                                `def_gid` = %d, `blockwall` = %d, `hidewall` = %d, `blocktags` = %d,
                                `unkmail` = %d, `cntunkmail` = %d, `language` = '%s'
@@ -568,6 +579,7 @@ function settings_post(&$a) {
                        dbesc($str_group_deny),
                        intval($notify),
                        intval($page_flags),
+                       intval($account_type),
                        dbesc($defloc),
                        intval($allow_location),
                        intval($maxreq),
@@ -1065,13 +1077,41 @@ function settings_content(&$a) {
        if(! strlen($a->user['timezone']))
                $timezone = date_default_timezone_get();
 
-
+       // Set the account type to "Community" when the page is a community page but the account type doesn't fit
+       // This is only happening on the first visit after the update
+       if (in_array($a->user['page-flags'], array(PAGE_COMMUNITY, PAGE_PRVGROUP)) AND
+               ($a->user['account-type'] != ACCOUNT_TYPE_COMMUNITY))
+               $a->user['account-type'] = ACCOUNT_TYPE_COMMUNITY;
 
        $pageset_tpl = get_markup_template('pagetypes.tpl');
+
        $pagetype = replace_macros($pageset_tpl, array(
-               '$user'         => t("User Types"),
-               '$community'    => t("Community Types"),
-               '$page_normal'  => array('page-flags', t('Normal Account Page'), PAGE_NORMAL,
+               '$account_types'        => t("Account Types"),
+               '$user'                 => t("Personal Page Subtypes"),
+               '$community'            => t("Community Forum Subtypes"),
+               '$account_type'         => $a->user['account-type'],
+               '$type_person'          => ACCOUNT_TYPE_PERSON,
+               '$type_organisation'    => ACCOUNT_TYPE_ORGANISATION,
+               '$type_news'            => ACCOUNT_TYPE_NEWS,
+               '$type_community'       => ACCOUNT_TYPE_COMMUNITY,
+
+               '$account_person'       => array('account-type', t('Personal Page'), ACCOUNT_TYPE_PERSON,
+                                                                       t('This account is a regular personal profile'),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_PERSON)),
+
+               '$account_organisation' => array('account-type', t('Organisation Page'), ACCOUNT_TYPE_ORGANISATION,
+                                                                       t('This account is a profile for an organisation'),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_ORGANISATION)),
+
+               '$account_news'         => array('account-type', t('News Page'), ACCOUNT_TYPE_NEWS,
+                                                                       t('This account is a news account/reflector'),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_NEWS)),
+
+               '$account_community'    => array('account-type', t('Community Forum'), ACCOUNT_TYPE_COMMUNITY,
+                                                                       t('This account is a community forum where people can discuss with each other'),
+                                                                       ($a->user['account-type'] == ACCOUNT_TYPE_COMMUNITY)),
+
+               '$page_normal'          => array('page-flags', t('Normal Account Page'), PAGE_NORMAL,
                                                                        t('This account is a normal personal profile'),
                                                                        ($a->user['page-flags'] == PAGE_NORMAL)),
 
@@ -1079,8 +1119,8 @@ function settings_content(&$a) {
                                                                        t('Automatically approve all connection/friend requests as read-only fans'),
                                                                        ($a->user['page-flags'] == PAGE_SOAPBOX)),
 
-               '$page_community'       => array('page-flags', t('Community Forum/Celebrity Account'), PAGE_COMMUNITY,
-                                                                       t('Automatically approve all connection/friend requests as read-write fans'),
+               '$page_community'       => array('page-flags', t('Public Forum'), PAGE_COMMUNITY,
+                                                                       t('Automatically approve all contact requests'),
                                                                        ($a->user['page-flags'] == PAGE_COMMUNITY)),
 
                '$page_freelove'        => array('page-flags', t('Automatic Friend Page'), PAGE_FREELOVE,
index f1981f730f28117d85bfbaeac66cb47610fd0059..31f7852a2f12b5c069ad63b1b903fdb7cb9e9046 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-define('UPDATE_VERSION' , 1202);
+define('UPDATE_VERSION' , 1203);
 
 /**
  *
@@ -1723,3 +1723,8 @@ function update_1190() {
        return UPDATE_SUCCESS;
 
 }
+
+function update_1202() {
+       $r = q("UPDATE `user` SET `account-type` = %d WHERE `page-flags` IN (%d, %d)",
+               dbesc(ACCOUNT_TYPE_COMMUNITY), dbesc(PAGE_COMMUNITY), dbesc(PAGE_PRVGROUP));
+}
index 5e60b36afce69dd9c2c4d110b54b83213baedbbb..e7856128a58357704e5c81a953d74724ea8512f0 100644 (file)
@@ -54,6 +54,7 @@
                                {{* Some information about the contact from the profile *}}
                                <dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
                                {{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
+                               {{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
                                {{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
                                {{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
                        </div>{{* End of contact-edit-links *}}
index ef8ec4f9a6372e7c13ea191703e7ccf2e40b1776..72228a1c209f73ae7a35efa0918c7bdbb7730c9b 100644 (file)
@@ -1,5 +1,3 @@
-
-       
        <div class='field radio'>
                <label for='id_{{$field.0}}_{{$field.2}}'>{{$field.1}}</label>
                <input type="radio" name='{{$field.0}}' id='id_{{$field.0}}_{{$field.2}}' value="{{$field.2|escape:'html'}}" {{if $field.4}}checked="true"{{/if}} aria-describedby={{$field.0}}_tip'>
index 33d1c64a943bbe6b3d57c5c0d02fe5af785ad3a6..b970f7745f28ec107d37f36b071ba5083a74518f 100644 (file)
@@ -1,8 +1,26 @@
+<h4>{{$account_types}}</h4>
+{{include file="field_radio.tpl" field=$account_person}}
+{{include file="field_radio.tpl" field=$account_organisation}}
+{{include file="field_radio.tpl" field=$account_news}}
+{{include file="field_radio.tpl" field=$account_community}}
 
-<h4>{{$user}}</h4>
+{{if $account_type == $type_person}}
+       <h5>{{$user}}</h5>
        {{include file="field_radio.tpl" field=$page_normal}}
        {{include file="field_radio.tpl" field=$page_soapbox}}
        {{include file="field_radio.tpl" field=$page_freelove}}
-<h4>{{$community}}</h4>
+{{/if}}
+
+{{if $account_type == $type_organisation}}
+       <input type='hidden' name='page-flags' value='1'>
+{{/if}}
+
+{{if $account_type == $type_news}}
+       <input type='hidden' name='page-flags' value='1'>
+{{/if}}
+
+{{if $account_type == $type_community}}
+       <h5>{{$community}}</h5>
        {{include file="field_radio.tpl" field=$page_community}}
        {{include file="field_radio.tpl" field=$page_prvgroup}}
+{{/if}}
index 4623c77a8bf2968dc6333e9c55f75beb22cee207..a25945c689b2f70d78fdcdd03172cec06cbbf85d 100644 (file)
 </div>
 <div id="profile-edit-homepage-end"></div>
 
+<div id="profile-edit-xmpp-wrapper" >
+<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
+<input type="text" size="32" name="xmpp" id="profile-edit-xmpp" title="{{$lbl_ex2}}" value="{{$xmpp.2|escape:'html'}}" />
+</div><div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
+<div id="profile-edit-xmpp-end"></div>
+
+
 <div id="profile-edit-politic-wrapper" >
 <label id="profile-edit-politic-label" for="profile-edit-politic" >{{$politic.1}} </label>
 <input type="text" size="32" name="politic" id="profile-edit-politic" value="{{$politic.2|escape:'html'}}" />
 </div>
 <div id="profile-edit-homepage-end"></div>
 
+<div id="profile-edit-xmpp-wrapper" >
+<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
+<input type="text" size="32" name="xmpp" id="profile-edit-xmpp" title="{{$lbl_ex2}}" value="{{$xmpp.2|escape:'html'}}" />
+</div><div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
+<div id="profile-edit-xmpp-end"></div>
+
+
 {{$hide_friends}}
 
 <div id="profile-edit-address-wrapper" >
index 558daf26d7cdd30a8bde5bd92e740c8d8c7b8c4c..b56dd607ce726c57849faf5585111e7295398c7e 100644 (file)
                </dl>
        {{/if}}
 
+       {{if $profile.xmpp}}
+               <dl class="xmpp">
+               <dt class="xmpp-label">{{$xmpp}}</dt>
+               <dd class="xmpp-data">{{$profile.xmpp}}</dd>
+               </dl>
+       {{/if}}
+
        {{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
        
        {{if $profile.pubkey}}<div class="key u-key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
index fb6bb7a89963c81e5ac9f3c33c6117374ba28f6e..7795a7e433028eb11dc219b889204b72fb5c5ed1 100644 (file)
@@ -970,10 +970,14 @@ aside .vcard .p-addr {
     white-space: nowrap;
     padding-bottom: 2px;
 }
+
 aside .vcard .detail {
     display: table;
     padding: 5px 0;
 }
+aside .xmpp {
+    display: table;
+}
 aside .vcard .icon {
     display: table-cell;
     padding-right: 10px;
index 34c5023c12eed0ec0f80c5e89f335e89880f132d..4836a47429e5b831752e44308b3e8b206239ac0d 100644 (file)
                                                                </div>
                                                                {{/if}}
 
+                                                               {{if $xmpp}}
+                                                               <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
+                                                                       <hr class="profile-separator">
+                                                                       <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 text-muted">{{$xmpp_label}}</div>
+                                                                       <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">{{$xmpp}}</div>
+                                                               </div>
+                                                               {{/if}}
+
                                                                {{if $keywords}}
                                                                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                                                                        <hr class="profile-separator">
index 224f15e827ac2fb7fb047b5387bc6c17a78be46e..74ee1a05d6ddc4205cafc39752ba9d869dab9dfe 100644 (file)
                                        <div class="section-content-tools-wrapper">
                                                {{include file="field_input.tpl" field=$homepage}}
 
+                                               {{include file="field_input.tpl" field=$xmpp}}
+
                                                {{include file="field_input.tpl" field=$pub_keywords}}
 
                                                {{include file="field_input.tpl" field=$prv_keywords}}
 
                {{include file="field_input.tpl" field=$homepage}}
 
+               {{include file="field_input.tpl" field=$xmpp}}
+
                {{$hide_friends}}
 
                {{include file="field_input.tpl" field=$address}}
index 4ede0a98862e0b3ce55990bfec8bd6ae36e30c20..1fc3ccf207a9fd28ddbc35040116953a95023a45 100644 (file)
                        </div>
                {{/if}}
 
+               {{if $profile.xmpp}}
+                       <div class="xmpp">
+                               <span class="xmpp-label icon"><i class="fa fa-comments"></i></span> 
+                               <span class="xmpp-data">{{$profile.xmpp}}</span>
+                       </div>
+               {{/if}}
 
                {{if $gender}}
                <div class="mf detail">
index 82a89f93d2dd48d258bb26d0933dfb36424ae582..0912311dad201961589604a8f2ef8c04d2686b3b 100644 (file)
@@ -918,6 +918,7 @@ input#dfrn-url {
 #profile-edit-religion-label,
 #profile-edit-pubkeywords-label,
 #profile-edit-prvkeywords-label,
+#profile-edit-xmpp-label,
 #profile-edit-homepage-label,
 #profile-edit-hometown-label {
        font-weight: 700;
@@ -939,6 +940,7 @@ input#dfrn-url {
 #sexual-select,
 #profile-edit-politic,
 #profile-edit-religion,
+#profile-edit-xmpp,
 #profile-edit-pubkeywords,
 #profile-edit-prvkeywords,
 #profile-in-dir-yes,
@@ -952,6 +954,7 @@ input#dfrn-url {
        float: left;
        margin-bottom: 20px;
 }
+#profile-edit-xmpp,
 #profile-edit-pubkeywords,
 #profile-edit-prvkeywords {
        margin-bottom: 5px;
@@ -1024,6 +1027,7 @@ input#dfrn-url {
 
 
 #profile-edit-pdesc-desc,
+#profile-edit-xmpp-desc,
 #profile-edit-pubkeywords-desc,
 #profile-edit-prvkeywords-desc {
        float: left;
@@ -1039,7 +1043,8 @@ input#dfrn-url {
        float: left;
        margin-bottom: 35px;
 }*/
-#profile-edit-homepage, #profile-edit-hometown {
+#profile-edit-homepage,
+#profile-edit-hometown {
        float: left;
        margin-bottom: 25px;
 }
@@ -1082,6 +1087,7 @@ input#dfrn-url {
 #profile-edit-pubkeywords-end,
 #profile-edit-prvkeywords-end,
 #profile-edit-homepage-end,
+#profile-edit-xmpp-end,
 #profile-edit-hometown-end,
 #profile-in-dir-break,
 #profile-in-dir-end,
@@ -1897,6 +1903,7 @@ input#dfrn-url {
 #advanced-profile-marital-wrapper,
 #advanced-profile-sexual-wrapper,
 #advanced-profile-homepage-wrapper,
+#advanced-profile-xmpp-wrapper,
 #advanced-profile-politic-wrapper,
 #advanced-profile-religion-wrapper,
 #advanced-profile-about-wrapper,
@@ -1919,6 +1926,7 @@ input#dfrn-url {
 #advanced-profile-marital-text,
 #advanced-profile-sexual-text,
 #advanced-profile-homepage-text,
+#advanced-profile-xmpp-text,
 #advanced-profile-politic-text,
 #advanced-profile-religion-text,
 #advanced-profile-about-text,
@@ -1942,6 +1950,7 @@ input#dfrn-url {
 #advanced-profile-marital-end,
 #advanced-profile-sexual-end,
 #advanced-profile-homepage-end,
+#advanced-profile-xmpp-end,
 #advanced-profile-politic-end,
 #advanced-profile-religion-end {
        height: 10px;
@@ -1968,6 +1977,7 @@ input#dfrn-url {
 #advanced-profile-marital,
 #advanced-profile-sexual,
 #advanced-profile-homepage,
+#advanced-profile-xmpp,
 #advanced-profile-politic,
 #advanced-profile-religion {
        float: left;
@@ -2912,14 +2922,14 @@ aside input[type='text'] {
        margin-bottom: 25px;
 }
 
-.location-label, .gender-label, .marital-label, .homepage-label, .network-label {
+.location-label, .gender-label, .marital-label, .homepage-label, .ympp-label, .network-label, .xmpp-label {
        float: left;
        text-align: right;
        display: block;
        width: 65px;
 }
 
-.adr, .x-gender, .marital-text, .homepage-url, .x-network {
+.adr, .x-gender, .marital-text, .homepage-url, .x-network, .xmpp-data {
        float: left;
        display: block;
        margin-left: 8px;
index 40a3c86a28f3338c85bf8532dfb76ba696c0c850..6ccc1388178b63bd968f267cbc6e8e08693d12a5 100644 (file)
 </div>
 <div id="profile-edit-homepage-end"></div>
 
+<div id="profile-edit-xmpp-wrapper" >
+<label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
+<input type="text" size="28" name="xmpp" id="profile-edit-xmpp" title="{{$lbl_ex2}}" value="{{$xmpp.2}}" />
+</div><div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
+<div id="profile-edit-xmpp-end"></div>
+
 <div id="profile-edit-politic-wrapper" >
 <label id="profile-edit-politic-label" for="profile-edit-politic" >{{$politic.1}} </label>
 <input type="text" size="28" name="politic" id="profile-edit-politic" value="{{$politic.2}}" />
index 4d5a40bc59e647ffca601691366a4d234ffcfc50..dc2de8c3fa35fb466d8f53797b1d3242d94fd871 100644 (file)
                </dl>
        {{/if}}
 
+       {{if $profile.xmpp}}
+               <dl class="xmpp">
+                       <dt class="xmpp-label">{{$xmpp}}</dt>
+                       <dd class="xmpp-data">{{$profile.xmpp}}</dd>
+               </dl>
+       {{/if}}
+
        {{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
        
        {{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
index 2428c4735bfab06a9326ea6574d2fddc303280f4..d25234b73340e9cf9b224ce4362e8179c8343143 100644 (file)
                </dl>
        {{/if}}
 
+        {{if $profile.xmpp}}
+                <dl class="xmpp">
+                        <dt class="xmpp-label">{{$xmpp}}</dt>
+                        <dd class="xmpp-data">{{$profile.xmpp}}</dd>
+                </dl>
+        {{/if}}
+
        {{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
        
        {{if $profile.pubkey}}<div class="key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}
index db5adb4a581b708df15ff07b61b9d0fe5c84c7f6..f4f85d611b761922df274c8f3845a4bab821b534 100644 (file)
@@ -54,6 +54,7 @@
                                {{* Some information about the contact from the profile *}}
                                <dl><dt>{{$profileurllabel}}</dt><dd><a target="blank" href="{{$url}}">{{$profileurl}}</a></dd></dl>
                                {{if $location}}<dl><dt>{{$location_label}}</dt><dd>{{$location}}</dd></dl>{{/if}}
+                               {{if $xmpp}}<dl><dt>{{$xmpp_label}}</dt><dd>{{$xmpp}}</dd></dl>{{/if}}
                                {{if $keywords}}<dl><dt>{{$keywords_label}}</dt><dd>{{$keywords}}</dd></dl>{{/if}}
                                {{if $about}}<dl><dt>{{$about_label}}</dt><dd>{{$about}}</dd></dl>{{/if}}
                        </div>{{* End of contact-edit-links *}}
index fa2cd185764e665edad79ebb7c8cc2da97d9ff01..f1280f41c8b6d11589a92ee9dd6a9db9ab6136f3 100644 (file)
       </div>
       <div id="profile-edit-pdesc-end"></div>
       
+      <div id="profile-edit-xmpp-wrapper" >
+        <label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
+        <input type="text" size="32" name="xmpp" id="profile-edit-xmpp" value="{{$xmpp.2}}" />
+      </div>
+      <div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
+      <div id="profile-edit-xmpp-end"></div>
+
       <div id="profile-edit-homepage-wrapper" >
         <label id="profile-edit-homepage-label" for="profile-edit-homepage" >{{$homepage.1}} </label>
         <input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage.2}}" />
 <div id="profile-edit-dob-end"></div>
 {{/if}}
 
+      <div id="profile-edit-xmpp-wrapper" >
+        <label id="profile-edit-xmpp-label" for="profile-edit-xmpp" >{{$xmpp.1}} </label>
+        <input type="text" size="32" name="xmpp" id="profile-edit-xmpp" value="{{$xmpp.2}}" />
+      </div>
+      <div id="profile-edit-xmpp-desc">{{$xmpp.3}}</div>
+      <div id="profile-edit-xmpp-end"></div>
+
       <div id="profile-edit-homepage-wrapper" >
         <label id="profile-edit-homepage-label" for="profile-edit-homepage" >{{$homepage.1}} </label>
         <input type="text" size="32" name="homepage" id="profile-edit-homepage" value="{{$homepage.2}}" />
index ab69fd1b792cafda574a6bebf99d1ac96d6705a5..dfa341b2601c585f3c71a90a021c906e3f93f5c2 100644 (file)
                </dl>
        {{/if}}
 
+       {{if $profile.xmpp}}
+               <dl class="xmpp">
+                       <dt class="xmpp-label">{{$xmpp}}</dt>
+                       <dd class="xmpp-data">{{$profile.xmpp}}</dd>
+               </dl>
+       {{/if}}
+
        {{if $gender}}<dl class="mf"><dt class="gender-label">{{$gender}}</dt> <dd class="p-gender">{{$profile.gender}}</dd></dl>{{/if}}
        
        {{if $profile.pubkey}}<div class="key u-key" style="display:none;">{{$profile.pubkey}}</div>{{/if}}