Elgg
Version 1.9
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
default
widgets
friends
edit.php
Go to the documentation of this file.
1
<?php
7
$num_display
=
sanitize_int
(
$vars
[
'entity'
]->num_display,
false
);
8
// set default value for display number
9
if
(!
$num_display
) {
10
$num_display
= 12;
11
}
12
13
$params
= array(
14
'name'
=>
'params[num_display]'
,
15
'value'
=>
$num_display
,
16
'options'
=> array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 50, 100),
17
);
18
$display_dropdown
=
elgg_view
(
'input/select'
,
$params
);
19
20
21
// handle upgrade to 1.7.2 from previous versions
22
if
(
$vars
[
'entity'
]->icon_size == 1) {
23
$vars
[
'entity'
]->icon_size =
'small'
;
24
} elseif (
$vars
[
'entity'
]->icon_size == 2) {
25
$vars
[
'entity'
]->icon_size =
'tiny'
;
26
}
27
28
// set default value for icon size
29
if
(!isset(
$vars
[
'entity'
]->icon_size)) {
30
$vars
[
'entity'
]->icon_size =
'small'
;
31
}
32
33
$params
= array(
34
'name'
=>
'params[icon_size]'
,
35
'value'
=>
$vars
[
'entity'
]->icon_size,
36
'options_values'
=> array(
37
'small'
=>
elgg_echo
(
'friends:small'
),
38
'tiny'
=>
elgg_echo
(
'friends:tiny'
),
39
),
40
);
41
$size_dropdown
=
elgg_view
(
'input/select'
,
$params
);
42
43
44
?>
45
<
p
>
46
<?php
echo
elgg_echo
(
'friends:num_display'
); ?>:
47
<?php
echo
$display_dropdown
; ?>
48
</
p
>
49
50
<
p
>
51
<?php
echo
elgg_echo
(
'friends:icon_size'
); ?>:
52
<?php
echo
$size_dropdown
; ?>
53
</
p
>
$num_display
$num_display
Banned users widget edit view.
Definition:
edit.php:6
$size_dropdown
$size_dropdown
Definition:
edit.php:41
p
p
Definition:
admin.php:118
elgg_echo
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition:
languages.php:21
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
$params
if(isset($entity->icontime)) $params
Definition:
edit.php:27
sanitize_int
sanitize_int($int, $signed=true)
Sanitizes an integer for database use.
Definition:
database.php:161
$display_dropdown
$display_dropdown
Definition:
edit.php:18
$vars
if(file_exists($welcome)) $vars
Definition:
upgrade.php:93
Generated on Sat Dec 21 2024 00:00:34 for Elgg by
1.8.11