Merge remote branch 'upstream/master'

This commit is contained in:
zottel 2012-06-03 14:21:51 +02:00
commit 70c4ab6875
22 changed files with 624 additions and 476 deletions

View file

@ -9,9 +9,9 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.0.1361' );
define ( 'FRIENDICA_VERSION', '3.0.1362' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1145 );
define ( 'DB_UPDATE_VERSION', 1147 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View file

@ -820,9 +820,11 @@ CREATE TABLE IF NOT EXISTS `profile` (
`region` char(255) NOT NULL,
`postal-code` char(32) NOT NULL,
`country-name` char(255) NOT NULL,
`hometown` char(255) NOT NULL,
`gender` char(32) NOT NULL,
`marital` char(255) NOT NULL,
`with` text NOT NULL,
`howlong` datetime NOT NULL default '0000-00-00 00:00:00',
`sexual` char(255) NOT NULL,
`politic` char(255) NOT NULL,
`religion` char(255) NOT NULL,

View file

@ -52,6 +52,8 @@ function bb_unspacefy_and_trim($st) {
function bbcode($Text,$preserve_nl = false) {
$a = get_app();
// Hide all [noparse] contained bbtags spacefying them
$Text = preg_replace_callback("/\[noparse\](.*?)\[\/noparse\]/ism", 'bb_spacefy',$Text);
@ -114,6 +116,11 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
//$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
// we may need to restrict this further if it picks up too many strays
// link acct:user@host to a webfinger profile redirector
$Text = preg_replace('/acct:(.*?)@(.*?)([ ,])/', '<a href="' . $a->get_baseurl() . '/acctlink?addr=' . "$1@$2"
. '" target="extlink" >acct:' . "$1@$2$3" . '</a>',$Text);
// Perform MAIL Search
$Text = preg_replace("/\[mail\]([$MAILSearchString]*)\[\/mail\]/", '<a href="mailto:$1">$1</a>', $Text);
@ -226,7 +233,7 @@ function bbcode($Text,$preserve_nl = false) {
$endlessloop = 0;
while ((strpos($Text, "[/quote]")!== false) and (strpos($Text, "[quote=") !== false) and (++$endlessloop < 20))
$Text = preg_replace("/\[quote=[\"\']*(.*?)[\"\']*\](.*?)\[\/quote\]/ism",
"<br /><strong class=".'"author"'.">" . $t_wrote . "</strong><blockquote class=".'"author"'.">$2</blockquote>",
"<br /><strong class=".'"author"'.">" . $t_wrote . "</strong><blockquote>$2</blockquote>",
$Text);
// [img=widthxheight]image source[/img]

View file

@ -173,6 +173,12 @@ function localize_item(&$item){
$item['body'] = str_replace($mtch[0],'@[url=' . zrl($mtch[1]). ']',$item['body']);
}
}
if(preg_match_all('/\[url=(.*?)\/photos\/(.*?)\/image\/(.*?)\]\[img(.*?)\]h(.*?)\[\/img\]\[\/url\]/is',$item['body'],$matches,PREG_SET_ORDER)) {
logger('matched');
foreach($matches as $mtch) {
$item['body'] = str_replace($mtch[0],'[url=' . zrl($mtch[1] . '/photos/' . $mtch[2] . '/image/' . $mtch[3] ,true) . '][img' . $mtch[4] . ']h' . $mtch[5] . '[/img][/url]',$item['body']);
}
}
}
@ -496,7 +502,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
// On the network page, I am the owner. On the display page it will be the profile owner.
// This will have been stored in $a->page_contact by our calling page.
// Put this person on the left of the wall-to-wall notice.
// Put this person as the wall owner of the wall-to-wall notice.
$owner_url = zrl($a->page_contact['url']);
$owner_photo = $a->page_contact['thumb'];
@ -504,23 +510,38 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$template = $wallwall;
$commentww = 'ww';
}
if((! $item['wall']) && (strlen($item['owner-link'])) && (! link_compare($item['owner-link'],$item['author-link']))) {
// Could be anybody.
if((! $item['wall']) && $item['owner-link']) {
$owner_url = $item['owner-link'];
$owner_photo = $item['owner-avatar'];
$owner_name = $item['owner-name'];
$template = $wallwall;
$commentww = 'ww';
// If it is our contact, use a friendly redirect link
if((link_compare($item['owner-link'],$item['url']))
&& ($item['network'] === NETWORK_DFRN)) {
$owner_url = $redirect_url;
$osparkle = ' sparkle';
$owner_linkmatch = (($item['owner-link']) && link_compare($item['owner-link'],$item['author-link']));
$alias_linkmatch = (($item['alias']) && link_compare($item['alias'],$item['author-link']));
$owner_namematch = (($item['owner-name']) && $item['owner-name'] == $item['author-name']);
if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
// The author url doesn't match the owner (typically the contact)
// and also doesn't match the contact alias.
// The name match is a hack to catch several weird cases where URLs are
// all over the park. It can be tricked, but this prevents you from
// seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
// well that it's the same Bob Smith.
// But it could be somebody else with the same name. It just isn't highly likely.
$owner_url = $item['owner-link'];
$owner_photo = $item['owner-avatar'];
$owner_name = $item['owner-name'];
$template = $wallwall;
$commentww = 'ww';
// If it is our contact, use a friendly redirect link
if((link_compare($item['owner-link'],$item['url']))
&& ($item['network'] === NETWORK_DFRN)) {
$owner_url = $redirect_url;
$osparkle = ' sparkle';
}
else
$owner_url = zrl($owner_url);
}
else
$owner_url = zrl($owner_url);
}
}

View file

@ -244,7 +244,7 @@ function timesel($pre,$h,$m) {
// Limited to range of timestamps
if(! function_exists('relative_date')) {
function relative_date($posted_date) {
function relative_date($posted_date,$format = null) {
$localtime = datetime_convert('UTC',date_default_timezone_get(),$posted_date);
@ -274,7 +274,9 @@ function relative_date($posted_date) {
if ($d >= 1) {
$r = round($d);
// translators - e.g. 22 hours ago, 1 minute ago
return sprintf( t('%1$d %2$s ago'),$r, (($r == 1) ? $str[0] : $str[1]));
if(! $format)
$format = t('%1$d %2$s ago');
return sprintf( $format,$r, (($r == 1) ? $str[0] : $str[1]));
}
}
}}

View file

@ -20,6 +20,9 @@ function notification($params) {
$sender_name = $product;
$hostname = $a->get_hostname();
if(strpos($hostname,':'))
$hostname = substr($hostname,0,strpos($hostname,':'));
$sender_email = t('noreply') . '@' . $hostname;
$additional_mail_header = "";

243
include/follow.php Normal file
View file

@ -0,0 +1,243 @@
<?php
//
// Takes a $uid and a url/handle and adds a new contact
// Currently if the contact is DFRN, interactive needs to be true, to redirect to the
// dfrn_request page.
// Otherwise this can be used to bulk add statusnet contacts, twitter contacts, etc.
// Returns an array
// $return['success'] boolean true if successful
// $return['message'] error text if success is false.
function new_contact($uid,$url,$interactive = false) {
$result = array('success' => false,'message' => '');
$a = get_app();
// remove ajax junk, e.g. Twitter
$url = str_replace('/#!/','/',$url);
if(! allowed_url($url)) {
$result['message'] = t('Disallowed profile URL.');
return $result;
}
if(! $url) {
$result['message'] = t('Connect URL missing.');
return $result;
}
$arr = array('url' => $url, 'contact' => array());
call_hooks('follow', $arr);
if(x($arr['contact'],'name'))
$ret = $arr['contact'];
else
$ret = probe_url($url);
if($ret['network'] === NETWORK_DFRN) {
if($interactive) {
if(strlen($a->path))
$myaddr = bin2hex($a->get_baseurl() . '/profile/' . $a->user['nickname']);
else
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname());
goaway($ret['request'] . "&addr=$myaddr");
// NOTREACHED
}
}
else {
if(get_config('system','dfrn_only')) {
$result['message'] = t('This site is not configured to allow communications with other networks.') . EOL;
$result['message'] != t('No compatible communication protocols or feeds were discovered.') . EOL;
return $result;
}
}
// This extra param just confuses things, remove it
if($ret['network'] === NETWORK_DIASPORA)
$ret['url'] = str_replace('?absolute=true','',$ret['url']);
// do we have enough information?
if(! ((x($ret,'name')) && (x($ret,'poll')) && ((x($ret,'url')) || (x($ret,'addr'))))) {
$result['message'] .= t('The profile address specified does not provide adequate information.') . EOL;
if(! x($ret,'poll'))
$result['message'] .= t('No compatible communication protocols or feeds were discovered.') . EOL;
if(! x($ret,'name'))
$result['message'] .= t('An author or name was not found.') . EOL;
if(! x($ret,'url'))
$result['message'] .= t('No browser URL could be matched to this address.') . EOL;
if(strpos($url,'@') !== false) {
$result['message'] .= t('Unable to match @-style Identity Address with a known protocol or email contact.') . EOL;
$result['message'] .= t('Use mailto: in front of address to force email check.') . EOL;
}
return $result;
}
if($ret['network'] === NETWORK_OSTATUS && get_config('system','ostatus_disabled')) {
$result['message'] .= t('The profile address specified belongs to a network which has been disabled on this site.') . EOL;
$ret['notify'] = '';
}
if(! $ret['notify']) {
$result['message'] .= t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL;
}
$writeable = ((($ret['network'] === NETWORK_OSTATUS) && ($ret['notify'])) ? 1 : 0);
$hidden = (($ret['network'] === NETWORK_MAIL) ? 1 : 0);
if($ret['network'] === NETWORK_MAIL) {
$writeable = 1;
}
if($ret['network'] === NETWORK_DIASPORA)
$writeable = 1;
// check if we already have a contact
// the poll url is more reliable than the profile url, as we may have
// indirect links or webfinger links
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `poll` = '%s' LIMIT 1",
intval($uid),
dbesc($ret['poll'])
);
if(count($r)) {
// update contact
if($r[0]['rel'] == CONTACT_IS_FOLLOWER || ($network === NETWORK_DIASPORA && $r[0]['rel'] == CONTACT_IS_SHARING)) {
q("UPDATE `contact` SET `rel` = %d , `readonly` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval(CONTACT_IS_FRIEND),
intval($r[0]['id']),
intval($uid)
);
}
}
else {
$new_relation = (($ret['network'] === NETWORK_MAIL) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
if($ret['network'] === NETWORK_DIASPORA)
$new_relation = CONTACT_IS_FOLLOWER;
// create contact record
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `alias`, `batch`, `notify`, `poll`, `poco`, `name`, `nick`, `photo`, `network`, `pubkey`, `rel`, `priority`,
`writable`, `hidden`, `blocked`, `readonly`, `pending` )
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, 0, 0, 0 ) ",
intval($uid),
dbesc(datetime_convert()),
dbesc($ret['url']),
dbesc(normalise_link($ret['url'])),
dbesc($ret['addr']),
dbesc($ret['alias']),
dbesc($ret['batch']),
dbesc($ret['notify']),
dbesc($ret['poll']),
dbesc($ret['poco']),
dbesc($ret['name']),
dbesc($ret['nick']),
dbesc($ret['photo']),
dbesc($ret['network']),
dbesc($ret['pubkey']),
intval($new_relation),
intval($ret['priority']),
intval($writeable),
intval($hidden)
);
}
$r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
dbesc($ret['url']),
intval($uid)
);
if(! count($r)) {
$result['message'] .= t('Unable to retrieve contact information.') . EOL;
return $result;
}
$contact = $r[0];
$contact_id = $r[0]['id'];
$g = q("select def_gid from user where uid = %d limit 1",
intval($uid)
);
if($g && intval($g[0]['def_gid'])) {
require_once('include/group.php');
group_add_member($uid,'',$contact_id,$g[0]['def_gid']);
}
require_once("Photo.php");
$photos = import_profile_photo($ret['photo'],$uid,$contact_id);
$r = q("UPDATE `contact` SET `photo` = '%s',
`thumb` = '%s',
`micro` = '%s',
`name-date` = '%s',
`uri-date` = '%s',
`avatar-date` = '%s'
WHERE `id` = %d LIMIT 1
",
dbesc($photos[0]),
dbesc($photos[1]),
dbesc($photos[2]),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($contact_id)
);
// pull feed and consume it, which should subscribe to the hub.
proc_run('php',"include/poller.php","$contact_id");
// create a follow slap
$tpl = get_markup_template('follow_slap.tpl');
$slap = replace_macros($tpl, array(
'$name' => $a->user['username'],
'$profile_page' => $a->get_baseurl() . '/profile/' . $a->user['nickname'],
'$photo' => $a->contact['photo'],
'$thumb' => $a->contact['thumb'],
'$published' => datetime_convert('UTC','UTC', 'now', ATOM_TIME),
'$item_id' => 'urn:X-dfrn:' . $a->get_hostname() . ':follow:' . random_string(),
'$title' => '',
'$type' => 'text',
'$content' => t('following'),
'$nick' => $a->user['nickname'],
'$verb' => ACTIVITY_FOLLOW,
'$ostat_follow' => ''
));
$r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
intval($uid)
);
if(count($r)) {
if(($contact['network'] == NETWORK_OSTATUS) && (strlen($contact['notify']))) {
require_once('include/salmon.php');
slapper($r[0],$contact['notify'],$slap);
}
if($contact['network'] == NETWORK_DIASPORA) {
require_once('include/diaspora.php');
$ret = diaspora_share($a->user,$contact);
logger('mod_follow: diaspora_share returns: ' . $ret);
}
}
$result['success'] = true;
return $result;
}

