]> git.mxchange.org Git - friendica.git/commitdiff
Use profile.about instead of profile.pdesc for profile description
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Feb 2020 07:36:19 +0000 (02:36 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 9 Feb 2020 07:36:19 +0000 (02:36 -0500)
26 files changed:
mod/cal.php
mod/photos.php
mod/videos.php
src/Model/Contact.php
src/Model/Profile.php
src/Module/Api/Friendica/Profile/Show.php
src/Module/Directory.php
src/Module/NoScrape.php
src/Module/Profile/Profile.php
src/Module/Settings/Profile/Index.php
src/Repository/ProfileField.php
view/templates/profile/vcard.tpl
view/templates/settings/profile/index.tpl
view/templates/widget/vcard.tpl
view/theme/duepuntozero/style.css
view/theme/duepuntozero/templates/profile/vcard.tpl
view/theme/frio/templates/profile/vcard.tpl
view/theme/frio/templates/settings/profile/index.tpl
view/theme/frio/templates/widget/vcard.tpl
view/theme/quattro/dark/style.css
view/theme/quattro/green/style.css
view/theme/quattro/lilac/style.css
view/theme/quattro/quattro.less
view/theme/quattro/templates/profile/vcard.tpl
view/theme/vier/templates/profile/vcard.tpl
view/theme/vier/templates/settings/profile/index.tpl

index 9e32b87d6f60bc829eb8a9c7c3936b3c855ddc4b..8352917784f362cb308aa81593655b6009db4386 100644 (file)
@@ -59,9 +59,9 @@ function cal_init(App $a)
        $vcard_widget = Renderer::replaceMacros($tpl, [
                '$name' => $profile['name'],
                '$photo' => $profile['photo'],
-               '$addr' => (($profile['addr'] != "") ? $profile['addr'] : ""),
+               '$addr' => $profile['addr'] ?: '',
                '$account_type' => $account_type,
-               '$pdesc' => (($profile['pdesc'] != "") ? $profile['pdesc'] : ""),
+               '$about' => $profile['about'] ?: '',
        ]);
 
        $cal_widget = Widget\CalendarExport::getHTML();
index 0733bbc96001f5e1fe0d98afd04241a5d166145f..13fa855c91249596523ed049ffc1525dafb15014 100644 (file)
@@ -65,7 +65,7 @@ function photos_init(App $a) {
                        '$photo' => $profile['photo'],
                        '$addr' => $profile['addr'] ?? '',
                        '$account_type' => $account_type,
-                       '$pdesc' => $profile['pdesc'] ?? '',
+                       '$about' => $profile['about'] ?? '',
                ]);
 
                $albums = Photo::getAlbums($a->data['user']['uid']);
index 36ddef68147bcc1e30dbad6ff6053cd403077996..b8119a6861a5543c7946d6b0302caf95f3358eef 100644 (file)
@@ -50,7 +50,7 @@ function videos_init(App $a)
                        '$photo' => $profile['photo'],
                        '$addr' => $profile['addr'] ?? '',
                        '$account_type' => $account_type,
-                       '$pdesc' => $profile['pdesc'] ?? '',
+                       '$about' => $profile['about'] ?? '',
                ]);
 
                // If not there, create 'aside' empty
index 051f94d3efde350beec374578b26798ba2afa719..02220750e0a0c7fdd456a550f4aa4aadd8e5c99c 100644 (file)
@@ -722,7 +722,7 @@ class Contact
                        return;
                }
 
