diff options
Diffstat (limited to 'views/default/widgets')
-rw-r--r-- | views/default/widgets/album_view/edit.php | 11 | ||||
-rw-r--r-- | views/default/widgets/album_view/view.php | 13 | ||||
-rw-r--r-- | views/default/widgets/latest_photos/edit.php | 8 | ||||
-rw-r--r-- | views/default/widgets/latest_photos/view.php | 17 |
4 files changed, 27 insertions, 22 deletions
diff --git a/views/default/widgets/album_view/edit.php b/views/default/widgets/album_view/edit.php index 992699cb0..9068ffe17 100644 --- a/views/default/widgets/album_view/edit.php +++ b/views/default/widgets/album_view/edit.php @@ -1,11 +1,12 @@ <p> <?php - echo elgg_echo("tidypics:widget:num_albums") . ": "; - - - if($vars['entity']->num_display == '') $vars['entity']->num_display = 5; - +echo elgg_echo("tidypics:widget:num_albums") . ": "; + + +if ($vars['entity']->num_display == '') { + $vars['entity']->num_display = 5; +} ?> <select name="params[num_display]"> <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option> diff --git a/views/default/widgets/album_view/view.php b/views/default/widgets/album_view/view.php index b4248df35..1b980aa8b 100644 --- a/views/default/widgets/album_view/view.php +++ b/views/default/widgets/album_view/view.php @@ -1,13 +1,14 @@ <div class="contentWrapper"> <?php - //the number of files to display - $number = (int) $vars['entity']->num_display; - //if no number has been set, default to 5 - if (!$number) - $number = 5; +//the number of files to display +$number = (int) $vars['entity']->num_display; +//if no number has been set, default to 5 +if (!$number) { + $number = 5; +} - echo elgg_view('tidypics/albums', array('num_albums' => $number)); +echo elgg_view('tidypics/albums', array('num_albums' => $number)); ?> </div>
\ No newline at end of file diff --git a/views/default/widgets/latest_photos/edit.php b/views/default/widgets/latest_photos/edit.php index 3b334d722..06693648d 100644 --- a/views/default/widgets/latest_photos/edit.php +++ b/views/default/widgets/latest_photos/edit.php @@ -1,9 +1,11 @@ <p> <?php - echo elgg_echo("tidypics:widget:num_latest") . ": "; +echo elgg_echo("tidypics:widget:num_latest") . ": "; + +if ($vars['entity']->num_display == '') { + $vars['entity']->num_display = 6; +} - if($vars['entity']->num_display == '') $vars['entity']->num_display = 6; - ?> <select name="params[num_display]"> <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option> diff --git a/views/default/widgets/latest_photos/view.php b/views/default/widgets/latest_photos/view.php index 0c3193907..d6bc4a0df 100644 --- a/views/default/widgets/latest_photos/view.php +++ b/views/default/widgets/latest_photos/view.php @@ -1,15 +1,16 @@ <div class="contentWrapper"> <?php - //the number of files to display - $number = (int) $vars['entity']->num_display; - //if no number has been set, default to 6 - if (!$number) - $number = 6; +//the number of files to display +$number = (int) $vars['entity']->num_display; +//if no number has been set, default to 6 +if (!$number) { + $number = 6; +} - echo '<div class="tidypics_widget_latest">'; - echo tp_get_latest_photos($number, page_owner()); - echo '</div>'; +echo '<div class="tidypics_widget_latest">'; +echo tp_get_latest_photos($number, page_owner()); +echo '</div>'; ?> </div>
\ No newline at end of file |