aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-17 17:08:14 -0700
committerfriendica <info@friendica.com>2012-07-17 17:08:14 -0700
commita10e9d335ab68989a0e6e40af8ae03e5dabd27a7 (patch)
treed28f8ab8f1b7d85719f612605875906868616beb /mod
parent073eb1b8455fe93e49a95125cb23c8d8accb96e2 (diff)
downloadvolse-hubzilla-a10e9d335ab68989a0e6e40af8ae03e5dabd27a7.tar.gz
volse-hubzilla-a10e9d335ab68989a0e6e40af8ae03e5dabd27a7.tar.bz2
volse-hubzilla-a10e9d335ab68989a0e6e40af8ae03e5dabd27a7.zip
front end for alternate profile photos
Diffstat (limited to 'mod')
-rw-r--r--mod/profile_photo.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index efa8be57e..a60a6d73c 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -227,6 +227,11 @@ function profile_photo_content(&$a) {
// go ahead as we have jus uploaded a new photo to crop
}
+ $profiles = q("select `id`,`profile-name` as `name`,`is-default` as `default` from profile where uid = %d",
+ intval(local_user())
+ );
+
+
if(! x($a->config,'imagecrop')) {
$tpl = get_markup_template('profile_photo.tpl');
@@ -234,8 +239,10 @@ function profile_photo_content(&$a) {
$o .= replace_macros($tpl,array(
'$user' => $a->user['nickname'],
'$lbl_upfile' => t('Upload File:'),
+ '$lbl_profiles' => t('Select a profile:'),
'$title' => t('Upload Profile Photo'),
'$submit' => t('Upload'),
+ '$profiles' => $profiles,
'$form_security_token' => get_form_security_token("profile_photo"),
'$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>')
));
@@ -248,6 +255,7 @@ function profile_photo_content(&$a) {
$tpl = get_markup_template("cropbody.tpl");
$o .= replace_macros($tpl,array(
'$filename' => $filename,
+ '$profile' => intval($_REQUEST['profile']),
'$resource' => $a->config['imagecrop'] . '-' . $a->config['imagecrop_resolution'],
'$image_url' => $a->get_baseurl() . '/photo/' . $filename,
'$title' => t('Crop Image'),
@@ -262,7 +270,7 @@ function profile_photo_content(&$a) {
}}
-if(! function_exists('_crop_ui_head')) {
+if(! function_exists('profile_photo_crop_ui_head')) {
function profile_photo_crop_ui_head(&$a, $ph){
$max_length = get_config('system','max_image_length');
if(! $max_length)