Elgg
Version 2.3
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
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_form
elgg_view_form($action, $form_vars=array(), $body_vars=array())
Definition:
views.php:1345
$vars
$vars['entity']
Definition:
plugin_settings.php:15
elgg_view_image_block
elgg_view_image_block($image, $body, $vars=array())
Wrapper function for the image block display pattern.
Definition:
views.php:1229
label
label
Definition:
admin.css.php:464
div
fieldset div
Definition:
admin.css.php:485
echo
elgg echo
Translates a string.
Definition:
languages.js:48
elgg_view
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition:
views.php:336
p
p
Definition:
admin.css.php:118
$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
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:22
$image
$image
Definition:
upload.php:37
Generated on Sat Dec 21 2024 00:01:03 for Elgg by
1.8.11