/**
* @param string $current current
* @param boolean $disabled optional, default false
- * @return object
+ * @return string
*/
public static function pollInterval($current, $disabled = false)
{
/**
* @param string $profile Profile URL
* @return string Server URL
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \Exception
*/
private static function getServerURLForProfile($profile)
{
* @param string $network network
* @param string $profile optional, default empty
* @return string
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \Exception
*/
public static function networkToIcon($network, $profile = "")
{
return $network_icon;
}
-
- /**
- * @param string $current optional, default empty
- * @param string $suffix optionsl, default empty
- * @return string
- * @throws \Friendica\Network\HTTPException\InternalServerErrorException
- */
- public static function sexualPreference($current = "", $suffix = "")
- {
- $o = '';
- $select = [
- '' => DI::l10n()->t('No answer'),
- 'Males' => DI::l10n()->t('Males'),
- 'Females' => DI::l10n()->t('Females'),
- 'Gay' => DI::l10n()->t('Gay'),
- 'Lesbian' => DI::l10n()->t('Lesbian'),
- 'No Preference' => DI::l10n()->t('No Preference'),
- 'Bisexual' => DI::l10n()->t('Bisexual'),
- 'Autosexual' => DI::l10n()->t('Autosexual'),
- 'Abstinent' => DI::l10n()->t('Abstinent'),
- 'Virgin' => DI::l10n()->t('Virgin'),
- 'Deviant' => DI::l10n()->t('Deviant'),
- 'Fetish' => DI::l10n()->t('Fetish'),
- 'Oodles' => DI::l10n()->t('Oodles'),
- 'Nonsexual' => DI::l10n()->t('Nonsexual'),
- ];
-
- Hook::callAll('sexpref_selector', $select);
-
- $o .= "<select name=\"sexual$suffix\" id=\"sexual-select$suffix\" size=\"1\" >";
- foreach ($select as $neutral => $selection) {
- if ($selection !== 'NOTRANSLATION') {
- $selected = (($neutral == $current) ? ' selected="selected" ' : '');
- $o .= "<option value=\"$neutral\" $selected >$selection</option>";
- }
- }
- $o .= '</select>';
- return $o;
- }
}
return;
}
- $fields = ['name', 'photo', 'thumb', 'about', 'address', 'locality', 'region',
+ $fields = ['name', 'photo', 'thumb', 'pdesc' => 'about', 'address', 'locality', 'region',
'country-name', 'pub_keywords', 'xmpp', 'net-publish'];
$profile = DBA::selectFirst('profile', $fields, ['uid' => $uid]);
if (!DBA::isResult($profile)) {
(`profile`.`locality` LIKE ?) OR
(`profile`.`region` LIKE ?) OR
(`profile`.`country-name` LIKE ?) OR
- (`profile`.`sexual` LIKE ?) OR
- (`profile`.`about` LIKE ?) OR
- (`profile`.`romance` LIKE ?) OR
- (`profile`.`work` LIKE ?) OR
- (`profile`.`education` LIKE ?) OR
(`profile`.`pub_keywords` LIKE ?) OR
(`profile`.`prv_keywords` LIKE ?))",
$searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm, $searchTerm,
(`profile`.`locality` LIKE ?) OR
(`profile`.`region` LIKE ?) OR
(`profile`.`country-name` LIKE ?) OR
- (`profile`.`sexual` LIKE ?) OR
- (`profile`.`about` LIKE ?) OR
- (`profile`.`romance` LIKE ?) OR
- (`profile`.`work` LIKE ?) OR
- (`profile`.`education` LIKE ?) OR
(`profile`.`pub_keywords` LIKE ?) OR
(`profile`.`prv_keywords` LIKE ?))
$order LIMIT ?,?",
}
$homepage = (!empty($profile['homepage']) ? DI::l10n()->t('Homepage:') : false);
- $about = (!empty($profile['about']) ? DI::l10n()->t('About:') : false);
$location_e = $location;
'tags' => $contact['pub_keywords'],
'pdesc' => $pdesc,
'homepage' => $homepage,
- 'about' => $about,
'photo_menu' => $photo_menu,
];
$json_info['last-activity'] = date('o-W', $last_active);
//These are optional fields.
- $profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name', 'about'];
+ $profile_fields = ['pdesc', 'locality', 'region', 'postal-code', 'country-name'];
foreach ($profile_fields as $field) {
if (!empty($a->profile[$field])) {
$json_info["$field"] = $a->profile[$field];
if (!empty($profile['country'])) {
$loc['country-name'] = $profile['country'];
}
- if (!empty($profile['hometown'])) {
- $loc['locality'] = $profile['hometown'];
- }
$location = Profile::formatLocation($loc);
if (!empty($location)) {
$data['location'] = $location;
<option>temp</option>
</select>
</div>
- <div id="profile-edit-hometown-end"></div>
+ <div id="profile-edit-region-end"></div>
<div class="profile-edit-submit-wrapper">
<input type="submit" name="submit" class="profile-edit-submit-button" value="{{$submit}}"/>
</div>
#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-locality-label,
#profile-edit-region-label,
#profile-edit-postal-code-label,
#profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
#profile-edit-pubkeywords-label,
#profile-edit-prvkeywords-label,
-#profile-edit-homepage-label,
-#profile-edit-hometown-label {
+#profile-edit-homepage-label {
float: left;
width: 175px;
}
#profile-edit-profile-name,
#profile-edit-name,
#profile-edit-pdesc,
-#gender-select,
#profile-edit-dob,
#profile-edit-address,
#profile-edit-locality,
#profile-edit-region,
#profile-edit-postal-code,
#profile-edit-country-name,
-#marital-select,
-#sexual-select,
-#profile-edit-politic,
-#profile-edit-religion,
#profile-edit-pubkeywords,
#profile-edit-prvkeywords,
#profile-in-dir-yes,
}
-#profile-edit-homepage, #profile-edit-hometown {
+#profile-edit-homepage {
float: left;
margin-bottom: 35px;
}
margin-bottom: 20px
}
-#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-locality-end,
#profile-edit-region-end,
#profile-edit-postal-code-end,
#profile-edit-country-name-end,
-#profile-edit-marital-end,
-#profile-edit-sexual-end,
-#profile-edit-politic-end,
-#profile-edit-religion-end,
#profile-edit-pubkeywords-end,
#profile-edit-prvkeywords-end,
#profile-edit-homepage-end,
-#profile-edit-hometown-end,
#profile-in-dir-break,
#profile-in-dir-end,
#profile-in-netdir-break,
}
-#gender-select, #marital-select, #sexual-select {
- width: 220px;
-}
-
#profile-edit-profile-name-wrapper .required {
color: #FF0000;
float: left;
}
-#advanced-profile-name-wrapper,
-#advanced-profile-gender-wrapper,
-#advanced-profile-dob-wrapper,
-#advanced-profile-age-wrapper,
-#advanced-profile-marital-wrapper,
-#advanced-profile-sexual-wrapper,
-#advanced-profile-homepage-wrapper,
-#advanced-profile-politic-wrapper,
-#advanced-profile-religion-wrapper,
-#advanced-profile-about-wrapper,
-#advanced-profile-interest-wrapper,
-#advanced-profile-contact-wrapper,
-#advanced-profile-music-wrapper,
-#advanced-profile-book-wrapper,
-#advanced-profile-tv-wrapper,
-#advanced-profile-film-wrapper,
-#advanced-profile-romance-wrapper,
-#advanced-profile-work-wrapper,
-#advanced-profile-education-wrapper {
- margin-top: 20px;
-}
-
-#advanced-profile-name-text,
-#advanced-profile-gender-text,
-#advanced-profile-dob-text,
-#advanced-profile-age-text,
-#advanced-profile-marital-text,
-#advanced-profile-sexual-text,
-#advanced-profile-homepage-text,
-#advanced-profile-politic-text,
-#advanced-profile-religion-text,
-#advanced-profile-about-text,
-#advanced-profile-interest-text,
-#advanced-profile-contact-text,
-#advanced-profile-music-text,
-#advanced-profile-book-text,
-#advanced-profile-tv-text,
-#advanced-profile-film-text,
-#advanced-profile-romance-text,
-#advanced-profile-work-text,
-#advanced-profile-education-text {
- width: 300px;
- float: left;
-}
-
-#advanced-profile-name-end,
-#advanced-profile-gender-end,
-#advanced-profile-dob-end,
-#advanced-profile-age-end,
-#advanced-profile-marital-end,
-#advanced-profile-sexual-end,
-#advanced-profile-homepage-end,
-#advanced-profile-politic-end,
-#advanced-profile-religion-end {
- height: 10px;
-}
-
-#advanced-profile-about-end,
-#advanced-profile-interest-end,
-#advanced-profile-contact-end,
-#advanced-profile-music-end,
-#advanced-profile-book-end,
-#advanced-profile-tv-end,
-#advanced-profile-film-end,
-#advanced-profile-romance-end,
-#advanced-profile-work-end,
-#advanced-profile-education-end {
-
-
-}
-
-#advanced-profile-name,
-#advanced-profile-gender,
-#advanced-profile-dob,
-#advanced-profile-age,
-#advanced-profile-marital,
-#advanced-profile-sexual,
-#advanced-profile-homepage,
-#advanced-profile-politic,
-#advanced-profile-religion {
- float: left;
-
-}
-
-
-#advanced-profile-about,
-#advanced-profile-interest,
-#advanced-profile-contact,
-#advanced-profile-music,
-#advanced-profile-book,
-#advanced-profile-tv,
-#advanced-profile-film,
-#advanced-profile-romance,
-#advanced-profile-work,
-#advanced-profile-education {
- margin-top: 10px;
- margin-left: 50px;
- margin-right: 20px;
- padding: 10px;
- border: 1px solid #CCCCCC;
-}
-
-#advanced-profile-with {
- float: left;
- margin-left: 15px;
-}
-
#contact-edit-wrapper {
margin-top: 10px;
}
margin-bottom: 25px;
}
-.location-label, .gender-label, .marital-label, .homepage-label, .network-label {
+.location-label, .gender-label, .homepage-label, .network-label {
float: left;
text-align: right;
display: block;
width: 65px;
}
-.adr, .x-gender, .marital-text, .homepage-url, .x-network {
+.adr, .homepage-url, .x-network {
float: left;
display: block;
margin-left: 8px;
background-color: #FFEEEE;
padding: 7px;
}
-#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-locality-label,
#profile-edit-region-label,
#profile-edit-postal-code-label,
#profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
#profile-edit-pubkeywords-label,
#profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
#profile-edit-homepage-label {
float: left;
width: 175px;
padding-top: 7px;
}
-#profile-edit-profile-name,
#profile-edit-name,
-#gender-select,
#profile-edit-pdesc,
-#profile-edit-gender,
#profile-edit-dob,
#profile-edit-address,
#profile-edit-locality,
#profile-edit-region,
#profile-edit-postal-code,
#profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
#profile-edit-pubkeywords,
#profile-edit-prvkeywords,
#profile-edit-homepage {
background-color: #FFEEEE;
padding: 7px;
}
-#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-locality-label,
#profile-edit-region-label,
#profile-edit-postal-code-label,
#profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
#profile-edit-pubkeywords-label,
#profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
#profile-edit-homepage-label {
float: left;
width: 175px;
padding-top: 7px;
}
-#profile-edit-profile-name,
#profile-edit-name,
-#gender-select,
#profile-edit-pdesc,
-#profile-edit-gender,
#profile-edit-dob,
#profile-edit-address,
#profile-edit-locality,
#profile-edit-region,
#profile-edit-postal-code,
#profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
#profile-edit-pubkeywords,
#profile-edit-prvkeywords,
#profile-edit-homepage {
background-color: #FFEEEE;
padding: 7px;
}
-#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-locality-label,
#profile-edit-region-label,
#profile-edit-postal-code-label,
#profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
#profile-edit-pubkeywords-label,
#profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
#profile-edit-homepage-label {
float: left;
width: 175px;
padding-top: 7px;
}
-#profile-edit-profile-name,
#profile-edit-name,
-#gender-select,
#profile-edit-pdesc,
-#profile-edit-gender,
#profile-edit-dob,
#profile-edit-address,
#profile-edit-locality,
#profile-edit-region,
#profile-edit-postal-code,
#profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
#profile-edit-pubkeywords,
#profile-edit-prvkeywords,
#profile-edit-homepage {
background-color: #FFEEEE;
padding: 7px;
}
-#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-locality-label,
#profile-edit-region-label,
#profile-edit-postal-code-label,
#profile-edit-country-name-label,
-#profile-edit-marital-label,
-#profile-edit-with-label,
-#profile-edit-sexual-label,
-#profile-edit-politic-label,
-#profile-edit-religion-label,
#profile-edit-pubkeywords-label,
#profile-edit-prvkeywords-label,
-#profile-edit-gender-select,
#profile-edit-homepage-label {
float: left;
width: 175px;
padding-top: 7px;
}
-#profile-edit-profile-name,
#profile-edit-name,
-#gender-select,
#profile-edit-pdesc,
-#profile-edit-gender,
#profile-edit-dob,
#profile-edit-address,
#profile-edit-locality,
#profile-edit-region,
#profile-edit-postal-code,
#profile-edit-country-name,
-#profile-edit-marital,
-#profile-edit-with,
-#profile-edit-sexual,
-#profile-edit-politic,
-#profile-edit-religion,
#profile-edit-pubkeywords,
#profile-edit-prvkeywords,
#profile-edit-homepage {
/* = Profile = */
/* =========== */
-.advanced-profile-content {
- margin-top: 5px;
- margin-bottom: 10px;
- margin-left: 30px;
- width: 60%;
-}
-
-.advanced-profile-label {
- margin-top: 10px;
- margin-bottom: 0px;
- padding-bottom: 5px;
- font-size: 18px;
-}
-
div[id$="wrapper"] {
height: 100%;
}
clear: left;
}
-#advanced-profile-with {
- margin-left: 20px;
-}
-
#profile-listing-desc,
#profile-listing-new-link-wrapper {
float: left;
.location,
.location-label,
.gender-label,
-.marital-label,
.homepage-label,
.network-label {
float: left;
}
.adr,
-.x-gender,
-.marital-text,
.homepage-url,
.x-network {
float: left;