form cleanup (profile_photo and cover_photo), admin 'user_approve' not found, missing close div in mood_content.tpl
This commit is contained in:
parent
dd2d12350c
commit
4f285911f0
@ -5306,3 +5306,57 @@ function asencode_person($p) {
|
|||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function send_profile_photo_activity($channel,$photo,$profile) {
|
||||||
|
|
||||||
|
// for now only create activities for the default profile
|
||||||
|
|
||||||
|
if(! intval($profile['is_default']))
|
||||||
|
return;
|
||||||
|
|
||||||
|
$arr = array();
|
||||||
|
$arr['item_thread_top'] = 1;
|
||||||
|
$arr['item_origin'] = 1;
|
||||||
|
$arr['item_wall'] = 1;
|
||||||
|
$arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
|
||||||
|
$arr['verb'] = ACTIVITY_UPDATE;
|
||||||
|
|
||||||
|
$arr['object'] = json_encode(array(
|
||||||
|
'type' => $arr['obj_type'],
|
||||||
|
'id' => z_root() . '/photo/profile/l/' . $channel['channel_id'],
|
||||||
|
'link' => array('rel' => 'photo', 'type' => $photo['type'], 'href' => z_root() . '/photo/profile/l/' . $channel['channel_id'])
|
||||||
|
));
|
||||||
|
|
||||||
|
if(stripos($profile['gender'],t('female')) !== false)
|
||||||
|
$t = t('%1$s updated her %2$s');
|
||||||
|
elseif(stripos($profile['gender'],t('male')) !== false)
|
||||||
|
$t = t('%1$s updated his %2$s');
|
||||||
|
else
|
||||||
|
$t = t('%1$s updated their %2$s');
|
||||||
|
|
||||||
|
$ptext = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo['resource_id'] . ']' . t('profile photo') . '[/zrl]';
|
||||||
|
|
||||||
|
$ltext = '[zrl=' . z_root() . '/profile/' . $channel['channel_address'] . ']' . '[zmg=150x150]' . z_root() . '/photo/' . $photo['resource_id'] . '-4[/zmg][/zrl]';
|
||||||
|
|
||||||
|
$arr['body'] = sprintf($t,$channel['channel_name'],$ptext) . "\n\n" . $ltext;
|
||||||
|
|
||||||
|
$acl = new AccessList($channel);
|
||||||
|
$x = $acl->get();
|
||||||
|
$arr['allow_cid'] = $x['allow_cid'];
|
||||||
|
|
||||||
|
$arr['allow_gid'] = $x['allow_gid'];
|
||||||
|
$arr['deny_cid'] = $x['deny_cid'];
|
||||||
|
$arr['deny_gid'] = $x['deny_gid'];
|
||||||
|
|
||||||
|
$arr['uid'] = $channel['channel_id'];
|
||||||
|
$arr['aid'] = $channel['channel_account_id'];
|
||||||
|
|
||||||
|
$arr['owner_xchan'] = $channel['channel_hash'];
|
||||||
|
$arr['author_xchan'] = $channel['channel_hash'];
|
||||||
|
|
||||||
|
post_activity_item($arr);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('include/queue_fn.php');
|
require_once('include/queue_fn.php');
|
||||||
|
require_once('include/account.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param App &$a
|
* @param App &$a
|
||||||
@ -861,13 +861,13 @@ function admin_page_users_post($a) {
|
|||||||
// registration approved button was submitted
|
// registration approved button was submitted
|
||||||
if (x($_POST, 'page_users_approve')) {
|
if (x($_POST, 'page_users_approve')) {
|
||||||
foreach ($pending as $hash) {
|
foreach ($pending as $hash) {
|
||||||
user_allow($hash);
|
account_allow($hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// registration deny button was submitted
|
// registration deny button was submitted
|
||||||
if (x($_POST, 'page_users_deny')) {
|
if (x($_POST, 'page_users_deny')) {
|
||||||
foreach ($pending as $hash) {
|
foreach ($pending as $hash) {
|
||||||
user_deny($hash);
|
account_deny($hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -274,58 +274,6 @@ function profile_photo_post(&$a) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function send_profile_photo_activity($channel,$photo,$profile) {
|
|
||||||
|
|
||||||
// for now only create activities for the default profile
|
|
||||||
|
|
||||||
if(! intval($profile['is_default']))
|
|
||||||
return;
|
|
||||||
|
|
||||||
$arr = array();
|
|
||||||
$arr['item_thread_top'] = 1;
|
|
||||||
$arr['item_origin'] = 1;
|
|
||||||
$arr['item_wall'] = 1;
|
|
||||||
$arr['obj_type'] = ACTIVITY_OBJ_PHOTO;
|
|
||||||
$arr['verb'] = ACTIVITY_UPDATE;
|
|
||||||
|
|
||||||
$arr['object'] = json_encode(array(
|
|
||||||
'type' => $arr['obj_type'],
|
|
||||||
'id' => z_root() . '/photo/profile/l/' . $channel['channel_id'],
|
|
||||||
'link' => array('rel' => 'photo', 'type' => $photo['type'], 'href' => z_root() . '/photo/profile/l/' . $channel['channel_id'])
|
|
||||||
));
|
|
||||||
|
|
||||||
if(stripos($profile['gender'],t('female')) !== false)
|
|
||||||
$t = t('%1$s updated her %2$s');
|
|
||||||
elseif(stripos($profile['gender'],t('male')) !== false)
|
|
||||||
$t = t('%1$s updated his %2$s');
|
|
||||||
else
|
|
||||||
$t = t('%1$s updated their %2$s');
|
|
||||||
|
|
||||||
$ptext = '[zrl=' . z_root() . '/photos/' . $channel['channel_address'] . '/image/' . $photo['resource_id'] . ']' . t('profile photo') . '[/zrl]';
|
|
||||||
|
|
||||||
$ltext = '[zrl=' . z_root() . '/profile/' . $channel['channel_address'] . ']' . '[zmg=150x150]' . z_root() . '/photo/' . $photo['resource_id'] . '-4[/zmg][/zrl]';
|
|
||||||
|
|
||||||
$arr['body'] = sprintf($t,$channel['channel_name'],$ptext) . "\n\n" . $ltext;
|
|
||||||
|
|
||||||
$acl = new AccessList($channel);
|
|
||||||
$x = $acl->get();
|
|
||||||
$arr['allow_cid'] = $x['allow_cid'];
|
|
||||||
|
|
||||||
$arr['allow_gid'] = $x['allow_gid'];
|
|
||||||
$arr['deny_cid'] = $x['deny_cid'];
|
|
||||||
$arr['deny_gid'] = $x['deny_gid'];
|
|
||||||
|
|
||||||
$arr['uid'] = $channel['channel_id'];
|
|
||||||
$arr['aid'] = $channel['channel_account_id'];
|
|
||||||
|
|
||||||
$arr['owner_xchan'] = $channel['channel_hash'];
|
|
||||||
$arr['author_xchan'] = $channel['channel_hash'];
|
|
||||||
|
|
||||||
post_activity_item($arr);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* @brief Generate content of profile-photo view
|
/* @brief Generate content of profile-photo view
|
||||||
*
|
*
|
||||||
@ -452,6 +400,8 @@ function profile_photo_content(&$a) {
|
|||||||
'$title' => t('Upload Profile Photo'),
|
'$title' => t('Upload Profile Photo'),
|
||||||
'$submit' => t('Upload'),
|
'$submit' => t('Upload'),
|
||||||
'$profiles' => $profiles,
|
'$profiles' => $profiles,
|
||||||
|
'$single' => ((count($profiles) == 1) ? true : false),
|
||||||
|
'$profile0' => $profiles[0],
|
||||||
'$form_security_token' => get_form_security_token("profile_photo"),
|
'$form_security_token' => get_form_security_token("profile_photo"),
|
||||||
// FIXME - yuk
|
// FIXME - yuk
|
||||||
'$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->channel['channel_address'] . '">' . 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->channel['channel_address'] . '">' . t('select a photo from your photo albums') . '</a>')
|
||||||
|
@ -1 +1 @@
|
|||||||
2016-02-12.1307H
|
2016-02-14.1309H
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<div class="generic-content-wrapper-styled">
|
<div id="profile-photo-content" class="generic-content-wrapper">
|
||||||
<h1>{{$title}}</h1>
|
<div class="section-title-wrapper">
|
||||||
|
<h2>{{$title}}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section-content-wrapper">
|
||||||
|
|
||||||
<form enctype="multipart/form-data" action="cover_photo" method="post">
|
<form enctype="multipart/form-data" action="cover_photo" method="post">
|
||||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||||
@ -9,15 +12,18 @@
|
|||||||
<label id="profile-photo-upload-label" class="form-label" for="profile-photo-upload">{{$lbl_upfile}}</label>
|
<label id="profile-photo-upload-label" class="form-label" for="profile-photo-upload">{{$lbl_upfile}}</label>
|
||||||
<input name="userfile" class="form-input" type="file" id="profile-photo-upload" size="48" />
|
<input name="userfile" class="form-input" type="file" id="profile-photo-upload" size="48" />
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
<div id="profile-photo-submit-wrapper">
|
<div id="profile-photo-submit-wrapper">
|
||||||
<input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}">
|
<input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
<div id="profile-photo-link-select-wrapper">
|
<div id="profile-photo-link-select-wrapper">
|
||||||
{{$select}}
|
{{$select}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<input type="submit" name="submit" value="{{$submit}}" />
|
<input type="submit" name="submit" value="{{$submit}}" />
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<div class="generic-content-wrapper-styled">
|
<div id="profile-photo-content" class="generic-content-wrapper">
|
||||||
<h1>{{$title}}</h1>
|
<div class="section-title-wrapper">
|
||||||
|
<h2>{{$title}}</h2>
|
||||||
|
</div>
|
||||||
|
<div class="section-content-wrapper">
|
||||||
|
|
||||||
<form enctype="multipart/form-data" action="profile_photo" method="post">
|
<form enctype="multipart/form-data" action="profile_photo" method="post">
|
||||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||||
@ -10,13 +13,20 @@
|
|||||||
<input name="userfile" class="form-input" type="file" id="profile-photo-upload" size="48" />
|
<input name="userfile" class="form-input" type="file" id="profile-photo-upload" size="48" />
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
{{if $single}}
|
||||||
|
<input type="hidden" name="profile" value="{{$profile0.id}}" />
|
||||||
|
{{else}}
|
||||||
|
|
||||||
<label id="profile-photo-profiles-label" class="form-label" for="profile-photo-profiles">{{$lbl_profiles}}</label>
|
<label id="profile-photo-profiles-label" class="form-label" for="profile-photo-profiles">{{$lbl_profiles}}</label>
|
||||||
<select name="profile" id="profile-photo-profiles" class="form-input" >
|
<select name="profile" id="profile-photo-profiles" class="form-control" >
|
||||||
{{foreach $profiles as $p}}
|
{{foreach $profiles as $p}}
|
||||||
<option value="{{$p.id}}" {{if $p.is_default}}selected="selected"{{/if}}>{{$p.name}}</option>
|
<option value="{{$p.id}}" {{if $p.is_default}}selected="selected"{{/if}}>{{$p.name}}</option>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</select>
|
</select>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div id="profile-photo-submit-wrapper">
|
<div id="profile-photo-submit-wrapper">
|
||||||
<input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}">
|
<input type="submit" name="submit" id="profile-photo-submit" value="{{$submit}}">
|
||||||
@ -24,8 +34,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
<div id="profile-photo-link-select-wrapper">
|
<div id="profile-photo-link-select-wrapper">
|
||||||
{{$select}}
|
{{$select}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
Reference in New Issue
Block a user