diff options
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> |