mirror of
https://github.com/friendica/friendica
synced 2024-11-10 02:22:55 +00:00
redirect to profile photo upload on very first login
This commit is contained in:
parent
b603641807
commit
a0e7d8fa00
6 changed files with 274 additions and 239 deletions
5
boot.php
5
boot.php
|
@ -2,7 +2,7 @@
|
|||
|
||||
set_time_limit(0);
|
||||
|
||||
define ( 'FRIENDIKA_VERSION', '2.1.956' );
|
||||
define ( 'FRIENDIKA_VERSION', '2.1.958' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||
define ( 'DB_UPDATE_VERSION', 1053 );
|
||||
|
||||
|
@ -2125,7 +2125,7 @@ function smilies($s) {
|
|||
$a = get_app();
|
||||
|
||||
return str_replace(
|
||||
array( '<3', '</3', '<\\3', ':-)', ';-)', ':-(', ':(', ':-P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
|
||||
array( '<3', '</3', '<\\3', ':-)', ';-)', ':-(', ':(', ':-P', ':P', ':-"', ':-x', ':-X', ':-D', '8-|', '8-O'),
|
||||
array(
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
|
||||
|
@ -2135,6 +2135,7 @@ function smilies($s) {
|
|||
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":(" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":P" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
|
||||
'<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
|
||||
|
|
|
@ -191,9 +191,17 @@ else {
|
|||
$_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $record['nickname'];
|
||||
$_SESSION['addr'] = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
notice( t("Welcome back ") . $record['username'] . EOL);
|
||||
$a->user = $record;
|
||||
|
||||
if($a->user['login_date'] === '0000-00-00 00:00:00') {
|
||||
$_SESSION['return_url'] = 'profile_photo/new';
|
||||
$a->module = 'profile_photo';
|
||||
notice( t("Welcome ") . $a->user['username'] . EOL);
|
||||
notice( t('Please upload a profile photo.') . EOL);
|
||||
}
|
||||
else
|
||||
notice( t("Welcome back ") . $a->user['username'] . EOL);
|
||||
|
||||
if(strlen($a->user['timezone'])) {
|
||||
date_default_timezone_set($a->user['timezone']);
|
||||
$a->timezone = $a->user['timezone'];
|
||||
|
@ -214,6 +222,8 @@ else {
|
|||
$a->cid = $r[0]['id'];
|
||||
$_SESSION['cid'] = $a->cid;
|
||||
}
|
||||
|
||||
|
||||
q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
|
||||
dbesc(datetime_convert()),
|
||||
intval($_SESSION['uid'])
|
||||
|
|
|
@ -70,9 +70,18 @@ function openid_content(&$a) {
|
|||
$_SESSION['page_flags'] = $r[0]['page-flags'];
|
||||
$_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $r[0]['nickname'];
|
||||
|
||||
notice( sprintf( t("Welcome back "), $r[0]['username']) . EOL);
|
||||
$a->user = $r[0];
|
||||
|
||||
if($a->user['login_date'] === '0000-00-00 00:00:00') {
|
||||
$_SESSION['return_url'] = 'profile_photo/new';
|
||||
$a->module = 'profile_photo';
|
||||
notice( t("Welcome ") . $a->user['username'] . EOL);
|
||||
notice( t('Please upload a profile photo.') . EOL);
|
||||
}
|
||||
else
|
||||
notice( t("Welcome back ") . $a->user['username'] . EOL);
|
||||
|
||||
|
||||
if(strlen($a->user['timezone'])) {
|
||||
date_default_timezone_set($a->user['timezone']);
|
||||
$a->timezone = $a->user['timezone'];
|
||||
|
|
|
@ -134,6 +134,11 @@ function profile_photo_content(&$a) {
|
|||
return;
|
||||
}
|
||||
|
||||
$newuser = false;
|
||||
|
||||
if($a->argc == 2 && $a->argv[1] === 'new')
|
||||
$newuser = true;
|
||||
|
||||
if( $a->argv[1]=='use'){
|
||||
if ($a->argc<3){
|
||||
notice( t('Permission denied.') . EOL );
|
||||
|
@ -188,7 +193,7 @@ function profile_photo_content(&$a) {
|
|||
'$lbl_upfile' => t('Upload File:'),
|
||||
'$title' => t('Upload Profile Photo'),
|
||||
'$submit' => t('Upload'),
|
||||
'$select' => sprintf('%s %s', t('or'), '<a href="'. $a->get_baseurl() . '/photos/' . $a->user['nickname'] . '">' . t('select a photo from your photo albums') . '</a>')
|
||||
'$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->user['nickname'] . '">' . t('select a photo from your photo albums') . '</a>')
|
||||
));
|
||||
|
||||
return $o;
|
||||
|
|
459
util/messages.po
459
util/messages.po
File diff suppressed because it is too large
Load diff
|
@ -143,6 +143,7 @@ $a->strings['Remote site reported: '] = 'Remote site reported: ';
|
|||
$a->strings["Temporary failure. Please wait and try again."] = "Temporary failure. Please wait and try again.";
|
||||
$a->strings["Introduction failed or was revoked."] = "Introduction failed or was revoked.";
|
||||
$a->strings['Unable to set contact photo.'] = 'Unable to set contact photo.';
|
||||
$a->strings['%1$s is now friends with %2$s'] = '%1$s is now friends with %2$s';
|
||||
$a->strings['Our site encryption key is apparently messed up.'] = 'Our site encryption key is apparently messed up.';
|
||||
$a->strings['Empty site URL was provided or URL could not be decrypted by us.'] = 'Empty site URL was provided or URL could not be decrypted by us.';
|
||||
$a->strings['Contact record was not found for you on our site.'] = 'Contact record was not found for you on our site.';
|
||||
|
@ -177,6 +178,7 @@ $a->strings['Please confirm your introduction/connection request to %s.'] = 'Ple
|
|||
$a->strings['Confirm'] = 'Confirm';
|
||||
$a->strings['[Name Withheld]'] = '[Name Withheld]';
|
||||
$a->strings["Introduction received at "] = "Introduction received at ";
|
||||
$a->strings['Public access denied.'] = 'Public access denied.';
|
||||
$a->strings['Friend/Connection Request'] = 'Friend/Connection Request';
|
||||
$a->strings['Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca'] = 'Examples: jojo@demo.friendika.com, http://demo.friendika.com/profile/jojo, testuser@identi.ca';
|
||||
$a->strings['Please answer the following:'] = 'Please answer the following:';
|
||||
|
@ -354,13 +356,6 @@ $a->strings['Normal View'] = 'Normal View';
|
|||
$a->strings['New Item View'] = 'New Item View';
|
||||
$a->strings['Warning: This group contains %s from an insecure network.'] = 'Warning: This group contains %s from an insecure network.';
|
||||
$a->strings['Private messages to this group are at risk of public disclosure.'] = 'Private messages to this group are at risk of public disclosure.';
|
||||
$a->strings['Please enter a YouTube link:'] = 'Please enter a YouTube link:';
|
||||
$a->strings["Please enter a video\x28.ogg\x29 link/URL:"] = "Please enter a video\x28.ogg\x29 link/URL:";
|
||||
$a->strings["Please enter an audio\x28.ogg\x29 link/URL:"] = "Please enter an audio\x28.ogg\x29 link/URL:";
|
||||
$a->strings['Where are you right now?'] = 'Where are you right now?';
|
||||
$a->strings['Enter a title for this item'] = 'Enter a title for this item';
|
||||
$a->strings['Share'] = 'Share';
|
||||
$a->strings['Set title'] = 'Set title';
|
||||
$a->strings['No such group'] = 'No such group';
|
||||
$a->strings['Group is empty'] = 'Group is empty';
|
||||
$a->strings['Group: '] = 'Group: ';
|
||||
|
@ -393,6 +388,8 @@ $a->strings['Deny'] = 'Deny';
|
|||
$a->strings['No registrations.'] = 'No registrations.';
|
||||
$a->strings['Post successful.'] = 'Post successful.';
|
||||
$a->strings['Login failed.'] = 'Login failed.';
|
||||
$a->strings["Welcome "] = "Welcome ";
|
||||
$a->strings['Please upload a profile photo.'] = 'Please upload a profile photo.';
|
||||
$a->strings["Welcome back "] = "Welcome back ";
|
||||
$a->strings['Photo Albums'] = 'Photo Albums';
|
||||
$a->strings['Contact Photos'] = 'Contact Photos';
|
||||
|
@ -427,6 +424,7 @@ $a->strings['Add a Tag'] = 'Add a Tag';
|
|||
$a->strings['Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping'] = 'Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping';
|
||||
$a->strings["I like this \x28toggle\x29"] = "I like this \x28toggle\x29";
|
||||
$a->strings["I don't like this \x28toggle\x29"] = "I don't like this \x28toggle\x29";
|
||||
$a->strings['Share'] = 'Share';
|
||||
$a->strings['This is you'] = 'This is you';
|
||||
$a->strings['Recent Photos'] = 'Recent Photos';
|
||||
$a->strings['Upload New Photos'] = 'Upload New Photos';
|
||||
|
@ -440,6 +438,7 @@ $a->strings['Upload File:'] = 'Upload File:';
|
|||
$a->strings['Upload Profile Photo'] = 'Upload Profile Photo';
|
||||
$a->strings['Upload'] = 'Upload';
|
||||
$a->strings['or'] = 'or';
|
||||
$a->strings['skip this step'] = 'skip this step';
|
||||
$a->strings['select a photo from your photo albums'] = 'select a photo from your photo albums';
|
||||
$a->strings['Crop Image'] = 'Crop Image';
|
||||
$a->strings['Please adjust the image cropping for optimum viewing.'] = 'Please adjust the image cropping for optimum viewing.';
|
||||
|
@ -633,6 +632,12 @@ $a->strings['and'] = 'and';
|
|||
$a->strings[', and %d other people'] = ', and %d other people';
|
||||
$a->strings['%s like this.'] = '%s like this.';
|
||||
$a->strings['%s don\'t like this.'] = '%s don\'t like this.';
|
||||
$a->strings['Please enter a YouTube link:'] = 'Please enter a YouTube link:';
|
||||
$a->strings["Please enter a video\x28.ogg\x29 link/URL:"] = "Please enter a video\x28.ogg\x29 link/URL:";
|
||||
$a->strings["Please enter an audio\x28.ogg\x29 link/URL:"] = "Please enter an audio\x28.ogg\x29 link/URL:";
|
||||
$a->strings['Where are you right now?'] = 'Where are you right now?';
|
||||
$a->strings['Enter a title for this item'] = 'Enter a title for this item';
|
||||
$a->strings['Set title'] = 'Set title';
|
||||
$a->strings['Miscellaneous'] = 'Miscellaneous';
|
||||
$a->strings['less than a second ago'] = 'less than a second ago';
|
||||
$a->strings['year'] = 'year';
|
||||
|
|
Loading…
Reference in a new issue