lots of formatting, bug fixes on profile updates, i18n
This commit is contained in:
parent
e15265be3c
commit
2e5fb9c37e
4
boot.php
4
boot.php
|
@ -359,8 +359,8 @@ function local_user() {
|
||||||
|
|
||||||
if(! function_exists('remote_user')) {
|
if(! function_exists('remote_user')) {
|
||||||
function remote_user() {
|
function remote_user() {
|
||||||
if((x($_SESSION,'authenticated')) && (x($_SESSION,'cid')))
|
if((x($_SESSION,'authenticated')) && (x($_SESSION,'visitor_id')))
|
||||||
return $_SESSION['cid'];
|
return $_SESSION['visitor_id'];
|
||||||
return false;
|
return false;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -125,18 +125,22 @@ function group_side($every="contacts",$each="group") {
|
||||||
|
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
$createtext = t('Create a new group');
|
||||||
|
$linktext= t('Everybody');
|
||||||
|
|
||||||
$o .= <<< EOT
|
$o .= <<< EOT
|
||||||
|
|
||||||
<div id="group-sidebar">
|
<div id="group-sidebar">
|
||||||
<h3>Groups</h3>
|
<h3>Groups</h3>
|
||||||
|
|
||||||
<div id="sidebar-new-group">
|
<div id="sidebar-new-group">
|
||||||
<a href="group/new">Create a new group</a>
|
<a href="group/new">$createtext</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="sidebar-group-list">
|
<div id="sidebar-group-list">
|
||||||
<ul id="sidebar-group-ul">
|
<ul id="sidebar-group-ul">
|
||||||
<li class="sidebar-group-li" ><a href="$every">Everybody</a></li>
|
<li class="sidebar-group-li" ><a href="$every" >$linktext</a></li>
|
||||||
|
|
||||||
EOT;
|
EOT;
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ function get_feed_for(&$a,$dfrn_id,$owner_id,$last_update) {
|
||||||
'$owner_profile_page' => xmlify($item['owner-link']),
|
'$owner_profile_page' => xmlify($item['owner-link']),
|
||||||
'$owner_thumb' => xmlify($item['owner-avatar']),
|
'$owner_thumb' => xmlify($item['owner-avatar']),
|
||||||
'$item_id' => xmlify($item['uri']),
|
'$item_id' => xmlify($item['uri']),
|
||||||
'$title' => xmlify($item['name']),
|
'$title' => xmlify($item['title']),
|
||||||
'$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
|
'$published' => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
|
||||||
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
|
'$updated' => xmlify(datetime_convert('UTC', 'UTC', $item['edited'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
|
||||||
'$content' =>xmlify($item['body']),
|
'$content' =>xmlify($item['body']),
|
||||||
|
|
|
@ -163,7 +163,7 @@ if($argc < 3)
|
||||||
'$owner_profile_page' => xmlify($item['owner-link']),
|
'$owner_profile_page' => xmlify($item['owner-link']),
|
||||||
'$owner_thumb' => xmlify($item['owner-avatar']),
|
'$owner_thumb' => xmlify($item['owner-avatar']),
|
||||||
'$item_id' => xmlify($item['uri']),
|
'$item_id' => xmlify($item['uri']),
|
||||||
'$title' => xmlify($contact['name']),
|
'$title' => xmlify($item['title']),
|
||||||
'$published' => xmlify(datetime_convert('UTC', 'UTC',
|
'$published' => xmlify(datetime_convert('UTC', 'UTC',
|
||||||
$item['created'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
|
$item['created'] . '+00:00' , 'Y-m-d\TH:i:s\Z')),
|
||||||
'$updated' => xmlify(datetime_convert('UTC', 'UTC',
|
'$updated' => xmlify(datetime_convert('UTC', 'UTC',
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
function contacts_init(&$a) {
|
function contacts_init(&$a) {
|
||||||
require_once('include/group.php');
|
require_once('include/group.php');
|
||||||
$a->page['aside'] .= group_side();
|
$a->page['aside'] .= group_side();
|
||||||
|
|
||||||
|
if($a->config['register_policy'] != REGISTER_CLOSED)
|
||||||
|
$a->page['aside'] .= '<div class="side-invite-link-wrapper" id="side-invite-link-wrapper" ><a href="invite" class="side-invite-link" id="side-invite-link">' . t("Invite Friends") . '</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function contacts_post(&$a) {
|
function contacts_post(&$a) {
|
||||||
|
|
|
@ -9,19 +9,17 @@ function dfrn_confirm_post(&$a) {
|
||||||
|
|
||||||
if(x($_POST,'source_url')) {
|
if(x($_POST,'source_url')) {
|
||||||
|
|
||||||
// We are processing an external confirmation to an introduction created by our user.
|
// We are processing an external confirmation to an introduction created by our user.
|
||||||
|
|
||||||
$public_key = $_POST['public_key'];
|
$public_key = $_POST['public_key'];
|
||||||
$dfrn_id = $_POST['dfrn_id'];
|
$dfrn_id = $_POST['dfrn_id'];
|
||||||
$source_url = $_POST['source_url'];
|
$source_url = $_POST['source_url'];
|
||||||
$aes_key = $_POST['aes_key'];
|
$aes_key = $_POST['aes_key'];
|
||||||
|
|
||||||
if(intval($node))
|
// Find our user's account
|
||||||
$r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
|
|
||||||
intval($node));
|
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
|
||||||
else
|
dbesc($node));
|
||||||
$r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
|
|
||||||
dbesc($node));
|
|
||||||
|
|
||||||
if(! count($r)) {
|
if(! count($r)) {
|
||||||
xml_status(3); // failure
|
xml_status(3); // failure
|
||||||
|
@ -32,6 +30,8 @@ function dfrn_confirm_post(&$a) {
|
||||||
|
|
||||||
$decrypted_source_url = "";
|
$decrypted_source_url = "";
|
||||||
|
|
||||||
|
// verify everything
|
||||||
|
|
||||||
openssl_private_decrypt($source_url,$decrypted_source_url,$my_prvkey);
|
openssl_private_decrypt($source_url,$decrypted_source_url,$my_prvkey);
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,6 +105,7 @@ function dfrn_confirm_post(&$a) {
|
||||||
);
|
);
|
||||||
if($r === false)
|
if($r === false)
|
||||||
$photo_failure = true;
|
$photo_failure = true;
|
||||||
|
|
||||||
$img->scaleImage(80);
|
$img->scaleImage(80);
|
||||||
$r = q("INSERT INTO `photo` ( `uid`, `resource-id`, `created`, `edited`, `filename`,
|
$r = q("INSERT INTO `photo` ( `uid`, `resource-id`, `created`, `edited`, `filename`,
|
||||||
`height`, `width`, `data`, `scale` )
|
`height`, `width`, `data`, `scale` )
|
||||||
|
@ -142,7 +143,7 @@ function dfrn_confirm_post(&$a) {
|
||||||
intval($dfrn_record)
|
intval($dfrn_record)
|
||||||
);
|
);
|
||||||
if($r === false)
|
if($r === false)
|
||||||
$_SESSION['sysmsg'] .= "Unable to set contact photo info." . EOL;
|
notice( t("Unable to set contact photo info.") . EOL);
|
||||||
|
|
||||||
// Otherwise everything seems to have worked and we are almost done. Yay!
|
// Otherwise everything seems to have worked and we are almost done. Yay!
|
||||||
// Send an email notification
|
// Send an email notification
|
||||||
|
@ -150,32 +151,33 @@ function dfrn_confirm_post(&$a) {
|
||||||
$r = q("SELECT * FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
|
$r = q("SELECT * FROM `contact` LEFT JOIN `user` ON `contact`.`uid` = `user`.`uid`
|
||||||
WHERE `contact`.`id` = %d LIMIT 1",
|
WHERE `contact`.`id` = %d LIMIT 1",
|
||||||
intval($dfrn_record));
|
intval($dfrn_record));
|
||||||
|
if((count($r)) && ($r[0]['notify-flags'] & NOTIFY_CONFIRM)) {
|
||||||
$tpl = file_get_contents('view/intro_complete_eml.tpl');
|
|
||||||
|
|
||||||
$email_tpl = replace_macros($tpl, array(
|
|
||||||
'$sitename' => $a->config['sitename'],
|
|
||||||
'$siteurl' => $a->get_baseurl(),
|
|
||||||
'$username' => $r[0]['username'],
|
|
||||||
'$email' => $r[0]['email'],
|
|
||||||
'$fn' => $r[0]['name'],
|
|
||||||
'$dfrn_url' => $r[0]['url'],
|
|
||||||
'$uid' => $newuid ));
|
|
||||||
|
|
||||||
|
$tpl = file_get_contents('view/intro_complete_eml.tpl');
|
||||||
$res = mail($r[0]['email'],"Introduction accepted at {$a->config['sitename']}",
|
|
||||||
$email_tpl,"From: Administrator@{$_SERVER[SERVER_NAME]}");
|
$email_tpl = replace_macros($tpl, array(
|
||||||
if(!$res) {
|
'$sitename' => $a->config['sitename'],
|
||||||
notice( "Email notification failed." . EOL );
|
'$siteurl' => $a->get_baseurl(),
|
||||||
|
'$username' => $r[0]['username'],
|
||||||
|
'$email' => $r[0]['email'],
|
||||||
|
'$fn' => $r[0]['name'],
|
||||||
|
'$dfrn_url' => $r[0]['url'],
|
||||||
|
'$uid' => $newuid )
|
||||||
|
);
|
||||||
|
|
||||||
|
$res = mail($r[0]['email'], t("Introduction accepted at ") . $a->config['sitename'],
|
||||||
|
$email_tpl,t("From: Administrator@") . $_SERVER[SERVER_NAME] );
|
||||||
|
if(!$res) {
|
||||||
|
notice( t("Email notification failed.") . EOL );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
xml_status(0); // Success
|
xml_status(0); // Success
|
||||||
|
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
xml_status(2); // Hopefully temporary problem that can be retried.
|
xml_status(2); // Hopefully temporary problem that can be retried.
|
||||||
|
}
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
|
|
||||||
////////////////////// End of this scenario ///////////////////////////////////////////////
|
////////////////////// End of this scenario ///////////////////////////////////////////////
|
||||||
|
@ -187,7 +189,7 @@ function dfrn_confirm_post(&$a) {
|
||||||
$uid = $_SESSION['uid'];
|
$uid = $_SESSION['uid'];
|
||||||
|
|
||||||
if(! $uid) {
|
if(! $uid) {
|
||||||
notice("Permission denied." . EOL );
|
notice(t("Permission denied.") . EOL );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +202,7 @@ function dfrn_confirm_post(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
if((! $r) || (! count($r))) {
|
if((! $r) || (! count($r))) {
|
||||||
$_SESSION['sysmsg'] = 'Node does not exist.' . EOL ;
|
notice( t('Node does not exist.') . EOL );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +230,7 @@ function dfrn_confirm_post(&$a) {
|
||||||
dbesc($private_key),
|
dbesc($private_key),
|
||||||
intval($contact_id),
|
intval($contact_id),
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$params = array();
|
$params = array();
|
||||||
|
@ -262,7 +264,7 @@ function dfrn_confirm_post(&$a) {
|
||||||
$status = (int) $xml->status;
|
$status = (int) $xml->status;
|
||||||
switch($status) {
|
switch($status) {
|
||||||
case 0:
|
case 0:
|
||||||
$_SESSION['sysmsg'] .= "Confirmation completed successfully" . EOL;
|
notice( t("Confirmation completed successfully") . EOL);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
|
@ -276,12 +278,12 @@ function dfrn_confirm_post(&$a) {
|
||||||
);
|
);
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
$_SESSION['sysmsg'] .= "Temporary failure. Please wait and try again." . EOL;
|
notice( t("Temporary failure. Please wait and try again.") . EOL);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
$_SESSION['sysmsg'] .= "Introduction failed or was revoked. Cannot complete." . EOL;
|
notice( t("Introduction failed or was revoked. Cannot complete.") . EOL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,7 +369,7 @@ function dfrn_confirm_post(&$a) {
|
||||||
intval($contact_id)
|
intval($contact_id)
|
||||||
);
|
);
|
||||||
if($r === false)
|
if($r === false)
|
||||||
$_SESSION['sysmsg'] .= "Unable to set contact photo info." . EOL;
|
notice( t("Unable to set contact photo info.") . EOL);
|
||||||
|
|
||||||
goaway($a->get_baseurl() . '/contacts/' . intval($contact_id));
|
goaway($a->get_baseurl() . '/contacts/' . intval($contact_id));
|
||||||
return; //NOTREACHED
|
return; //NOTREACHED
|
||||||
|
|
|
@ -51,7 +51,7 @@ function dfrn_request_post(&$a) {
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
if(strlen($r[0]['dfrn-id'])) {
|
if(strlen($r[0]['dfrn-id'])) {
|
||||||
notice("This introduction has already been accepted." . EOL );
|
notice( t("This introduction has already been accepted.") . EOL );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -72,19 +72,19 @@ function dfrn_request_post(&$a) {
|
||||||
$parms = scrape_dfrn($dfrn_url);
|
$parms = scrape_dfrn($dfrn_url);
|
||||||
|
|
||||||
if(! count($parms)) {
|
if(! count($parms)) {
|
||||||
notice( 'Profile location is not valid or does not contain profile information.' . EOL );
|
notice( t('Profile location is not valid or does not contain profile information.') . EOL );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(! x($parms,'fn'))
|
if(! x($parms,'fn'))
|
||||||
notice( 'Warning: profile location has no identifiable owner name.' . EOL );
|
notice( t('Warning: profile location has no identifiable owner name.') . EOL );
|
||||||
if(! x($parms,'photo'))
|
if(! x($parms,'photo'))
|
||||||
notice( 'Warning: profile location has no profile photo.' . EOL );
|
notice( t('Warning: profile location has no profile photo.') . EOL );
|
||||||
$invalid = validate_dfrn($parms);
|
$invalid = validate_dfrn($parms);
|
||||||
if($invalid) {
|
if($invalid) {
|
||||||
notice( $invalid . ' required parameter'
|
notice( $invalid . t(' required parameter')
|
||||||
. (($invalid == 1) ? " was " : "s were " )
|
. (($invalid == 1) ? t(" was ") : t("s were ") )
|
||||||
. "not found at the given location." . EOL ) ;
|
. t("not found at the given location.") . EOL ) ;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ function dfrn_request_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if($r) {
|
if($r) {
|
||||||
notice( "Introduction complete." . EOL);
|
notice( t("Introduction complete.") . EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow the blocked remote notification to complete
|
// Allow the blocked remote notification to complete
|
||||||
|
@ -134,7 +134,7 @@ function dfrn_request_post(&$a) {
|
||||||
|
|
||||||
// invalid/bogus request
|
// invalid/bogus request
|
||||||
|
|
||||||
notice( "Unrecoverable protocol error." . EOL );
|
notice( t("Unrecoverable protocol error.") . EOL );
|
||||||
goaway($a->get_baseurl());
|
goaway($a->get_baseurl());
|
||||||
return; // NOTREACHED
|
return; // NOTREACHED
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ function dfrn_request_post(&$a) {
|
||||||
// in $a->argv[1] and we should have their complete info in $a->profile.
|
// in $a->argv[1] and we should have their complete info in $a->profile.
|
||||||
|
|
||||||
if(! (is_array($a->profile) && count($a->profile))) {
|
if(! (is_array($a->profile) && count($a->profile))) {
|
||||||
notice("Profile unavailable." . EOL);
|
notice(t("Profile unavailable.") . EOL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ function dfrn_request_post(&$a) {
|
||||||
|
|
||||||
$url = trim($_POST['dfrn_url']);
|
$url = trim($_POST['dfrn_url']);
|
||||||
if(! strlen($url)) {
|
if(! strlen($url)) {
|
||||||
notice( "Invalid URL" . EOL );
|
notice( t("Invalid locator") . EOL );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ function dfrn_request_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(! strlen($url)) {
|
if(! strlen($url)) {
|
||||||
notice("Unable to resolve your name at the provided location." . EOL);
|
notice(t("Unable to resolve your name at the provided location.") . EOL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ function dfrn_request_post(&$a) {
|
||||||
|
|
||||||
if(count($ret)) {
|
if(count($ret)) {
|
||||||
if(strlen($ret[0]['issued-id'])) {
|
if(strlen($ret[0]['issued-id'])) {
|
||||||
notice( 'You have already introduced yourself here.' . EOL );
|
notice( t('You have already introduced yourself here.') . EOL );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -240,19 +240,19 @@ function dfrn_request_post(&$a) {
|
||||||
$parms = scrape_dfrn($url);
|
$parms = scrape_dfrn($url);
|
||||||
|
|
||||||
if(! count($parms)) {
|
if(! count($parms)) {
|
||||||
notice( 'Profile location is not valid or does not contain profile information.' . EOL );
|
notice( t('Profile location is not valid or does not contain profile information.') . EOL );
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(! x($parms,'fn'))
|
if(! x($parms,'fn'))
|
||||||
notice( 'Warning: profile location has no identifiable owner name.' . EOL );
|
notice( t('Warning: profile location has no identifiable owner name.') . EOL );
|
||||||
if(! x($parms,'photo'))
|
if(! x($parms,'photo'))
|
||||||
notice( 'Warning: profile location has no profile photo.' . EOL );
|
notice( t('Warning: profile location has no profile photo.') . EOL );
|
||||||
$invalid = validate_dfrn($parms);
|
$invalid = validate_dfrn($parms);
|
||||||
if($invalid) {
|
if($invalid) {
|
||||||
notice( $invalid . ' required parameter'
|
notice( $invalid . t(' required parameter')
|
||||||
. (($invalid == 1) ? " was " : "s were " )
|
. (($invalid == 1) ? t(" was ") : t("s were ") )
|
||||||
. "not found at the given location." . EOL ) ;
|
. t("not found at the given location.") . EOL ) ;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ function dfrn_request_post(&$a) {
|
||||||
// This notice will only be seen by the requestor if the requestor and requestee are on the same server.
|
// This notice will only be seen by the requestor if the requestor and requestee are on the same server.
|
||||||
|
|
||||||
if(! $failed)
|
if(! $failed)
|
||||||
notice( "Your introduction has been sent." . EOL );
|
notice( t("Your introduction has been sent.") . EOL );
|
||||||
|
|
||||||
// "Homecoming" - send the requestor back to their site to record the introduction.
|
// "Homecoming" - send the requestor back to their site to record the introduction.
|
||||||
|
|
||||||
|
@ -349,7 +349,7 @@ function dfrn_request_content(&$a) {
|
||||||
if(x($_GET,'dfrn_url')) {
|
if(x($_GET,'dfrn_url')) {
|
||||||
|
|
||||||
if(! local_user()) {
|
if(! local_user()) {
|
||||||
notice( "Please login to confirm introduction." . EOL );
|
notice( t("Please login to confirm introduction.") . EOL );
|
||||||
return login();
|
return login();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,7 +357,7 @@ function dfrn_request_content(&$a) {
|
||||||
// but not as the person who needs to deal with this request.
|
// but not as the person who needs to deal with this request.
|
||||||
|
|
||||||
if ($a->user['nickname'] != $a->argv[1]) {
|
if ($a->user['nickname'] != $a->argv[1]) {
|
||||||
notice( "Incorrect identity currently logged in. Please login to <strong>this</strong> profile." . EOL);
|
notice( t("Incorrect identity currently logged in. Please login to <strong>this</strong> profile.") . EOL);
|
||||||
return login();
|
return login();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,13 +398,13 @@ function dfrn_request_content(&$a) {
|
||||||
if($r[0]['notify-flags'] & NOTIFY_INTRO) {
|
if($r[0]['notify-flags'] & NOTIFY_INTRO) {
|
||||||
$email_tpl = file_get_contents('view/request_notify_eml.tpl');
|
$email_tpl = file_get_contents('view/request_notify_eml.tpl');
|
||||||
$email = replace_macros($email_tpl, array(
|
$email = replace_macros($email_tpl, array(
|
||||||
'$requestor' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : '[Name Withheld]'),
|
'$requestor' => ((strlen(stripslashes($r[0]['name']))) ? stripslashes($r[0]['name']) : t('[Name Withheld]')),
|
||||||
'$url' => stripslashes($r[0]['url']),
|
'$url' => stripslashes($r[0]['url']),
|
||||||
'$myname' => $r[0]['username'],
|
'$myname' => $r[0]['username'],
|
||||||
'$siteurl' => $a->get_baseurl(),
|
'$siteurl' => $a->get_baseurl(),
|
||||||
'$sitename' => $a->config['sitename']
|
'$sitename' => $a->config['sitename']
|
||||||
));
|
));
|
||||||
$res = mail($r[0]['email'],"Introduction received at {$a->config['sitename']}",$email,"From: Administrator@{$_SERVER[SERVER_NAME]}");
|
$res = mail($r[0]['email'],t("Introduction received at ") . $a->config['sitename'],$email,t('From: Administrator@') . $_SERVER[SERVER_NAME] );
|
||||||
// This is a redundant notification - no point throwing errors if it fails.
|
// This is a redundant notification - no point throwing errors if it fails.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -425,5 +425,6 @@ function dfrn_request_content(&$a) {
|
||||||
$o = replace_macros($o,array('$nickname' => $a->argv[1]));
|
$o = replace_macros($o,array('$nickname' => $a->argv[1]));
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
return; // Somebody is fishing.
|
return; // Somebody is fishing.
|
||||||
}}
|
}}
|
|
@ -64,7 +64,7 @@ function item_post(&$a) {
|
||||||
$str_contact_deny = implode('',$contact_deny);
|
$str_contact_deny = implode('',$contact_deny);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$title = notags(trim($_POST['title']));
|
||||||
$body = escape_tags(trim($_POST['body']));
|
$body = escape_tags(trim($_POST['body']));
|
||||||
|
|
||||||
if(! strlen($body)) {
|
if(! strlen($body)) {
|
||||||
|
@ -118,8 +118,8 @@ function item_post(&$a) {
|
||||||
|
|
||||||
|
|
||||||
$r = q("INSERT INTO `item` (`uid`,`type`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `created`,
|
$r = q("INSERT INTO `item` (`uid`,`type`,`contact-id`,`owner-name`,`owner-link`,`owner-avatar`, `created`,
|
||||||
`edited`, `uri`, `body`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`)
|
`edited`, `uri`, `title`, `body`, `allow_cid`, `allow_gid`, `deny_cid`, `deny_gid`)
|
||||||
VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
|
VALUES( %d, '%s', %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s' )",
|
||||||
intval($profile_uid),
|
intval($profile_uid),
|
||||||
dbesc($_POST['type']),
|
dbesc($_POST['type']),
|
||||||
intval($contact_id),
|
intval($contact_id),
|
||||||
|
@ -129,7 +129,8 @@ function item_post(&$a) {
|
||||||
datetime_convert(),
|
datetime_convert(),
|
||||||
datetime_convert(),
|
datetime_convert(),
|
||||||
dbesc($uri),
|
dbesc($uri),
|
||||||
dbesc(escape_tags(trim($_POST['body']))),
|
dbesc($title),
|
||||||
|
dbesc($body),
|
||||||
dbesc($str_contact_allow),
|
dbesc($str_contact_allow),
|
||||||
dbesc($str_group_allow),
|
dbesc($str_group_allow),
|
||||||
dbesc($str_contact_deny),
|
dbesc($str_contact_deny),
|
||||||
|
|
|
@ -210,6 +210,7 @@ function network_content(&$a, $update = false) {
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
'$thumb' => $profile_avatar,
|
'$thumb' => $profile_avatar,
|
||||||
|
'$title' => $item['title'],
|
||||||
'$body' => bbcode($item['body']),
|
'$body' => bbcode($item['body']),
|
||||||
'$ago' => relative_date($item['created']),
|
'$ago' => relative_date($item['created']),
|
||||||
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
|
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
|
||||||
|
|
|
@ -282,6 +282,7 @@ function profile_content(&$a, $update = false) {
|
||||||
'$profile_url' => $profile_link,
|
'$profile_url' => $profile_link,
|
||||||
'$name' => $profile_name,
|
'$name' => $profile_name,
|
||||||
'$thumb' => $profile_avatar,
|
'$thumb' => $profile_avatar,
|
||||||
|
'$title' => $item['title'],
|
||||||
'$body' => bbcode($item['body']),
|
'$body' => bbcode($item['body']),
|
||||||
'$ago' => relative_date($item['created']),
|
'$ago' => relative_date($item['created']),
|
||||||
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
|
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
|
||||||
|
|
|
@ -76,10 +76,14 @@
|
||||||
|
|
||||||
function imgbright(node) {
|
function imgbright(node) {
|
||||||
$(node).attr("src",$(node).attr("src").replace('hide','show'));
|
$(node).attr("src",$(node).attr("src").replace('hide','show'));
|
||||||
|
$(node).css('width',24);
|
||||||
|
$(node).css('height',24);
|
||||||
}
|
}
|
||||||
|
|
||||||
function imgdull(node) {
|
function imgdull(node) {
|
||||||
$(node).attr("src",$(node).attr("src").replace('show','hide'));
|
$(node).attr("src",$(node).attr("src").replace('show','hide'));
|
||||||
|
$(node).css('width',16);
|
||||||
|
$(node).css('height',16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ section {
|
||||||
top: 60px;
|
top: 60px;
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
|
right: 0px;
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 1.6em;
|
font-size: 1.6em;
|
||||||
|
@ -458,6 +459,10 @@ input#dfrn-url {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wall-item-outside-wrapper {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.wall-item-outside-wrapper.comment {
|
.wall-item-outside-wrapper.comment {
|
||||||
margin-left: 50px;
|
margin-left: 50px;
|
||||||
}
|
}
|
||||||
|
@ -508,11 +513,22 @@ input#dfrn-url {
|
||||||
.wall-item-photo {
|
.wall-item-photo {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
.wall-item-content {
|
||||||
|
float: left;
|
||||||
|
width: 450px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wall-item-title {
|
||||||
|
float: left;
|
||||||
|
font-weight: bold;
|
||||||
|
width: 450px;
|
||||||
|
}
|
||||||
|
|
||||||
.wall-item-body {
|
.wall-item-body {
|
||||||
float: left;
|
float: left;
|
||||||
width: 450px;
|
width: 450px;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
margin-left: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-edit-wrapper {
|
.comment-edit-wrapper {
|
||||||
|
|
|
@ -1,17 +1,21 @@
|
||||||
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
||||||
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" >
|
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" >
|
||||||
<a href="$profile_url" title="View $name's profile" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
<a href="$profile_url" title="View $name's profile" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
||||||
<img src="$thumb" class="wall-item-photo" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
|
<img src="$thumb" class="wall-item-photo" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
|
||||||
<a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a>
|
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
||||||
<div class="wall-item-ago" id="wall-item-ago-$id">$ago</div>
|
<a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a>
|
||||||
</div>
|
<div class="wall-item-ago" id="wall-item-ago-$id">$ago</div>
|
||||||
<div class="wall-item-body" id="wall-item-body-$id" >$body</div>
|
</div>
|
||||||
$drop
|
<div class="wall-item-content" id="wall-item-content-$id" >
|
||||||
<div class="wall-item-wrapper-end"></div>
|
<div class="wall-item-title" id="wall-item-title-$id">$title</div>
|
||||||
<div class="wall-item-comment-separator"></div>
|
<div class="wall-item-body" id="wall-item-body-$id" >$body</div>
|
||||||
$comment
|
</div>
|
||||||
|
$drop
|
||||||
|
<div class="wall-item-wrapper-end"></div>
|
||||||
|
<div class="wall-item-comment-separator"></div>
|
||||||
|
$comment
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wall-item-outside-wrapper-end$indent" ></div>
|
<div class="wall-item-outside-wrapper-end$indent" ></div>
|
||||||
|
|
|
@ -1,22 +1,26 @@
|
||||||
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
<div class="wall-item-outside-wrapper$indent" id="wall-item-outside-wrapper-$id" >
|
||||||
<div class="wall-item-photo-wrapper" id="wall-item-ownerphoto-wrapper-$id" >
|
<div class="wall-item-photo-wrapper" id="wall-item-ownerphoto-wrapper-$id" >
|
||||||
<a href="$owner_url" title="View $owner_name's profile" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$id">
|
<a href="$owner_url" title="View $owner_name's profile" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$id">
|
||||||
<img src="$owner_photo" class="wall-item-photo" id="wall-item-ownerphoto-$id" height="80" width="80" alt="$owner_name" /></a>
|
<img src="$owner_photo" class="wall-item-photo" id="wall-item-ownerphoto-$id" height="80" width="80" alt="$owner_name" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="wall-item-arrowphoto-wrapper" ><img src="images/larrow.gif" alt="Wall-To-Wall" /></div>
|
<div class="wall-item-arrowphoto-wrapper" ><img src="images/larrow.gif" alt="Wall-To-Wall" /></div>
|
||||||
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" >
|
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$id" >
|
||||||
<a href="$profile_url" title="View $name's profile" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
<a href="$profile_url" title="View $name's profile" class="wall-item-photo-link" id="wall-item-photo-link-$id">
|
||||||
<img src="$thumb" class="wall-item-photo" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
|
<img src="$thumb" class="wall-item-photo" id="wall-item-photo-$id" height="80" width="80" alt="$name" /></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
|
||||||
<a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a> to <a href="$owner_url" title="View $owner_name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-ownername-$id">$owner_name</span></a> via Wall-To-Wall:<br />
|
<a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a> to <a href="$owner_url" title="View $owner_name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-ownername-$id">$owner_name</span></a> via Wall-To-Wall:<br />
|
||||||
<span class="wall-item-body" id="wall-item-body-$id" >$body</span>
|
<div class="wall-item-ago" id="wall-item-ago-$id">$ago</div>
|
||||||
<div class="wall-item-ago" id="wall-item-ago-$id">$ago</div>
|
</div>
|
||||||
$drop
|
<div class="wall-item-content" id="wall-item-content-$id" >
|
||||||
</div>
|
<div class="wall-item-title" id="wall-item-title-$id">$title</div>
|
||||||
<div class="wall-item-wrapper-end"></div>
|
<div class="wall-item-body" id="wall-item-body-$id" >$body</div>
|
||||||
<div class="wall-item-comment-separator"></div>
|
</div>
|
||||||
$comment
|
$drop
|
||||||
|
|
||||||
|
<div class="wall-item-wrapper-end"></div>
|
||||||
|
<div class="wall-item-comment-separator"></div>
|
||||||
|
$comment
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wall-item-outside-wrapper-end$indent" ></div>
|
<div class="wall-item-outside-wrapper-end$indent" ></div>
|
||||||
|
|
Loading…
Reference in a new issue