The XMPP address is now in the profile and will be transmitted

This commit is contained in:
Michael Vogel 2016-09-25 15:28:00 +00:00
commit 196eb6009f
25 changed files with 176 additions and 24 deletions

View 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"],

View 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']),

View file

@ -1065,12 +1065,18 @@ function settings_content(&$a) {
if(! strlen($a->user['timezone']))
$timezone = date_default_timezone_get();
$page_type = PAGE_TYPE_PERSON;
$pageset_tpl = get_markup_template('pagetypes.tpl');
$pagetype = replace_macros($pageset_tpl, array(
'$user' => t("User Types"),
'$community' => t("Community Types"),
'$company' => t("Company Types"),
'$community' => t("Community Types"),
'$page_type' => $page_type,
'$page_person' => PAGE_TYPE_PERSON,
'$page_company' => PAGE_TYPE_COMPANY,
'$page_forum' => PAGE_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)),