View file

@ -39,11 +39,16 @@ function advanced_profile(&$a) {
if($a->profile['with']) $profile['marital']['with'] = $a->profile['with'];
if(strlen($a->profile['howlong']) && $a->profile['howlong'] !== '0000-00-00 00:00:00') {
$profile['howlong'] = relative_date($a->profile['howlong'], t('for %1$d %2$s'));
}
if($a->profile['sexual']) $profile['sexual'] = array( t('Sexual Preference:'), $a->profile['sexual'] );
if($a->profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify($a->profile['homepage']) );
if($a->profile['hometown']) $profile['hometown'] = array( t('Hometown:'), linkify($a->profile['hometown']) );
if($a->profile['pub_keywords']) $profile['pub_keywords'] = array( t('Tags:'), $a->profile['pub_keywords']);
if($a->profile['politic']) $profile['politic'] = array( t('Political Views:'), $a->profile['politic']);

View file

@ -891,6 +891,7 @@ function prepare_body($item,$attach = false) {
} else
$s = prepare_text($item['body']);
$prep_arr = array('item' => $item, 'html' => $s);
call_hooks('prepare_body', $prep_arr);
$s = $prep_arr['html'];

16
mod/acctlink.php Normal file
View file

@ -0,0 +1,16 @@
<?php
require_once('include/Scrape.php');
function acctlink_init(&$a) {
if(x($_GET,'addr')) {
$addr = trim($_GET['addr']);
$res = probe_url($addr);
//logger('acctlink: ' . print_r($res,true));
if($res['url']) {
goaway($res['url']);
killme();
}
}
}

View file

@ -63,7 +63,7 @@ function community_content(&$a, $update = 0) {
}
$r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
`user`.`nickname`, `user`.`hidewall`

View file

@ -1,6 +1,7 @@
<?php
require_once('Scrape.php');
require_once('include/follow.php');
function follow_init(&$a) {
@ -11,230 +12,19 @@ function follow_init(&$a) {
}
$uid = local_user();
$url = $orig_url = notags(trim($_REQUEST['url']));
$url = notags(trim($_REQUEST['url']));
$return_url = $_SESSION['return_url'];
// remove ajax junk, e.g. Twitter
$result = new_contact($uid,$url,true);
$url = str_replace('/#!/','/',$url);
if(! allowed_url($url)) {
notice( t('Disallowed profile URL.') . EOL);
goaway($return_url);
// NOTREACHED
}
if(! $url) {
notice( t('Connect URL missing.') . EOL);
goaway($return_url);
// NOTREACHED
}
$arr = array('url' => $url, 'contact' => array());
call_hooks('follow', $arr);
if(x($arr['contact'],'name'))
$ret = $arr['contact'];
else
$ret = probe_url($url);
if($ret['network'] === NETWORK_DFRN) {
if(strlen($a->path))
$myaddr = bin2hex($a->get_baseurl() . '/profile/' . $a->user['nickname']);
else
$myaddr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname());
goaway($ret['request'] . "&addr=$myaddr");
// NOTREACHED
}
else {
if(get_config('system','dfrn_only')) {
notice( t('This site is not configured to allow communications with other networks.') . EOL);
notice( t('No compatible communication protocols or feeds were discovered.') . EOL);
goaway($return_url);
}
}
// This extra param just confuses things, remove it
if($ret['network'] === NETWORK_DIASPORA)
$ret['url'] = str_replace('?absolute=true','',$ret['url']);
// do we have enough information?
if(! ((x($ret,'name')) && (x($ret,'poll')) && ((x($ret,'url')) || (x($ret,'addr'))))) {
notice( t('The profile address specified does not provide adequate information.') . EOL);
if(! x($ret,'poll'))
notice( t('No compatible communication protocols or feeds were discovered.') . EOL);
if(! x($ret,'name'))
notice( t('An author or name was not found.') . EOL);
if(! x($ret,'url'))
notice( t('No browser URL could be matched to this address.') . EOL);
if(strpos($url,'@') !== false) {
notice( t('Unable to match @-style Identity Address with a known protocol or email contact.') . EOL);
notice( t('Use mailto: in front of address to force email check.') . EOL);
}
if($result['success'] == false) {
if($result['message'])
notice($result['message']);
goaway($return_url);
}
if($ret['network'] === NETWORK_OSTATUS && get_config('system','ostatus_disabled')) {
notice( t('The profile address specified belongs to a network which has been disabled on this site.') . EOL);
$ret['notify'] = '';
}
if(! $ret['notify']) {
notice( t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL);
}
$writeable = ((($ret['network'] === NETWORK_OSTATUS) && ($ret['notify'])) ? 1 : 0);
$hidden = (($ret['network'] === NETWORK_MAIL) ? 1 : 0);
if($ret['network'] === NETWORK_MAIL) {
$writeable = 1;
}
if($ret['network'] === NETWORK_DIASPORA)
$writeable = 1;
// check if we already have a contact
// the poll url is more reliable than the profile url, as we may have
// indirect links or webfinger links
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `poll` = '%s' LIMIT 1",
intval($uid),
dbesc($ret['poll'])
);
if(count($r)) {
// update contact
if($r[0]['rel'] == CONTACT_IS_FOLLOWER || ($network === NETWORK_DIASPORA && $r[0]['rel'] == CONTACT_IS_SHARING)) {
q("UPDATE `contact` SET `rel` = %d , `readonly` = 0 WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval(CONTACT_IS_FRIEND),
intval($r[0]['id']),
intval($uid)
);
}
}
else {
$new_relation = (($ret['network'] === NETWORK_MAIL) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
if($ret['network'] === NETWORK_DIASPORA)
$new_relation = CONTACT_IS_FOLLOWER;
// create contact record
$r = q("INSERT INTO `contact` ( `uid`, `created`, `url`, `nurl`, `addr`, `alias`, `batch`, `notify`, `poll`, `poco`, `name`, `nick`, `photo`, `network`, `pubkey`, `rel`, `priority`,
`writable`, `hidden`, `blocked`, `readonly`, `pending` )
VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, %d, %d, 0, 0, 0 ) ",
intval($uid),
dbesc(datetime_convert()),
dbesc($ret['url']),
dbesc(normalise_link($ret['url'])),
dbesc($ret['addr']),
dbesc($ret['alias']),
dbesc($ret['batch']),
dbesc($ret['notify']),
dbesc($ret['poll']),
dbesc($ret['poco']),
dbesc($ret['name']),
dbesc($ret['nick']),
dbesc($ret['photo']),
dbesc($ret['network']),
dbesc($ret['pubkey']),
intval($new_relation),
intval($ret['priority']),
intval($writeable),
intval($hidden)
);
}
$r = q("SELECT * FROM `contact` WHERE `url` = '%s' AND `uid` = %d LIMIT 1",
dbesc($ret['url']),
intval($uid)
);
if(! count($r)) {
notice( t('Unable to retrieve contact information.') . EOL);
goaway($return_url);
// NOTREACHED
}
$contact = $r[0];
$contact_id = $r[0]['id'];
$g = q("select def_gid from user where uid = %d limit 1",
intval($uid)
);
if($g && intval($g[0]['def_gid'])) {
require_once('include/group.php');
group_add_member($uid,'',$contact_id,$g[0]['def_gid']);
}
require_once("Photo.php");
$photos = import_profile_photo($ret['photo'],$uid,$contact_id);
$r = q("UPDATE `contact` SET `photo` = '%s',
`thumb` = '%s',
`micro` = '%s',
`name-date` = '%s',
`uri-date` = '%s',
`avatar-date` = '%s'
WHERE `id` = %d LIMIT 1
",
dbesc($photos[0]),
dbesc($photos[1]),
dbesc($photos[2]),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
dbesc(datetime_convert()),
intval($contact_id)
);
// pull feed and consume it, which should subscribe to the hub.
proc_run('php',"include/poller.php","$contact_id");
// create a follow slap
$tpl = get_markup_template('follow_slap.tpl');
$slap = replace_macros($tpl, array(
'$name' => $a->user['username'],
'$profile_page' => $a->get_baseurl() . '/profile/' . $a->user['nickname'],
'$photo' => $a->contact['photo'],
'$thumb' => $a->contact['thumb'],
'$published' => datetime_convert('UTC','UTC', 'now', ATOM_TIME),
'$item_id' => 'urn:X-dfrn:' . $a->get_hostname() . ':follow:' . random_string(),
'$title' => '',
'$type' => 'text',
'$content' => t('following'),
'$nick' => $a->user['nickname'],
'$verb' => ACTIVITY_FOLLOW,
'$ostat_follow' => ''
));
$r = q("SELECT `contact`.*, `user`.* FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
WHERE `user`.`uid` = %d AND `contact`.`self` = 1 LIMIT 1",
intval($uid)
);
if(count($r)) {
if(($contact['network'] == NETWORK_OSTATUS) && (strlen($contact['notify']))) {
require_once('include/salmon.php');
slapper($r[0],$contact['notify'],$slap);
}
if($contact['network'] == NETWORK_DIASPORA) {
require_once('include/diaspora.php');
$ret = diaspora_share($a->user,$contact);
logger('mod_follow: diaspora_share returns: ' . $ret);
}
}
info( t('Contact added') . EOL);
if(strstr($return_url,'contacts'))
goaway($a->get_baseurl() . '/contacts/' . $contact_id);

