Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
core
avatar
upload.php
Go to the documentation of this file.
1
<?php
8
$user_avatar
=
elgg_view
(
'output/img'
, array(
9
'src'
=>
$vars
[
'entity'
]->getIconUrl(
'medium'
),
10
'alt'
=>
elgg_echo
(
'avatar'
),
11
));
12
13
$current_label
=
elgg_echo
(
'avatar:current'
);
14
15
$remove_button
=
''
;
16
if
(
$vars
[
'entity'
]->
icontime
) {
17
$remove_button
=
elgg_view
(
'output/url'
, array(
18
'text'
=>
elgg_echo
(
'remove'
),
19
'title'
=>
elgg_echo
(
'avatar:remove'
),
20
'href'
=>
'action/avatar/remove?guid='
.
elgg_get_page_owner_guid
(),
21
'is_action'
=>
true
,
22
'class'
=>
'elgg-button elgg-button-cancel mll'
,
23
));
24
}
25
26
$form_params
= array(
'enctype'
=>
'multipart/form-data'
);
27
$upload_form
=
elgg_view_form
(
'avatar/upload'
,
$form_params
,
$vars
);
28
29
?>
30
31
<
p
class
=
"mtm"
>
32
<?php
echo
elgg_echo
(
'avatar:upload:instructions'
); ?>
33
</
p
>
34
35
<?php
36
37
$image
= <<<HTML
38
<
div
id
=
"current-user-avatar"
class
=
"mrl prl"
>
39
<
label
>
$current_label
</
label
><br />
40
$user_avatar
41
</
div
>
42
$remove_button
43
HTML;
44
45
$body
= <<<HTML
46
<
div
id
=
"avatar-upload"
>
47
$upload_form
48
</
div
>
49
HTML;
50
51
echo
elgg_view_image_block
(
$image
,
$upload_form
);
$current_label
$current_label
Definition:
upload.php:13
$body
$body
Definition:
upload.php:45
p
p
Definition:
admin.php:118
div
fieldset div
Definition:
admin.php:462
elgg_echo
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition:
languages.php:21
elgg_view_image_block
elgg_view_image_block($image, $body, $vars=array())
Wrapper function for the image block display pattern.
Definition:
views.php:1176
echo
elgg echo
Translates a string.
Definition:
languages.js:43
elgg_view
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:354
$user_avatar
$user_avatar
Avatar upload view.
Definition:
upload.php:8
$upload_form
$upload_form
Definition:
upload.php:27
$remove_button
$remove_button
Definition:
upload.php:15
$form_params
if($vars['entity']->icontime) $form_params
Definition:
upload.php:26
icontime
$owner icontime
Definition:
upload.php:54
label
label
Definition:
admin.php:452
elgg_view_form
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition:
views.php:1280
elgg_get_page_owner_guid
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
Definition:
pageowner.php:18
$vars
if(file_exists($welcome)) $vars
Definition:
upgrade.php:93
$image
$image
Definition:
upload.php:37
Generated on Wed Oct 16 2024 00:00:42 for Elgg by
1.8.11