From 22afb49f30fc9bcd6be84f734e89a9b644f2fb0f Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 26 Nov 2011 14:08:38 -0500 Subject: updated widgets for 1.8 --- views/default/widgets/latest_photos/content.php | 15 +++++++++++++ views/default/widgets/latest_photos/edit.php | 29 +++++++++++++++---------- views/default/widgets/latest_photos/view.php | 16 -------------- 3 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 views/default/widgets/latest_photos/content.php delete mode 100644 views/default/widgets/latest_photos/view.php (limited to 'views/default/widgets/latest_photos') diff --git a/views/default/widgets/latest_photos/content.php b/views/default/widgets/latest_photos/content.php new file mode 100644 index 000000000..ecd72aec4 --- /dev/null +++ b/views/default/widgets/latest_photos/content.php @@ -0,0 +1,15 @@ + '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/views/default/widgets/latest_photos/edit.php b/views/default/widgets/latest_photos/edit.php index 06693648d..ac870c9f8 100644 --- a/views/default/widgets/latest_photos/edit.php +++ b/views/default/widgets/latest_photos/edit.php @@ -1,17 +1,22 @@ -

-num_display == '') { +// 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); + ?> - -

\ No newline at end of file +
+ : + +
diff --git a/views/default/widgets/latest_photos/view.php b/views/default/widgets/latest_photos/view.php deleted file mode 100644 index 108d070c9..000000000 --- a/views/default/widgets/latest_photos/view.php +++ /dev/null @@ -1,16 +0,0 @@ -
-num_display; -//if no number has been set, default to 6 -if (!$number) { - $number = 6; -} - -echo '
'; -echo tp_get_latest_photos($number, page_owner(), 'widget'); -echo '
'; - -?> -
\ No newline at end of file -- cgit v1.2.3