1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
<?php
/**
* Primary settings for Elgg
*/
$plugin = $vars['plugin'];
$checkboxes = array('tagging', 'view_count', 'exif', 'download_link');
foreach ($checkboxes as $checkbox) {
echo '<div>';
echo elgg_view('input/checkbox', array(
'name' => "params[$checkbox]",
'value' => true,
'checked' => (bool)$plugin->$checkbox,
));
echo ' ' . elgg_echo("tidypics:settings:$checkbox");
echo '</div>';
}
// max image size
echo '<div>';
echo elgg_echo('tidypics:settings:maxfilesize');
echo elgg_view('input/text', array(
'name' => 'params[maxfilesize]',
'value' => $plugin->maxfilesize,
));
echo '</div>';
// Watermark Text
echo '<div>' . elgg_echo('tidypics:settings:watermark');
echo elgg_view("input/text", array(
'name' => 'params[watermark_text]',
'value' => $plugin->watermark_text,
));
echo '</div>';
// Quota Size
$quota = $plugin->quota;
if (!$quota) {
$quota = 0;
}
echo '<div>' . elgg_echo('tidypics:settings:quota');
echo elgg_view('input/text', array(
'name' => 'params[quota]',
'value' => $quota,
));
echo '</div>';
|