View file

@ -534,7 +534,7 @@ function network_content(&$a, $update = 0) {
$parents_str = implode(', ', $parents_arr);
$items = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`, `contact`.`writable`,
`contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item`, `contact`

View file

@ -117,7 +117,7 @@ function notes_content(&$a,$update = false) {
$parents_str = implode(', ', $parents_arr);
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`network`, `contact`.`rel`,
`contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`

View file

@ -242,7 +242,7 @@ function profile_content(&$a, $update = 0) {
$parents_str = implode(', ', $parents_arr);
$items = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`network`, `contact`.`rel`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`network`, `contact`.`rel`,
`contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
FROM `item`, `contact`

View file

@ -62,9 +62,15 @@ function profiles_post(&$a) {
$pub_keywords = notags(trim($_POST['pub_keywords']));
$prv_keywords = notags(trim($_POST['prv_keywords']));
$marital = notags(trim($_POST['marital']));
$howlong = notags(trim($_POST['howlong']));
$with = ((x($_POST,'with')) ? notags(trim($_POST['with'])) : '');
if(! strlen($howlong))
$howlong = '0000-00-00 00:00:00';
else
$howlong = datetime_convert(date_default_timezone_get(),'UTC',$howlong);
// linkify the relationship target if applicable
$withchanged = false;
@ -120,6 +126,7 @@ function profiles_post(&$a) {
$sexual = notags(trim($_POST['sexual']));
$homepage = notags(trim($_POST['homepage']));
$hometown = notags(trim($_POST['hometown']));
$politic = notags(trim($_POST['politic']));
$religion = notags(trim($_POST['religion']));
@ -207,8 +214,10 @@ function profiles_post(&$a) {
`country-name` = '%s',
`marital` = '%s',
`with` = '%s',
`howlong` = '%s',
`sexual` = '%s',
`homepage` = '%s',
`hometown` = '%s',
`politic` = '%s',
`religion` = '%s',
`pub_keywords` = '%s',
@ -237,8 +246,10 @@ function profiles_post(&$a) {
dbesc($country_name),
dbesc($marital),
dbesc($with),
dbesc($howlong),
dbesc($sexual),
dbesc($homepage),
dbesc($hometown),
dbesc($politic),
dbesc($religion),
dbesc($pub_keywords),
@ -558,8 +569,10 @@ function profiles_content(&$a) {
'$lbl_marital' => t('<span class="heart">&hearts;</span> Marital Status:'),
'$lbl_with' => t("Who: \x28if applicable\x29"),
'$lbl_ex1' => t('Examples: cathy123, Cathy Williams, cathy@example.com'),
'$lbl_howlong' => t('Since [date]:'),
'$lbl_sexual' => t('Sexual Preference:'),
'$lbl_homepage' => t('Homepage URL:'),
'$lbl_hometown' => t('Hometown:'),
'$lbl_politic' => t('Political Views:'),
'$lbl_religion' => t('Religious Views:'),
'$lbl_pubkey' => t('Public Keywords:'),
@ -595,9 +608,11 @@ function profiles_content(&$a) {
'$gender' => gender_selector($r[0]['gender']),
'$marital' => marital_selector($r[0]['marital']),
'$with' => strip_tags($r[0]['with']),
'$howlong' => ($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' => $r[0]['about'],
'$homepage' => $r[0]['homepage'],
'$hometown' => $r[0]['hometown'],
'$politic' => $r[0]['politic'],
'$religion' => $r[0]['religion'],
'$pub_keywords' => $r[0]['pub_keywords'],

View file

@ -146,7 +146,7 @@ function search_content(&$a) {
}
$r = q("SELECT distinct(`item`.`uri`), `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
`contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`,
`user`.`nickname`

View file

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1145 );
define( 'UPDATE_VERSION' , 1147 );
/**
*
@ -1259,3 +1259,19 @@ function update_1144() {
return UPDATE_FAILED ;
return UPDATE_SUCCESS ;
}
function update_1145() {
$r = q("alter table profile add howlong datetime not null default '0000-00-00 00:00:00' after `with`");
if(! $r)
return UPDATE_FAILED ;
return UPDATE_SUCCESS ;
}
function update_1146() {
$r = q("alter table profile add hometown char(255) not null after `country-name`, add index ( `hometown` ) ");
if(! $r)
return UPDATE_FAILED ;
return UPDATE_SUCCESS ;
}

View file

@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 3.0.1361\n"
"Project-Id-Version: 3.0.1362\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-01 10:00-0700\n"
"POT-Creation-Date: 2012-06-02 10:00-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -52,7 +52,7 @@ msgstr ""
#: ../../mod/message.php:96 ../../mod/allfriends.php:9
#: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53
#: ../../mod/follow.php:8 ../../mod/display.php:138 ../../mod/profiles.php:7
#: ../../mod/profiles.php:374 ../../mod/delegate.php:6
#: ../../mod/profiles.php:382 ../../mod/delegate.php:6
#: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81
#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:503
#: ../../include/items.php:3297 ../../index.php:306
@ -131,7 +131,7 @@ msgstr ""
#: ../../mod/settings.php:762 ../../mod/settings.php:969
#: ../../mod/manage.php:109 ../../mod/group.php:85 ../../mod/admin.php:417
#: ../../mod/admin.php:653 ../../mod/admin.php:789 ../../mod/admin.php:988
#: ../../mod/admin.php:1075 ../../mod/profiles.php:543
#: ../../mod/admin.php:1075 ../../mod/profiles.php:551
#: ../../mod/invite.php:119 ../../addon/facebook/facebook.php:605
#: ../../addon/yourls/yourls.php:76 ../../addon/ljpost/ljpost.php:93
#: ../../addon/nsfw/nsfw.php:57 ../../addon/planets/planets.php:158
@ -162,7 +162,7 @@ msgstr ""
#: ../../view/theme/diabook/theme.php:757
#: ../../view/theme/diabook/config.php:190
#: ../../view/theme/quattro/config.php:52 ../../view/theme/dispy/config.php:70
#: ../../include/conversation.php:559
#: ../../include/conversation.php:574
msgid "Submit"
msgstr ""
@ -331,8 +331,8 @@ msgstr ""
#: ../../mod/settings.php:914 ../../mod/settings.php:920
#: ../../mod/settings.php:956 ../../mod/settings.php:957
#: ../../mod/settings.php:958 ../../mod/settings.php:959
#: ../../mod/settings.php:960 ../../mod/register.php:229
#: ../../mod/profiles.php:520
#: ../../mod/settings.php:960 ../../mod/register.php:234
#: ../../mod/profiles.php:528
msgid "Yes"
msgstr ""
@ -343,8 +343,8 @@ msgstr ""
#: ../../mod/settings.php:914 ../../mod/settings.php:920
#: ../../mod/settings.php:956 ../../mod/settings.php:957
#: ../../mod/settings.php:958 ../../mod/settings.php:959
#: ../../mod/settings.php:960 ../../mod/register.php:230
#: ../../mod/profiles.php:521
#: ../../mod/settings.php:960 ../../mod/register.php:235
#: ../../mod/profiles.php:529
msgid "No"
msgstr ""
@ -378,8 +378,8 @@ msgstr ""
#: ../../mod/profile_photo.php:174 ../../mod/profile_photo.php:252
#: ../../mod/profile_photo.php:261
#: ../../addon/communityhome/communityhome.php:111
#: ../../view/theme/diabook/theme.php:599 ../../include/user.php:292
#: ../../include/user.php:299 ../../include/user.php:306
#: ../../view/theme/diabook/theme.php:599 ../../include/user.php:294
#: ../../include/user.php:301 ../../include/user.php:308
msgid "Profile Photos"
msgstr ""
@ -527,44 +527,44 @@ msgstr ""
msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
msgstr ""
#: ../../mod/photos.php:1274 ../../include/conversation.php:533
#: ../../mod/photos.php:1274 ../../include/conversation.php:548
msgid "I like this (toggle)"
msgstr ""
#: ../../mod/photos.php:1275 ../../include/conversation.php:534
#: ../../mod/photos.php:1275 ../../include/conversation.php:549
msgid "I don't like this (toggle)"
msgstr ""
#: ../../mod/photos.php:1276 ../../include/conversation.php:968
#: ../../mod/photos.php:1276 ../../include/conversation.php:983
msgid "Share"
msgstr ""
#: ../../mod/photos.php:1277 ../../mod/editpost.php:104
#: ../../mod/wallmessage.php:145 ../../mod/message.php:214
#: ../../mod/message.php:408 ../../include/conversation.php:365
#: ../../include/conversation.php:710 ../../include/conversation.php:987
#: ../../include/conversation.php:725 ../../include/conversation.php:1002
msgid "Please wait"
msgstr ""
#: ../../mod/photos.php:1293 ../../mod/photos.php:1333
#: ../../mod/photos.php:1364 ../../include/conversation.php:556
#: ../../mod/photos.php:1364 ../../include/conversation.php:571
msgid "This is you"
msgstr ""
#: ../../mod/photos.php:1295 ../../mod/photos.php:1335
#: ../../mod/photos.php:1366 ../../include/conversation.php:558
#: ../../mod/photos.php:1366 ../../include/conversation.php:573
#: ../../boot.php:514
msgid "Comment"
msgstr ""
#: ../../mod/photos.php:1297 ../../mod/editpost.php:125
#: ../../include/conversation.php:568 ../../include/conversation.php:1005
#: ../../include/conversation.php:583 ../../include/conversation.php:1020
msgid "Preview"
msgstr ""
#: ../../mod/photos.php:1394 ../../mod/settings.php:618
#: ../../mod/settings.php:699 ../../mod/group.php:168 ../../mod/admin.php:660
#: ../../include/conversation.php:322 ../../include/conversation.php:588
#: ../../include/conversation.php:322 ../../include/conversation.php:603
msgid "Delete"
msgstr ""
@ -629,28 +629,28 @@ msgstr ""
msgid "Edit post"
msgstr ""
#: ../../mod/editpost.php:80 ../../include/conversation.php:954
#: ../../mod/editpost.php:80 ../../include/conversation.php:969
msgid "Post to Email"
msgstr ""
#: ../../mod/editpost.php:95 ../../mod/settings.php:617
#: ../../include/conversation.php:575
#: ../../include/conversation.php:590
msgid "Edit"
msgstr ""
#: ../../mod/editpost.php:96 ../../mod/wallmessage.php:143
#: ../../mod/message.php:212 ../../mod/message.php:406
#: ../../include/conversation.php:969
#: ../../include/conversation.php:984
msgid "Upload photo"
msgstr ""
#: ../../mod/editpost.php:97 ../../include/conversation.php:971
#: ../../mod/editpost.php:97 ../../include/conversation.php:986
msgid "Attach file"
msgstr ""
#: ../../mod/editpost.php:98 ../../mod/wallmessage.php:144
#: ../../mod/message.php:213 ../../mod/message.php:407
#: ../../include/conversation.php:973
#: ../../include/conversation.php:988
msgid "Insert web link"
msgstr ""
@ -666,35 +666,35 @@ msgstr ""
msgid "Insert Vorbis [.ogg] audio"
msgstr ""
#: ../../mod/editpost.php:102 ../../include/conversation.php:979
#: ../../mod/editpost.php:102 ../../include/conversation.php:994
msgid "Set your location"
msgstr ""
#: ../../mod/editpost.php:103 ../../include/conversation.php:981
#: ../../mod/editpost.php:103 ../../include/conversation.php:996
msgid "Clear browser location"
msgstr ""
#: ../../mod/editpost.php:105 ../../include/conversation.php:988
#: ../../mod/editpost.php:105 ../../include/conversation.php:1003
msgid "Permission settings"
msgstr ""
#: ../../mod/editpost.php:113 ../../include/conversation.php:997
#: ../../mod/editpost.php:113 ../../include/conversation.php:1012
msgid "CC: email addresses"
msgstr ""
#: ../../mod/editpost.php:114 ../../include/conversation.php:998
#: ../../mod/editpost.php:114 ../../include/conversation.php:1013
msgid "Public post"
msgstr ""
#: ../../mod/editpost.php:117 ../../include/conversation.php:984
#: ../../mod/editpost.php:117 ../../include/conversation.php:999
msgid "Set title"
msgstr ""
#: ../../mod/editpost.php:119 ../../include/conversation.php:986
#: ../../mod/editpost.php:119 ../../include/conversation.php:1001
msgid "Categories (comma-separated list)"
msgstr ""
#: ../../mod/editpost.php:120 ../../include/conversation.php:1000
#: ../../mod/editpost.php:120 ../../include/conversation.php:1015
msgid "Example: bob@example.com, mary@example.com"
msgstr ""
@ -1708,7 +1708,7 @@ msgid "Password reset requested at %s"
msgstr ""
#: ../../mod/lostpass.php:45 ../../mod/lostpass.php:107
#: ../../mod/register.php:85 ../../mod/register.php:139
#: ../../mod/register.php:90 ../../mod/register.php:144
#: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:752
#: ../../addon/facebook/facebook.php:688
#: ../../addon/facebook/facebook.php:1178
@ -2439,7 +2439,7 @@ msgid "No recipient."
msgstr ""
#: ../../mod/wallmessage.php:124 ../../mod/message.php:171
#: ../../include/conversation.php:922
#: ../../include/conversation.php:937
msgid "Please enter a link URL:"
msgstr ""
@ -2648,7 +2648,7 @@ msgid "Profile Visibility Editor"
msgstr ""
#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:128
#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:74
#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:77
#: ../../include/nav.php:50 ../../boot.php:1505
msgid "Profile"
msgstr ""
@ -2669,91 +2669,91 @@ msgstr ""
msgid "View Contacts"
msgstr ""
#: ../../mod/register.php:83 ../../mod/regmod.php:52
#: ../../mod/register.php:88 ../../mod/regmod.php:52
#, php-format
msgid "Registration details for %s"
msgstr ""
#: ../../mod/register.php:91
#: ../../mod/register.php:96
msgid ""
"Registration successful. Please check your email for further instructions."
msgstr ""
#: ../../mod/register.php:95
#: ../../mod/register.php:100
msgid "Failed to send email message. Here is the message that failed."
msgstr ""
#: ../../mod/register.php:100
#: ../../mod/register.php:105
msgid "Your registration can not be processed."
msgstr ""
#: ../../mod/register.php:137
#: ../../mod/register.php:142
#, php-format
msgid "Registration request at %s"
msgstr ""
#: ../../mod/register.php:146
#: ../../mod/register.php:151
msgid "Your registration is pending approval by the site owner."
msgstr ""
#: ../../mod/register.php:184
#: ../../mod/register.php:189
msgid ""
"This site has exceeded the number of allowed daily account registrations. "
"Please try again tomorrow."
msgstr ""
#: ../../mod/register.php:210
#: ../../mod/register.php:215
msgid ""
"You may (optionally) fill in this form via OpenID by supplying your OpenID "
"and clicking 'Register'."
msgstr ""
#: ../../mod/register.php:211
#: ../../mod/register.php:216
msgid ""
"If you are not familiar with OpenID, please leave that field blank and fill "
"in the rest of the items."
msgstr ""
#: ../../mod/register.php:212
#: ../../mod/register.php:217
msgid "Your OpenID (optional): "
msgstr ""
#: ../../mod/register.php:226
#: ../../mod/register.php:231
msgid "Include your profile in member directory?"
msgstr ""
#: ../../mod/register.php:246
#: ../../mod/register.php:251
msgid "Membership on this site is by invitation only."
msgstr ""
#: ../../mod/register.php:247
#: ../../mod/register.php:252
msgid "Your invitation ID: "
msgstr ""
#: ../../mod/register.php:250 ../../mod/admin.php:418
#: ../../mod/register.php:255 ../../mod/admin.php:418
msgid "Registration"
msgstr ""
#: ../../mod/register.php:258
#: ../../mod/register.php:263
msgid "Your Full Name (e.g. Joe Smith): "
msgstr ""
#: ../../mod/register.php:259
#: ../../mod/register.php:264
msgid "Your Email Address: "
msgstr ""
#: ../../mod/register.php:260
#: ../../mod/register.php:265
msgid ""
"Choose a profile nickname. This must begin with a text character. Your "
"profile address on this site will then be '<strong>nickname@$sitename</"
"strong>'."
msgstr ""
#: ../../mod/register.php:261
#: ../../mod/register.php:266
msgid "Choose a nickname: "
msgstr ""
#: ../../mod/register.php:264 ../../include/nav.php:81 ../../boot.php:792
#: ../../mod/register.php:269 ../../include/nav.php:81 ../../boot.php:792
msgid "Register"
msgstr ""
@ -3746,8 +3746,8 @@ msgstr ""
msgid "Search"
msgstr ""
#: ../../mod/profiles.php:21 ../../mod/profiles.php:384
#: ../../mod/profiles.php:498 ../../mod/dfrn_confirm.php:62
#: ../../mod/profiles.php:21 ../../mod/profiles.php:392
#: ../../mod/profiles.php:506 ../../mod/dfrn_confirm.php:62
msgid "Profile not found."
msgstr ""
@ -3755,281 +3755,285 @@ msgstr ""
msgid "Profile Name is required."
msgstr ""
#: ../../mod/profiles.php:145
#: ../../mod/profiles.php:151
msgid "Marital Status"
msgstr ""
#: ../../mod/profiles.php:149
#: ../../mod/profiles.php:155
msgid "Romantic Partner"
msgstr ""
#: ../../mod/profiles.php:153
#: ../../mod/profiles.php:159
msgid "Work/Employment"
msgstr ""
#: ../../mod/profiles.php:156
#: ../../mod/profiles.php:162
msgid "Religion"
msgstr ""
#: ../../mod/profiles.php:160
#: ../../mod/profiles.php:166
msgid "Political Views"
msgstr ""
#: ../../mod/profiles.php:164
#: ../../mod/profiles.php:170
msgid "Gender"
msgstr ""
#: ../../mod/profiles.php:168
#: ../../mod/profiles.php:174
msgid "Sexual Preference"
msgstr ""
#: ../../mod/profiles.php:172
#: ../../mod/profiles.php:178
msgid "Homepage"
msgstr ""
#: ../../mod/profiles.php:176
#: ../../mod/profiles.php:182
msgid "Interests"
msgstr ""
#: ../../mod/profiles.php:180
#: ../../mod/profiles.php:186
msgid "Address"
msgstr ""
#: ../../mod/profiles.php:187
#: ../../mod/profiles.php:193
msgid "Location"
msgstr ""
#: ../../mod/profiles.php:262
#: ../../mod/profiles.php:270
msgid "Profile updated."
msgstr ""
#: ../../mod/profiles.php:329
#: ../../mod/profiles.php:337
msgid " and "
msgstr ""
#: ../../mod/profiles.php:337
#: ../../mod/profiles.php:345
msgid "public profile"
msgstr ""
#: ../../mod/profiles.php:340
#: ../../mod/profiles.php:348
#, php-format
msgid "%1$s changed %2$s to &ldquo;%3$s&rdquo;"
msgstr ""
#: ../../mod/profiles.php:341
#: ../../mod/profiles.php:349
#, php-format
msgid " - Visit %1$s's %2$s"
msgstr ""
#: ../../mod/profiles.php:344
#: ../../mod/profiles.php:352
#, php-format
msgid "%1$s has an updated %2$s, changing %3$s."
msgstr ""
#: ../../mod/profiles.php:403
#: ../../mod/profiles.php:411
msgid "Profile deleted."
msgstr ""
#: ../../mod/profiles.php:421 ../../mod/profiles.php:455
#: ../../mod/profiles.php:429 ../../mod/profiles.php:463
msgid "Profile-"
msgstr ""
#: ../../mod/profiles.php:440 ../../mod/profiles.php:482
#: ../../mod/profiles.php:448 ../../mod/profiles.php:490
msgid "New profile created."
msgstr ""
#: ../../mod/profiles.php:461
#: ../../mod/profiles.php:469
msgid "Profile unavailable to clone."
msgstr ""
#: ../../mod/profiles.php:519
#: ../../mod/profiles.php:527
msgid "Hide your contact/friend list from viewers of this profile?"
msgstr ""
#: ../../mod/profiles.php:542
#: ../../mod/profiles.php:550
msgid "Edit Profile Details"
msgstr ""
#: ../../mod/profiles.php:544
#: ../../mod/profiles.php:552
msgid "View this profile"
msgstr ""
#: ../../mod/profiles.php:545
#: ../../mod/profiles.php:553
msgid "Create a new profile using these settings"
msgstr ""
#: ../../mod/profiles.php:546
#: ../../mod/profiles.php:554
msgid "Clone this profile"
msgstr ""
#: ../../mod/profiles.php:547
#: ../../mod/profiles.php:555
msgid "Delete this profile"
msgstr ""
#: ../../mod/profiles.php:548
#: ../../mod/profiles.php:556
msgid "Profile Name:"
msgstr ""
#: ../../mod/profiles.php:549
#: ../../mod/profiles.php:557
msgid "Your Full Name:"
msgstr ""
#: ../../mod/profiles.php:550
#: ../../mod/profiles.php:558
msgid "Title/Description:"
msgstr ""
#: ../../mod/profiles.php:551
#: ../../mod/profiles.php:559
msgid "Your Gender:"
msgstr ""
#: ../../mod/profiles.php:552
#: ../../mod/profiles.php:560
#, php-format
msgid "Birthday (%s):"
msgstr ""
#: ../../mod/profiles.php:553
#: ../../mod/profiles.php:561
msgid "Street Address:"
msgstr ""
#: ../../mod/profiles.php:554
#: ../../mod/profiles.php:562
msgid "Locality/City:"
msgstr ""
#: ../../mod/profiles.php:555
#: ../../mod/profiles.php:563
msgid "Postal/Zip Code:"
msgstr ""
#: ../../mod/profiles.php:556
#: ../../mod/profiles.php:564
msgid "Country:"
msgstr ""
#: ../../mod/profiles.php:557
#: ../../mod/profiles.php:565
msgid "Region/State:"
msgstr ""
#: ../../mod/profiles.php:558
#: ../../mod/profiles.php:566
msgid "<span class=\"heart\">&hearts;</span> Marital Status:"
msgstr ""
#: ../../mod/profiles.php:559
#: ../../mod/profiles.php:567
msgid "Who: (if applicable)"
msgstr ""
#: ../../mod/profiles.php:560
#: ../../mod/profiles.php:568
msgid "Examples: cathy123, Cathy Williams, cathy@example.com"
msgstr ""
#: ../../mod/profiles.php:561 ../../include/profile_advanced.php:43
#: ../../mod/profiles.php:569
msgid "Since [date]:"
msgstr ""
#: ../../mod/profiles.php:570 ../../include/profile_advanced.php:46
msgid "Sexual Preference:"
msgstr ""
#: ../../mod/profiles.php:562
#: ../../mod/profiles.php:571
msgid "Homepage URL:"
msgstr ""
#: ../../mod/profiles.php:563 ../../include/profile_advanced.php:49
#: ../../mod/profiles.php:572 ../../include/profile_advanced.php:52
msgid "Political Views:"
msgstr ""
#: ../../mod/profiles.php:564
#: ../../mod/profiles.php:573
msgid "Religious Views:"
msgstr ""
#: ../../mod/profiles.php:565
#: ../../mod/profiles.php:574
msgid "Public Keywords:"
msgstr ""
#: ../../mod/profiles.php:566
#: ../../mod/profiles.php:575
msgid "Private Keywords:"
msgstr ""
#: ../../mod/profiles.php:567
#: ../../mod/profiles.php:576
msgid "Example: fishing photography software"
msgstr ""
#: ../../mod/profiles.php:568
#: ../../mod/profiles.php:577
msgid "(Used for suggesting potential friends, can be seen by others)"
msgstr ""
#: ../../mod/profiles.php:569
#: ../../mod/profiles.php:578
msgid "(Used for searching profiles, never shown to others)"
msgstr ""
#: ../../mod/profiles.php:570
#: ../../mod/profiles.php:579
msgid "Tell us about yourself..."
msgstr ""
#: ../../mod/profiles.php:571
#: ../../mod/profiles.php:580
msgid "Hobbies/Interests"
msgstr ""
#: ../../mod/profiles.php:572
#: ../../mod/profiles.php:581
msgid "Contact information and Social Networks"
msgstr ""
#: ../../mod/profiles.php:573
#: ../../mod/profiles.php:582
msgid "Musical interests"
msgstr ""
#: ../../mod/profiles.php:574
#: ../../mod/profiles.php:583
msgid "Books, literature"
msgstr ""
#: ../../mod/profiles.php:575
#: ../../mod/profiles.php:584
msgid "Television"
msgstr ""
#: ../../mod/profiles.php:576
#: ../../mod/profiles.php:585
msgid "Film/dance/culture/entertainment"
msgstr ""
#: ../../mod/profiles.php:577
#: ../../mod/profiles.php:586
msgid "Love/romance"
msgstr ""
#: ../../mod/profiles.php:578
#: ../../mod/profiles.php:587
msgid "Work/employment"
msgstr ""
#: ../../mod/profiles.php:579
#: ../../mod/profiles.php:588
msgid "School/education"
msgstr ""
#: ../../mod/profiles.php:584
#: ../../mod/profiles.php:593
msgid ""
"This is your <strong>public</strong> profile.<br />It <strong>may</strong> "
"be visible to anybody using the internet."
msgstr ""
#: ../../mod/profiles.php:594 ../../mod/directory.php:111
#: ../../mod/profiles.php:603 ../../mod/directory.php:111
msgid "Age: "
msgstr ""
#: ../../mod/profiles.php:629
#: ../../mod/profiles.php:639
msgid "Edit/Manage Profiles"
msgstr ""
#: ../../mod/profiles.php:630 ../../boot.php:1066
#: ../../mod/profiles.php:640 ../../boot.php:1066
msgid "Change profile photo"
msgstr ""
#: ../../mod/profiles.php:631 ../../boot.php:1067
#: ../../mod/profiles.php:641 ../../boot.php:1067
msgid "Create New Profile"
msgstr ""
#: ../../mod/profiles.php:642 ../../boot.php:1077
#: ../../mod/profiles.php:652 ../../boot.php:1077
msgid "Profile Image"
msgstr ""
#: ../../mod/profiles.php:644 ../../boot.php:1080
#: ../../mod/profiles.php:654 ../../boot.php:1080
msgid "visible to everybody"
msgstr ""
#: ../../mod/profiles.php:645 ../../boot.php:1081
#: ../../mod/profiles.php:655 ../../boot.php:1081
msgid "Edit visibility"
msgstr ""
#: ../../mod/filer.php:29 ../../include/conversation.php:926
#: ../../mod/filer.php:29 ../../include/conversation.php:941
msgid "Save to Folder:"
msgstr ""
@ -5838,7 +5842,7 @@ msgstr ""
msgid "j F"
msgstr ""
#: ../../include/profile_advanced.php:30 ../../include/datetime.php:448
#: ../../include/profile_advanced.php:30 ../../include/datetime.php:450
#: ../../include/items.php:1423
msgid "Birthday:"
msgstr ""
@ -5851,55 +5855,60 @@ msgstr ""
msgid "Status:"
msgstr ""
#: ../../include/profile_advanced.php:45 ../../boot.php:1107
#: ../../include/profile_advanced.php:43
#, php-format
msgid "for %1$d %2$s"
msgstr ""
#: ../../include/profile_advanced.php:48 ../../boot.php:1107
msgid "Homepage:"
msgstr ""
#: ../../include/profile_advanced.php:47
#: ../../include/profile_advanced.php:50
msgid "Tags:"
msgstr ""
#: ../../include/profile_advanced.php:51
#: ../../include/profile_advanced.php:54
msgid "Religion:"
msgstr ""
#: ../../include/profile_advanced.php:53
#: ../../include/profile_advanced.php:56
msgid "About:"
msgstr ""
#: ../../include/profile_advanced.php:55
#: ../../include/profile_advanced.php:58
msgid "Hobbies/Interests:"
msgstr ""
#: ../../include/profile_advanced.php:57
#: ../../include/profile_advanced.php:60
msgid "Contact information and Social Networks:"
msgstr ""
#: ../../include/profile_advanced.php:59
#: ../../include/profile_advanced.php:62
msgid "Musical interests:"
msgstr ""
#: ../../include/profile_advanced.php:61
#: ../../include/profile_advanced.php:64
msgid "Books, literature:"
msgstr ""
#: ../../include/profile_advanced.php:63
#: ../../include/profile_advanced.php:66
msgid "Television:"
msgstr ""
#: ../../include/profile_advanced.php:65
#: ../../include/profile_advanced.php:68
msgid "Film/dance/culture/entertainment:"
msgstr ""
#: ../../include/profile_advanced.php:67
#: ../../include/profile_advanced.php:70
msgid "Love/Romance:"
msgstr ""
#: ../../include/profile_advanced.php:69
#: ../../include/profile_advanced.php:72
msgid "Work/employment:"
msgstr ""
#: ../../include/profile_advanced.php:71
#: ../../include/profile_advanced.php:74
msgid "School/education:"
msgstr ""
@ -6119,7 +6128,7 @@ msgstr ""
msgid "Sex Addict"
msgstr ""
#: ../../include/profile_selectors.php:42 ../../include/user.php:270
#: ../../include/profile_selectors.php:42 ../../include/user.php:272
msgid "Friends"
msgstr ""
@ -6351,7 +6360,7 @@ msgstr ""
msgid "Click to open/close"
msgstr ""
#: ../../include/text.php:1095 ../../include/user.php:228
#: ../../include/text.php:1095 ../../include/user.php:230
msgid "default"
msgstr ""
@ -6688,7 +6697,7 @@ msgstr ""
msgid "seconds"
msgstr ""
#: ../../include/datetime.php:277
#: ../../include/datetime.php:278
#, php-format
msgid "%1$d %2$s ago"
msgstr ""
@ -6923,71 +6932,71 @@ msgstr ""
msgid "link"
msgstr ""
#: ../../include/user.php:36
#: ../../include/user.php:38
msgid "An invitation is required."
msgstr ""
#: ../../include/user.php:41
#: ../../include/user.php:43
msgid "Invitation could not be verified."
msgstr ""
#: ../../include/user.php:49
#: ../../include/user.php:51
msgid "Invalid OpenID url"
msgstr ""
#: ../../include/user.php:64
#: ../../include/user.php:66
msgid "Please enter the required information."
msgstr ""
#: ../../include/user.php:78
#: ../../include/user.php:80
msgid "Please use a shorter name."
msgstr ""
#: ../../include/user.php:80
#: ../../include/user.php:82
msgid "Name too short."
msgstr ""
#: ../../include/user.php:95
#: ../../include/user.php:97
msgid "That doesn't appear to be your full (First Last) name."
msgstr ""
#: ../../include/user.php:100
#: ../../include/user.php:102
msgid "Your email domain is not among those allowed on this site."
msgstr ""
#: ../../include/user.php:103
#: ../../include/user.php:105
msgid "Not a valid email address."
msgstr ""
#: ../../include/user.php:113
#: ../../include/user.php:115
msgid "Cannot use that email."
msgstr ""
#: ../../include/user.php:119
#: ../../include/user.php:121
msgid ""
"Your \"nickname\" can only contain \"a-z\", \"0-9\", \"-\", and \"_\", and "
"must also begin with a letter."
msgstr ""
#: ../../include/user.php:125 ../../include/user.php:217
#: ../../include/user.php:127 ../../include/user.php:219
msgid "Nickname is already registered. Please choose another."
msgstr ""
#: ../../include/user.php:135
#: ../../include/user.php:137
msgid ""
"Nickname was once registered here and may not be re-used. Please choose "
"another."
msgstr ""
#: ../../include/user.php:151
#: ../../include/user.php:153
msgid "SERIOUS ERROR: Generation of security keys failed."
msgstr ""
#: ../../include/user.php:203
#: ../../include/user.php:205
msgid "An error occurred during registration. Please try again."
msgstr ""
#: ../../include/user.php:238
#: ../../include/user.php:240
msgid "An error occurred creating your default profile. Please try again."
msgstr ""
@ -7013,30 +7022,30 @@ msgstr ""
msgid "stopped following"
msgstr ""
#: ../../include/Contact.php:203 ../../include/conversation.php:821
#: ../../include/Contact.php:203 ../../include/conversation.php:836
msgid "View Status"
msgstr ""
#: ../../include/Contact.php:204 ../../include/conversation.php:822
#: ../../include/Contact.php:204 ../../include/conversation.php:837
msgid "View Profile"
msgstr ""
#: ../../include/Contact.php:205 ../../include/conversation.php:823
#: ../../include/Contact.php:205 ../../include/conversation.php:838
msgid "View Photos"
msgstr ""
#: ../../include/Contact.php:206 ../../include/Contact.php:219
#: ../../include/conversation.php:824
#: ../../include/conversation.php:839
msgid "Network Posts"
msgstr ""
#: ../../include/Contact.php:207 ../../include/Contact.php:219
#: ../../include/conversation.php:825
#: ../../include/conversation.php:840
msgid "Edit Contact"
msgstr ""
#: ../../include/Contact.php:208 ../../include/Contact.php:219
#: ../../include/conversation.php:826
#: ../../include/conversation.php:841
msgid "Send PM"
msgstr ""
@ -7049,17 +7058,17 @@ msgstr ""
msgid "%1$s marked %2$s's %3$s as favorite"
msgstr ""
#: ../../include/conversation.php:321 ../../include/conversation.php:587
#: ../../include/conversation.php:321 ../../include/conversation.php:602
msgid "Select"
msgstr ""
#: ../../include/conversation.php:338 ../../include/conversation.php:680
#: ../../include/conversation.php:681
#: ../../include/conversation.php:338 ../../include/conversation.php:695
#: ../../include/conversation.php:696
#, php-format
msgid "View %s's profile @ %s"
msgstr ""
#: ../../include/conversation.php:348 ../../include/conversation.php:692
#: ../../include/conversation.php:348 ../../include/conversation.php:707
#, php-format
msgid "%s from %s"
msgstr ""
@ -7075,190 +7084,190 @@ msgid_plural "%d comments"
msgstr[0] ""
msgstr[1] ""
#: ../../include/conversation.php:533
#: ../../include/conversation.php:548
msgid "like"
msgstr ""
#: ../../include/conversation.php:534
#: ../../include/conversation.php:549
msgid "dislike"
msgstr ""
#: ../../include/conversation.php:536
#: ../../include/conversation.php:551
msgid "Share this"
msgstr ""
#: ../../include/conversation.php:536
#: ../../include/conversation.php:551
msgid "share"
msgstr ""
#: ../../include/conversation.php:560
#: ../../include/conversation.php:575
msgid "Bold"
msgstr ""
#: ../../include/conversation.php:561
#: ../../include/conversation.php:576
msgid "Italic"
msgstr ""
#: ../../include/conversation.php:562
#: ../../include/conversation.php:577
msgid "Underline"
msgstr ""
#: ../../include/conversation.php:563
#: ../../include/conversation.php:578
msgid "Quote"
msgstr ""
#: ../../include/conversation.php:564
#: ../../include/conversation.php:579
msgid "Code"
msgstr ""
#: ../../include/conversation.php:565
#: ../../include/conversation.php:580
msgid "Image"
msgstr ""
#: ../../include/conversation.php:566
#: ../../include/conversation.php:581
msgid "Link"
msgstr ""
#: ../../include/conversation.php:567
#: ../../include/conversation.php:582
msgid "Video"
msgstr ""
#: ../../include/conversation.php:600
#: ../../include/conversation.php:615
msgid "add star"
msgstr ""
#: ../../include/conversation.php:601
#: ../../include/conversation.php:616
msgid "remove star"
msgstr ""
#: ../../include/conversation.php:602
#: ../../include/conversation.php:617
msgid "toggle star status"
msgstr ""
#: ../../include/conversation.php:605
#: ../../include/conversation.php:620
msgid "starred"
msgstr ""
#: ../../include/conversation.php:606
#: ../../include/conversation.php:621
msgid "add tag"
msgstr ""
#: ../../include/conversation.php:610
#: ../../include/conversation.php:625
msgid "save to folder"
msgstr ""
#: ../../include/conversation.php:682
#: ../../include/conversation.php:697
msgid "to"
msgstr ""
#: ../../include/conversation.php:683
#: ../../include/conversation.php:698
msgid "Wall-to-Wall"
msgstr ""
#: ../../include/conversation.php:684
#: ../../include/conversation.php:699
msgid "via Wall-To-Wall:"
msgstr ""
#: ../../include/conversation.php:729
#: ../../include/conversation.php:744
msgid "Delete Selected Items"
msgstr ""
#: ../../include/conversation.php:880
#, php-format
msgid "%s likes this."
msgstr ""
#: ../../include/conversation.php:880
#, php-format
msgid "%s doesn't like this."
msgstr ""
#: ../../include/conversation.php:884
#, php-format
msgid "<span %1$s>%2$d people</span> like this."
msgstr ""
#: ../../include/conversation.php:886
#, php-format
msgid "<span %1$s>%2$d people</span> don't like this."
msgstr ""
#: ../../include/conversation.php:892
msgid "and"
msgstr ""
#: ../../include/conversation.php:895
#, php-format
msgid "%s likes this."
msgstr ""
#: ../../include/conversation.php:895
#, php-format
msgid "%s doesn't like this."
msgstr ""
#: ../../include/conversation.php:899
#, php-format
msgid "<span %1$s>%2$d people</span> like this."
msgstr ""
#: ../../include/conversation.php:901
#, php-format
msgid "<span %1$s>%2$d people</span> don't like this."
msgstr ""
#: ../../include/conversation.php:907
msgid "and"
msgstr ""
#: ../../include/conversation.php:910
#, php-format
msgid ", and %d other people"
msgstr ""
#: ../../include/conversation.php:896
#: ../../include/conversation.php:911
#, php-format
msgid "%s like this."
msgstr ""
#: ../../include/conversation.php:896
#: ../../include/conversation.php:911
#, php-format
msgid "%s don't like this."
msgstr ""
#: ../../include/conversation.php:921
#: ../../include/conversation.php:936
msgid "Visible to <strong>everybody</strong>"
msgstr ""
#: ../../include/conversation.php:923
#: ../../include/conversation.php:938
msgid "Please enter a video link/URL:"
msgstr ""
#: ../../include/conversation.php:924
#: ../../include/conversation.php:939
msgid "Please enter an audio link/URL:"
msgstr ""
#: ../../include/conversation.php:925
#: ../../include/conversation.php:940
msgid "Tag term:"
msgstr ""
#: ../../include/conversation.php:927
#: ../../include/conversation.php:942
msgid "Where are you right now?"
msgstr ""
#: ../../include/conversation.php:970
#: ../../include/conversation.php:985
msgid "upload photo"
msgstr ""
#: ../../include/conversation.php:972
#: ../../include/conversation.php:987
msgid "attach file"
msgstr ""
#: ../../include/conversation.php:974
#: ../../include/conversation.php:989
msgid "web link"
msgstr ""
#: ../../include/conversation.php:975
#: ../../include/conversation.php:990
msgid "Insert video link"
msgstr ""
#: ../../include/conversation.php:976
#: ../../include/conversation.php:991
msgid "video link"
msgstr ""
#: ../../include/conversation.php:977
#: ../../include/conversation.php:992
msgid "Insert audio link"
msgstr ""
#: ../../include/conversation.php:978
#: ../../include/conversation.php:993
msgid "audio link"
msgstr ""
#: ../../include/conversation.php:980
#: ../../include/conversation.php:995
msgid "set location"
msgstr ""
#: ../../include/conversation.php:982
#: ../../include/conversation.php:997
msgid "clear location"
msgstr ""
#: ../../include/conversation.php:989
#: ../../include/conversation.php:1004
msgid "permissions"
msgstr ""

View file

@ -29,7 +29,7 @@
{{ if $profile.marital }}
<dl id="aprofile-marital" class="aprofile">
<dt><span class="heart">&hearts;</span> $profile.marital.0</dt>
<dd>$profile.marital.1 {{ if $profile.marital.with }}($profile.marital.with){{ endif }}</dd>
<dd>$profile.marital.1{{ if $profile.marital.with }} ($profile.marital.with){{ endif }}{{ if $profile.howlong }} $profile.howlong{{ endif }}</dd>
</dl>
{{ endif }}
@ -54,6 +54,13 @@
</dl>
{{ endif }}
{{ if $profile.hometown }}
<dl id="aprofile-hometown" class="aprofile">
<dt>$profile.hometown.0</dt>
<dd>$profile.hometown.1</dd>
</dl>
{{ endif }}
{{ if $profile.politic }}
<dl id="aprofile-politic" class="aprofile">
<dt>$profile.politic.0</dt>

View file

@ -97,6 +97,12 @@ $hide_friends
</div>
<div id="profile-edit-region-end"></div>
<div id="profile-edit-hometown-wrapper" >
<label id="profile-edit-hometown-label" for="profile-edit-hometown" >$lbl_hometown </label>
<input type="text" size="32" name="hometown" id="profile-edit-hometown" value="$hometown" />
</div>
<div id="profile-edit-hometown-end"></div>
<div class="profile-edit-submit-wrapper" >
<input type="submit" name="submit" class="profile-edit-submit-button" value="$submit" />
</div>
@ -108,6 +114,9 @@ $marital
</div>
<label id="profile-edit-with-label" for="profile-edit-with" > $lbl_with </label>
<input type="text" size="32" name="with" id="profile-edit-with" title="$lbl_ex1" value="$with" />
<label id="profile-edit-howlong-label" for="profile-edit-howlong" > $lbl_howlong </label>
<input type="text" size="32" name="howlong" id="profile-edit-howlong" title="$lbl_howlong" value="$howlong" />
<div id="profile-edit-marital-end"></div>
<div id="profile-edit-sexual-wrapper" >

View file

@ -679,7 +679,8 @@ input#dfrn-url {
#profile-edit-religion-label,
#profile-edit-pubkeywords-label,
#profile-edit-prvkeywords-label,
#profile-edit-homepage-label {
#profile-edit-homepage-label,
#profile-edit-hometown-label {
float: left;
width: 175px;
}
@ -774,7 +775,7 @@ input#dfrn-url {
}
#profile-edit-homepage {
#profile-edit-homepage, #profile-edit-hometown {
float: left;
margin-bottom: 35px;
}
@ -814,6 +815,7 @@ input#dfrn-url {
#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,