diff options
author | Sem <sembrestels@riseup.net> | 2013-11-09 16:22:50 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2013-11-09 16:22:50 +0100 |
commit | f448cd91f9ecebea37daf40aada2fa1a20200817 (patch) | |
tree | 4636059da6a1be133a4974e5098b7c1e08944dd5 /mod/lightpics/views/default/widgets | |
parent | 52335325e5ea8c89c711e1ba40d9ac1657004e61 (diff) | |
parent | 324f39c3a9aa41e9e23bafba38882a2b72f62441 (diff) | |
download | elgg-f448cd91f9ecebea37daf40aada2fa1a20200817.tar.gz elgg-f448cd91f9ecebea37daf40aada2fa1a20200817.tar.bz2 |
Add 'mod/lightpics/' from commit '324f39c3a9aa41e9e23bafba38882a2b72f62441'
git-subtree-dir: mod/lightpics
git-subtree-mainline: 52335325e5ea8c89c711e1ba40d9ac1657004e61
git-subtree-split: 324f39c3a9aa41e9e23bafba38882a2b72f62441
Diffstat (limited to 'mod/lightpics/views/default/widgets')
4 files changed, 85 insertions, 0 deletions
diff --git a/mod/lightpics/views/default/widgets/album_view/content.php b/mod/lightpics/views/default/widgets/album_view/content.php new file mode 100644 index 000000000..88c8837b3 --- /dev/null +++ b/mod/lightpics/views/default/widgets/album_view/content.php @@ -0,0 +1,17 @@ +<?php +/** + * List albums in a widget + * + * @author Cash Costello + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 + */ + +$options = array( + 'type' => 'object', + 'subtype' => 'album', + 'container_guid' => elgg_get_page_owner_guid(), + 'limit' => $vars['entity']->num_display, + 'full_view' => false, + 'pagination' => false, +); +echo elgg_list_entities($options); diff --git a/mod/lightpics/views/default/widgets/album_view/edit.php b/mod/lightpics/views/default/widgets/album_view/edit.php new file mode 100644 index 000000000..873fcc3eb --- /dev/null +++ b/mod/lightpics/views/default/widgets/album_view/edit.php @@ -0,0 +1,25 @@ +<?php +/** + * Widget settings for newest albums + * + * @author Cash Costello + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 + */ + +// set default value +if (!isset($vars['entity']->num_display)) { + $vars['entity']->num_display = 5; +} + +$params = array( + 'name' => 'params[num_display]', + 'value' => $vars['entity']->num_display, + 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20), +); +$dropdown = elgg_view('input/dropdown', $params); + +?> +<div> + <?php echo elgg_echo('tidypics:widget:num_albums'); ?>: + <?php echo $dropdown; ?> +</div> diff --git a/mod/lightpics/views/default/widgets/latest_photos/content.php b/mod/lightpics/views/default/widgets/latest_photos/content.php new file mode 100644 index 000000000..8a3bb4891 --- /dev/null +++ b/mod/lightpics/views/default/widgets/latest_photos/content.php @@ -0,0 +1,18 @@ +<?php +/** + * Display the latest photos uploaded by an individual + * + * @author Cash Costello + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 + */ + +echo elgg_list_entities(array( + 'type' => 'object', + 'subtype' => 'image', + 'limit' => $vars['entity']->num_display, + 'owner_guid' => elgg_get_page_owner_guid(), + 'full_view' => false, + 'list_type' => 'gallery', + 'list_type_toggle' => false, + 'gallery_class' => 'tidypics-gallery-widget', +)); diff --git a/mod/lightpics/views/default/widgets/latest_photos/edit.php b/mod/lightpics/views/default/widgets/latest_photos/edit.php new file mode 100644 index 000000000..dd32e2b6d --- /dev/null +++ b/mod/lightpics/views/default/widgets/latest_photos/edit.php @@ -0,0 +1,25 @@ +<?php +/** + * Widget settings for latest photos + * + * @author Cash Costello + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2 + */ + +// set default value +if (!isset($vars['entity']->num_display)) { + $vars['entity']->num_display = 6; +} + +$params = array( + 'name' => 'params[num_display]', + 'value' => $vars['entity']->num_display, + 'options' => array(3, 6, 9, 12), +); +$dropdown = elgg_view('input/dropdown', $params); + +?> +<div> + <?php echo elgg_echo('tidypics:widget:num_latest'); ?>: + <?php echo $dropdown; ?> +</div> |