コード例 #1
0
ファイル: settings.php プロジェクト: rijojoy/MyIceBerg
    echo '<div>';
    $checked = $plugin->{$checkbox} ? 'checked' : false;
    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>';
// image library
echo '<h3>' . elgg_echo('tidypics:settings:heading:img_lib') . '</h3>';
echo '<div>';
echo elgg_echo('tidypics:settings:image_lib') . ': ';
echo elgg_view('input/dropdown', array('name' => 'params[image_lib]', 'options_values' => tidypics_get_image_libraries(), 'value' => $plugin->image_lib));
echo '</div>';
echo '<div>';
echo elgg_echo('tidypics:settings:im_path') . ' ';
echo elgg_view("input/text", array('name' => 'params[im_path]', 'value' => $plugin->im_path));
echo '</div>';
// river integration
echo '<h3>' . elgg_echo('tidypics:settings:heading:river') . '</h3>';
echo '<div>';
echo elgg_echo('tidypics:settings:img_river_view') . ': ';
echo elgg_view('input/dropdown', array('name' => 'params[img_river_view]', 'options_values' => array('all' => elgg_echo('tidypics:option:all'), 'batch' => '1', 'none' => elgg_echo('tidypics:option:none')), 'value' => $plugin->img_river_view));
echo '</div>';
echo '<div>';
echo elgg_echo('tidypics:settings:album_river_view') . ': ';
echo elgg_view('input/dropdown', array('name' => 'params[album_river_view]', 'options_values' => array('cover' => elgg_echo('tidypics:option:cover'), 'set' => elgg_echo('tidypics:option:set')), 'value' => $plugin->album_river_view));
echo '</div>';
コード例 #2
0
ファイル: main.php プロジェクト: juho-jaakkola/tidypics
<?php

/**
 * Primary settings for Elgg
 */
$plugin = $vars['plugin'];
$checkboxes = array('tagging', 'restrict_tagging', 'view_count', 'uploader', 'exif', 'download_link', 'slideshow');
foreach ($checkboxes as $checkbox) {
    echo '<div class="mbs">';
    echo elgg_view('input/checkbox', array('name' => "params[{$checkbox}]", 'value' => true, 'checked' => (bool) $plugin->{$checkbox}, 'label' => elgg_echo("tidypics:settings:{$checkbox}")));
    echo '</div>';
}
echo '<div class="mbs">';
echo elgg_echo('tidypics:settings:site_menu_link') . ': ';
echo elgg_view('input/select', array('name' => 'params[site_menu_link]', 'options_values' => tidypics_get_image_libraries(), 'options_values' => array('photos' => elgg_echo('tidypics:settings:site_menu_photos'), 'albums' => elgg_echo('tidypics:settings:site_menu_albums')), 'value' => $plugin->site_menu_link));
echo '</div>';
// max image size
echo '<div class="mbs">';
echo elgg_echo('tidypics:settings:maxfilesize');
echo elgg_view('input/text', array('name' => 'params[maxfilesize]', 'value' => $plugin->maxfilesize));
echo '</div>';
// Watermark Text
echo '<div class="mbs">' . 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 class="mbs">' . elgg_echo('tidypics:settings:quota');