]> git.mxchange.org Git - friendica.git/commitdiff
personal title
authorFriendika <info@friendika.com>
Wed, 19 Jan 2011 03:25:28 +0000 (19:25 -0800)
committerFriendika <info@friendika.com>
Wed, 19 Jan 2011 03:25:28 +0000 (19:25 -0800)
boot.php
database.sql
mod/directory.php
mod/profiles.php
update.php
view/en/profile_edit.tpl
view/it/profile_edit.tpl
view/profile_vcard.tpl
view/theme/default/style.css
view/theme/duepuntozero/style.css

index 85e1598831c015346aa3612a48682d20e6b43879..0567e41d65112bdbfd40306c51edb23983ef4706 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -2,8 +2,8 @@
 
 set_time_limit(0);
 
-define ( 'BUILD_ID',               1032   );
-define ( 'FRIENDIKA_VERSION',      '2.01.1003' );
+define ( 'BUILD_ID',               1033   );
+define ( 'FRIENDIKA_VERSION',      '2.01.1004' );
 define ( 'DFRN_PROTOCOL_VERSION',  '2.0'  );
 
 define ( 'EOL',                    "<br />\r\n"     );
@@ -2011,6 +2011,8 @@ function profile_sidebar($profile) {
 
        $fullname = '<div class="fn">' . $profile['name'] . '</div>';
 
+       $pdesc = '<div class="title">' . $profile['pdesc'] . '</div>';
+
        $tabs = '';
 
        $photo = '<div id="profile=photo-wrapper"><img class="photo" src="' . $profile['photo'] . '" alt="' . $profile['name'] . '" /></div>';
@@ -2049,6 +2051,7 @@ function profile_sidebar($profile) {
 
        $o .= replace_macros($tpl, array(
                '$fullname' => $fullname,
+               '$pdesc'    => $pdesc,
                '$tabs'     => $tabs,
                '$photo'    => $photo,
                '$connect'  => $connect,                
index 0e21be5125ac7fa7e300dee0d6cbd4368c60ff08..54950f0fd1ad7ee49d4bfb816683311974f8f4a0 100644 (file)
@@ -281,6 +281,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
   `is-default` tinyint(1) NOT NULL DEFAULT '0',
   `hide-friends` tinyint(1) NOT NULL DEFAULT '0',
   `name` char(255) NOT NULL,
+  `pdesc` char(255) NOT NULL,
   `dob` char(32) NOT NULL DEFAULT '0000-00-00',
   `address` char(255) NOT NULL,
   `locality` char(255) NOT NULL,
index f70cd6df84c6f755cacc05085109147e5ed7722c..0504ac321c1e80d667538895f0e3728dd420d948 100644 (file)
@@ -40,7 +40,7 @@ function directory_content(&$a) {
 
        if($search)
                $search = dbesc($search);
-       $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : "");
+       $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : "");
 
        $publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " );
 
@@ -68,6 +68,9 @@ function directory_content(&$a) {
 
 
                        $profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
+               
+                       $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '<br />' : '');
+
                        $details = '';
                        if(strlen($rr['locality']))
                                $details .= $rr['locality'];
@@ -94,7 +97,7 @@ function directory_content(&$a) {
                                '$photo' => $rr[$photo],
                                '$alt-text' => $rr['name'],
                                '$name' => $rr['name'],
-                               '$details' => $details  
+                               '$details' => $pdesc . $details  
 
 
                        ));
index 3488c8687e4b1e3a35a45c44f5a38cf873f7a11f..54c57f73e45adb74db054617371c977d67b46e8d 100644 (file)
@@ -46,6 +46,7 @@ function profiles_post(&$a) {
                if($orig[0]['name'] != $name)
                        $namechanged = true;
 
+               $pdesc = notags(trim($_POST['pdesc']));
                $gender = notags(trim($_POST['gender']));
                $address = notags(trim($_POST['address']));
                $locality = notags(trim($_POST['locality']));
@@ -125,6 +126,7 @@ function profiles_post(&$a) {
                $r = q("UPDATE `profile` 
                        SET `profile-name` = '%s',
                        `name` = '%s',
+                       `pdesc` = '%s',
                        `gender` = '%s',
                        `dob` = '%s',
                        `address` = '%s',
@@ -153,6 +155,7 @@ function profiles_post(&$a) {
                        WHERE `id` = %d AND `uid` = %d LIMIT 1",
                        dbesc($profile_name),
                        dbesc($name),
+                       dbesc($pdesc),
                        dbesc($gender),
                        dbesc($dob),
                        dbesc($address),
@@ -208,6 +211,7 @@ function profiles_post(&$a) {
 
 
 function profiles_content(&$a) {
+
        $o = '';
        $o .= '<script> $(document).ready(function() { $(\'#nav-profiles-link\').addClass(\'nav-selected\'); });</script>';
 
@@ -356,6 +360,7 @@ function profiles_content(&$a) {
                        '$profile_name' => $r[0]['profile-name'],
                        '$default' => (($is_default) ? '<p id="profile-edit-default-desc">' . t('This is your <strong>public</strong> profile.<br />It <strong>may</strong> be visible to anybody using the internet.') . '</p>' : ""),
                        '$name' => $r[0]['name'],
+                       '$pdesc' => $r[0]['pdesc'],
                        '$dob' => dob($r[0]['dob']),
                        '$hide_friends' => $hide_friends,
                        '$address' => $r[0]['address'],
index 7aacffb40be21942c8a1209168083923280b4f4e..0bd58d6d48251f080607c3f1491fc49bd744101d 100644 (file)
@@ -317,3 +317,6 @@ function update_1031() {
        }
 }
        
+function update_1032() {
+       q("ALTER TABLE `profile` ADD `pdesc` CHAR( 255 ) NOT NULL AFTER `name` ");
+}
index 50227b7f3bb738a99d444fc83f3bab5930eae1a8..beff3b8bd582b88fc0aa3742e6c71840436fa3be 100644 (file)
@@ -29,6 +29,13 @@ $default
 </div>
 <div id="profile-edit-name-end"></div>
 
+<div id="profile-edit-pdesc-wrapper" >
+<label id="profile-edit-pdesc-label" for="profile-edit-pdesc" >Title/Description: </label>
+<input type="text" size="32" name="pdesc" id="profile-edit-pdesc" value="$pdesc" />
+</div>
+<div id="profile-edit-pdesc-end"></div>
+
+
 <div id="profile-edit-gender-wrapper" >
 <label id="profile-edit-gender-label" for="gender-select" >Your Gender: </label>
 $gender
index db2957bac8f9b89efd802f2a6cb6ab43af3f531b..e5d0976eca192024dcdce32876dd89727332f108 100644 (file)
@@ -29,6 +29,13 @@ $default
 </div>
 <div id="profile-edit-name-end"></div>
 
+<div id="profile-edit-pdesc-wrapper" >
+<label id="profile-edit-pdesc-label" for="profile-edit-pdesc" >Il tuo titolo: </label>
+<input type="text" size="32" name="pdesc" id="profile-edit-pdesc" value="$pdesc" />
+</div>
+<div id="profile-edit-pdesc-end"></div>
+
+
 <div id="profile-edit-gender-wrapper" >
 <label id="profile-edit-gender-label" for="gender-select" >Il tuo sesso: </label>
 $gender
index 81659af6a00dc0e454985a311e696fe90e16053d..3cd96eabff8cc03273c9194fd2f99c8adb96ee31 100644 (file)
@@ -1,7 +1,7 @@
 <div class="vcard">
 
        $fullname
-
+       $pdesc
        $tabs
 
        $photo
index d9e93bbe649b58c07e6aa16cae20e31519d7593b..0457850dc4d0f5680b37d632a590be6a796ce91f 100644 (file)
@@ -256,10 +256,15 @@ nav {
 
 .fn {
        font-size: 1.4em;
-       margin-bottom: 10px;
+       margin-bottom: 5px;
        line-height: 1.5;
 }
 
+.vcard .title {
+       margin-bottom: 5px;
+}
+
+
 .powered {
        font-size: 0.6em;
        color: black;
@@ -731,6 +736,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name-label,
 #profile-edit-name-label,
+#profile-edit-pdesc-label,
 #profile-edit-gender-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
@@ -750,6 +756,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name,
 #profile-edit-name,
+#profile-edit-pdesc,
 #gender-select,
 #profile-edit-dob,
 #profile-edit-address,
@@ -819,6 +826,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name-end,
 #profile-edit-name-end,
+#profile-edit-pdesc-end,
 #profile-edit-gender-end,
 #profile-edit-dob-end,
 #profile-edit-address-end,
index b2bdb6e87d17df0f9e9f11b6abdd00406d4fb4e9..9d51c86f7b38db14b6115aa0c6660105125933b8 100644 (file)
@@ -604,6 +604,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name-label,
 #profile-edit-name-label,
+#profile-edit-pdesc-label,
 #profile-edit-gender-label,
 #profile-edit-dob-label,
 #profile-edit-address-label,
@@ -623,6 +624,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name,
 #profile-edit-name,
+#profile-edit-pdesc,
 #gender-select,
 #profile-edit-dob,
 #profile-edit-address,
@@ -692,6 +694,7 @@ input#dfrn-url {
 
 #profile-edit-profile-name-end,
 #profile-edit-name-end,
+#profile-edit-pdesc-end,
 #profile-edit-gender-end,
 #profile-edit-dob-end,
 #profile-edit-address-end,
@@ -1842,6 +1845,10 @@ a.mail-list-link {
        font-weight: bold;
 }
 
+.vcard .title {
+       margin-bottom: 5px;
+}
+
 
 #birthday-title {
        float: left;