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" );
$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>';
$o .= replace_macros($tpl, array(
'$fullname' => $fullname,
+ '$pdesc' => $pdesc,
'$tabs' => $tabs,
'$photo' => $photo,
'$connect' => $connect,
`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,
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 " );
$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'];
'$photo' => $rr[$photo],
'$alt-text' => $rr['name'],
'$name' => $rr['name'],
- '$details' => $details
+ '$details' => $pdesc . $details
));
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']));
$r = q("UPDATE `profile`
SET `profile-name` = '%s',
`name` = '%s',
+ `pdesc` = '%s',
`gender` = '%s',
`dob` = '%s',
`address` = '%s',
WHERE `id` = %d AND `uid` = %d LIMIT 1",
dbesc($profile_name),
dbesc($name),
+ dbesc($pdesc),
dbesc($gender),
dbesc($dob),
dbesc($address),
function profiles_content(&$a) {
+
$o = '';
$o .= '<script> $(document).ready(function() { $(\'#nav-profiles-link\').addClass(\'nav-selected\'); });</script>';
'$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'],
}
}
+function update_1032() {
+ q("ALTER TABLE `profile` ADD `pdesc` CHAR( 255 ) NOT NULL AFTER `name` ");
+}
</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
</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
<div class="vcard">
$fullname
-
+ $pdesc
$tabs
$photo
.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;
#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,
#profile-edit-profile-name,
#profile-edit-name,
+#profile-edit-pdesc,
#gender-select,
#profile-edit-dob,
#profile-edit-address,
#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,
#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,
#profile-edit-profile-name,
#profile-edit-name,
+#profile-edit-pdesc,
#gender-select,
#profile-edit-dob,
#profile-edit-address,
#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,
font-weight: bold;
}
+.vcard .title {
+ margin-bottom: 5px;
+}
+
#birthday-title {
float: left;