-               $fields = ['name', 'photo', 'thumb', 'pdesc' => 'about', 'address', 'locality', 'region',
+               $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
                        'country-name', 'pub_keywords', 'xmpp', 'net-publish'];
                $profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
                if (!DBA::isResult($profile)) {
index 28491fb5f04ad1e3170c68a63521cc52e82c800e..b06d951a65a9abc8170b52b18bbbbffddabcfea2 100644 (file)
@@ -899,7 +899,7 @@ class Profile
                                WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed`
                                AND ((`profile`.`name` LIKE ?) OR
                                (`user`.`nickname` LIKE ?) OR
-                               (`profile`.`pdesc` LIKE ?) OR
+                               (`profile`.`about` LIKE ?) OR
                                (`profile`.`locality` LIKE ?) OR
                                (`profile`.`region` LIKE ?) OR
                                (`profile`.`country-name` LIKE ?) OR
@@ -934,7 +934,7 @@ class Profile
                        WHERE $publish AND NOT `user`.`blocked` AND NOT `user`.`account_removed` AND `contact`.`self`
                        AND ((`profile`.`name` LIKE ?) OR
                                (`user`.`nickname` LIKE ?) OR
-                               (`profile`.`pdesc` LIKE ?) OR
+                               (`profile`.`about` LIKE ?) OR
                                (`profile`.`locality` LIKE ?) OR
                                (`profile`.`region` LIKE ?) OR
                                (`profile`.`country-name` LIKE ?) OR
index 2c50c53d5048c69224b4514cee6dd939d9acca49..c739ec694e307360e5bbf6df56ff3fd6503b47e3 100644 (file)
@@ -77,7 +77,7 @@ class Show extends BaseApi
                        'profile_thumb'    => $profile_row['thumb'],
                        'publish'          => $profile_row['publish'] ? true : false,
                        'net_publish'      => $profile_row['net-publish'] ? true : false,
-                       'description'      => $profile_row['pdesc'],
+                       'description'      => $profile_row['about'],
                        'date_of_birth'    => $profile_row['dob'],
                        'address'          => $profile_row['address'],
                        'city'             => $profile_row['locality'],
index 8335fb0cd46c1e49365661b8ea3b0d1874741c59..56ec46303d9bb433a4ec4fa63e96efff9f776cf3 100644 (file)
@@ -105,7 +105,7 @@ class Directory extends BaseModule
 
                $profile_link = $contact['profile_url'];
 
-               $pdesc = (($contact['pdesc']) ? $contact['pdesc'] . '<br />' : '');
+               $about = (($contact['about']) ? $contact['about'] . '<br />' : '');
 
                $details = '';
                if (strlen($contact['locality'])) {
@@ -157,7 +157,7 @@ class Directory extends BaseModule
                        'profile'      => $profile,
                        'location'     => $location_e,
                        'tags'         => $contact['pub_keywords'],
-                       'pdesc'        => $pdesc,
+                       'about'        => $about,
                        'homepage'     => $homepage,
                        'photo_menu'   => $photo_menu,
 
index 53b3fc4e3ee63b812cb61af32584b3a1ea79a756..fa7cd9c5b2cd0c0afdcf76732cd6a2a2fa7e1507 100644 (file)
@@ -112,7 +112,7 @@ class NoScrape extends BaseModule
                $json_info['last-activity'] = date('o-W', $last_active);
 
                //These are optional fields.
-               $profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name'];
+               $profile_fields = ['about', 'locality', 'region', 'postal-code', 'country-name'];
                foreach ($profile_fields as $field) {
                        if (!empty($a->profile[$field])) {
                                $json_info["$field"] = $a->profile[$field];
index 690f4ee979fbd365e597853adf3cbf9d206b4e0f..b4bac371cb7be707713ffa5f774d1dc14457ffe1 100644 (file)
@@ -136,8 +136,8 @@ class Profile extends BaseProfile
                        }
                }
 
-               if ($a->profile['pdesc']) {
-                       $basic_fields += self::buildField('pdesc', DI::l10n()->t('Description:'), HTML::toLink($a->profile['pdesc']));
+               if ($a->profile['about']) {
+                       $basic_fields += self::buildField('about', DI::l10n()->t('Description:'), BBCode::convert($a->profile['about']));
                }
 
                if ($a->profile['xmpp']) {
index d8227d4aeaf6f74de9f47088995c92c50e4ad3f3..15a010e2829e615c7cab0d7790f46e1dc2b5f5e7 100644 (file)
@@ -70,7 +70,7 @@ class Index extends BaseSettings
 
                $namechanged = $profile['name'] != $name;
 
-               $pdesc = Strings::escapeTags(trim($_POST['pdesc']));
+               $about = Strings::escapeTags(trim($_POST['about']));
                $address = Strings::escapeTags(trim($_POST['address']));
                $locality = Strings::escapeTags(trim($_POST['locality']));
                $region = Strings::escapeTags(trim($_POST['region']));
@@ -102,7 +102,7 @@ class Index extends BaseSettings
                        'profile',
                        [
                                'name'         => $name,
-                               'pdesc'        => $pdesc,
+                               'about'        => $about,
                                'dob'          => $dob,
                                'address'      => $address,
                                'locality'     => $locality,
@@ -254,7 +254,7 @@ class Index extends BaseSettings
                        '$baseurl' => DI::baseUrl()->get(true),
                        '$nickname' => $a->user['nickname'],
                        '$name' => ['name', DI::l10n()->t('Display name:'), $profile['name']],
-                       '$pdesc' => ['pdesc', DI::l10n()->t('Title/Description:'), $profile['pdesc']],
+                       '$about' => ['about', DI::l10n()->t('Description:'), $profile['about']],
                        '$dob' => Temporal::getDateofBirthField($profile['dob'], $a->user['timezone']),
                        '$hide_friends' => $hide_friends,
                        '$address' => ['address', DI::l10n()->t('Street Address:'), $profile['address']],
index b1b16dcf1fb13de9e391cad49f825814a6da3a39..a6399eba5888a75854d35f144e5becbf38e42c2f 100644 (file)
@@ -263,7 +263,7 @@ class ProfileField extends BaseRepository
                        'religion'  => $this->l10n->t('Religious Views:'),
                        'likes'     => $this->l10n->t('Likes:'),
                        'dislikes'  => $this->l10n->t('Dislikes:'),
-                       'about'     => $this->l10n->t('About:'),
+                       'pdesc'     => $this->l10n->t('Title/Description:'),
                        'summary'   => $this->l10n->t('Summary'),
                        'music'     => $this->l10n->t('Musical interests'),
                        'book'      => $this->l10n->t('Books, literature'),
index 826074a313fe5e3f0273a09531227704e0f35527..b8fc807faeae4b415ebb419eabb4ab0002025532 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
 
        {{if $profile.picdate}}
                <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>
index c55928127e8d1ad723b99e75df984e9d30ae6504..3239fe6e0e3c1d6f6165828f9bd962062342132d 100644 (file)
                        <input type="text" size="32" name="name" id="profile-edit-name" value="{{$name.2}}"/>
                </div>
                <div id="profile-edit-name-end"></div>
-               <div id="profile-edit-pdesc-wrapper">
-                       <label id="profile-edit-pdesc-label" for="profile-edit-pdesc">{{$pdesc.1}} </label>
-                       <input type="text" size="32" name="pdesc" id="profile-edit-pdesc" value="{{$pdesc.1}}"/>
+               <div id="profile-edit-about-wrapper">
+                       <label id="profile-edit-about-label" for="profile-edit-about">{{$about.1}} </label>
+                       <input type="text" size="32" name="about" id="profile-edit-about" value="{{$about.1}}"/>
                </div>
-               <div id="profile-edit-pdesc-end"></div>
+               <div id="profile-edit-about-end"></div>
                <div id="profile-edit-dob-wrapper">
                        {{$dob nofilter}}
                </div>
index 465d206b81fb595be342ee127f1345cfda805b01..135d90a61b10d970216cd8245e48a0799d272d12 100644 (file)
@@ -2,7 +2,7 @@
 <div class="vcard h-card">
        <div class="fn p-name">{{$name}}</div>
        {{if $addr}}<div class="p-addr">{{$addr}}</div>{{/if}}
-       {{if $pdesc}}<div class="title p-job-title">{{$pdesc}}</div>{{/if}}
+       {{if $about}}<div class="title p-job-title">{{$about}}</div>{{/if}}
        {{if $url}}
        <div id="profile-photo-wrapper"><a href="{{$url}}"><img class="vcard-photo photo u-photo" style="width: 175px; height: 175px;" src="{{$photo}}" alt="{{$name}}" /></a></div>
        {{else}}
index c312d30d1f5dad91836a9ed6867ce9c82798935d..4b680a5955b575ad24431cab5e074afd707c92f3 100644 (file)
@@ -732,7 +732,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name-label,
 #profile-edit-name-label,
-#profile-edit-pdesc-label,
+#profile-edit-about-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
@@ -748,7 +748,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name,
 #profile-edit-name,
-#profile-edit-pdesc,
+#profile-edit-about,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
@@ -823,7 +823,7 @@ input#dfrn-url {
 }
 
 
-#profile-edit-pdesc-desc,
+#profile-edit-about-desc,
 #profile-edit-pubkeywords-desc,
 #profile-edit-prvkeywords-desc {
        float: left;
@@ -855,7 +855,7 @@ input#dfrn-url {
 }
 
 #profile-edit-name-end,
-#profile-edit-pdesc-end,
+#profile-edit-about-end,
 #profile-edit-dob-end,
 #profile-edit-address-end,
 #profile-edit-locality-end,
index 4a835961b6f738fbfca7bebc5ad39ed05e360ec0..02187d95494a5e6ef7327771b3301b9c4b0feb9b 100644 (file)
@@ -5,7 +5,7 @@
        
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
        
-       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
        <div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></div>
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
index 95c89bd07b19144997c03f58fd89237322ecb2bb..2765dbc39e72976113deea598973bd57ee2c2f07 100644 (file)
@@ -41,7 +41,7 @@
 
                        {{if $profile.addr}}<div class="p-addr">{{include file="sub/punct_wrap.tpl" text=$profile.addr}}</div>{{/if}}
 
-                       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+                       {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
 
                        {{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
                </div>
index 4d7cf8d70e0ce65f247a421a82895e0e79168a72..1171bd8cbb2c6b5d51950a9415164fbc88e23e13 100644 (file)
@@ -62,7 +62,7 @@
                                        <div class="section-content-tools-wrapper">
                                                {{include file="field_input.tpl" field=$name}}
 
-                                               {{include file="field_input.tpl" field=$pdesc}}
+                                               {{include file="field_textarea.tpl" field=$about}}
 
                                                {{$dob nofilter}}
 
index 366c570a747f81f349aa6ff449e7874e20edad39..fa65de0dc6d666b6725ad33124ae916635b093a5 100644 (file)
@@ -30,7 +30,7 @@
 
                        {{if $account_type}}<div class="account-type">({{$account_type}})</div>{{/if}}
 
-                       {{if $pdesc}}<div class="title">{{$pdesc}}</div>{{/if}}
+                       {{if $about}}<div class="title">{{$about}}</div>{{/if}}
 
                        {{if $network_link}}<dl class="network"><dt class="network-label">{{$network}}</dt><dd class="x-network">{{$network_link nofilter}}</dd></dl>{{/if}}
                </div>
index 158a79bb9eee8a37fcc383e1fc064cd243edc50a..afed03ad6bd4e6f56398bdb0c90108d3b7e707f7 100644 (file)
@@ -1945,7 +1945,7 @@ ul.tabs li .active {
   padding: 7px;
 }
 #profile-edit-name-label,
-#profile-edit-pdesc-label,
+#profile-edit-about-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
@@ -1960,7 +1960,7 @@ ul.tabs li .active {
   padding-top: 7px;
 }
 #profile-edit-name,
-#profile-edit-pdesc,
+#profile-edit-about,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
index 516742378babfea834192a7f1bf1e7dc41503170..55c15eeb3800b31386480a7f1ead79407d9460b8 100644 (file)
@@ -1945,7 +1945,7 @@ ul.tabs li .active {
   padding: 7px;
 }
 #profile-edit-name-label,
-#profile-edit-pdesc-label,
+#profile-edit-about-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
@@ -1960,7 +1960,7 @@ ul.tabs li .active {
   padding-top: 7px;
 }
 #profile-edit-name,
-#profile-edit-pdesc,
+#profile-edit-about,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
index 8577e625919b67aea7c3a51466adbd6ef695242c..2cabdf5cc8a30ca12996db47cb5baac7c76e710c 100644 (file)
@@ -1945,7 +1945,7 @@ ul.tabs li .active {
   padding: 7px;
 }
 #profile-edit-name-label,
-#profile-edit-pdesc-label,
+#profile-edit-about-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
@@ -1960,7 +1960,7 @@ ul.tabs li .active {
   padding-top: 7px;
 }
 #profile-edit-name,
-#profile-edit-pdesc,
+#profile-edit-about,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
index b7269f649bec5f744e91df2c0b0d5bc7a1ed8cbc..3d3f94f2384bbcf04ea6a6a42238e26ea0329126 100644 (file)
@@ -1238,7 +1238,7 @@ ul.tabs {
        padding: 7px;
 }
 #profile-edit-name-label,
-#profile-edit-pdesc-label,
+#profile-edit-about-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
 #profile-edit-locality-label,
@@ -1253,7 +1253,7 @@ ul.tabs {
         padding-top: 7px;
 }
 #profile-edit-name,
-#profile-edit-pdesc,
+#profile-edit-about,
 #profile-edit-dob,
 #profile-edit-address,
 #profile-edit-locality,
index 5e7b3efc8628b6454c569ffacd20b5f04871d0a0..6f9e5cffbe18c2dc07c934b5a21fcd3a97e0421d 100644 (file)
@@ -17,7 +17,7 @@
 
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
 
-       {{if $pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $about}}<div class="title">{{$profile.about}}</div>{{/if}}
        <div id="profile-photo-wrapper"><img class="photo u-photo" width="175" height="175" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}" /></div>
 
        {{if $account_type}}<div class="account-type">{{$account_type}}</div>{{/if}}
index 9a0394facfb073447e6f620a2af649c0b90cb0dc..940bdd016b02151325293b10a40466df19de3ad5 100644 (file)
@@ -11,7 +11,7 @@
 
        {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
 
-       {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
+       {{if $profile.about}}<div class="title">{{$profile.about}}</div>{{/if}}
 
        {{if $profile.picdate}}
                <div id="profile-photo-wrapper"><a href="{{$profile.url}}"><img class="photo u-photo" src="{{$profile.photo}}?rev={{$profile.picdate}}" alt="{{$profile.name}}"></a></div>
index eab7c2c4a484e842225ed9d46e7c12bea3336095..7cabebc167485856b6a1b5d0caca7cdffe7412ee 100644 (file)
                                </div>
                                <div id="profile-edit-name-end"></div>
 
-                               <div id="profile-edit-pdesc-wrapper">
-                                       <label id="profile-edit-pdesc-label" for="profile-edit-pdesc">{{$pdesc.1}} </label>
-                                       <input type="text" size="32" name="pdesc" id="profile-edit-pdesc" value="{{$pdesc.2}}"/>
+                               <div id="profile-edit-about-wrapper">
+                                       <label id="profile-edit-about-label" for="profile-edit-about">{{$about.1}} </label>
+                                       <input type="text" size="32" name="about" id="profile-edit-about" value="{{$about.2}}"/>
                                </div>
-                               <div id="profile-edit-pdesc-end"></div>
+                               <div id="profile-edit-about-end"></div>
 
                                <div id="profile-edit-xmpp-wrapper">
                                        <label id="profile-edit-xmpp-label" for="profile-edit-xmpp">{{$xmpp.1}} </label>