diff options
author | cash <cash.costello@gmail.com> | 2010-07-04 20:06:24 +0000 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2010-07-04 20:06:24 +0000 |
commit | 83f54580699f2eda1be0c04f281120cb15e1c6f9 (patch) | |
tree | f781d2f1a451eca09aa94ea4a48657ee4e60c3e0 | |
parent | 25581d5c26fb630dad768c82395c73f0e4b8ccf8 (diff) | |
download | elgg-83f54580699f2eda1be0c04f281120cb15e1c6f9.tar.gz elgg-83f54580699f2eda1be0c04f281120cb15e1c6f9.tar.bz2 |
minor code clean-ups
-rw-r--r-- | languages/en.php | 1 | ||||
-rw-r--r-- | start.php | 3 | ||||
-rw-r--r-- | views/default/widgets/feed_reader/edit.php | 9 | ||||
-rw-r--r-- | views/default/widgets/feed_reader/view.php | 11 |
4 files changed, 18 insertions, 6 deletions
diff --git a/languages/en.php b/languages/en.php index e6c66b27f..07ff02905 100644 --- a/languages/en.php +++ b/languages/en.php @@ -9,6 +9,7 @@ $english = array( 'simplepie:num_items' => 'Number of items',
'simplepie:excerpt' => 'Include excerpt',
'simplepie:post_date' => 'Include post date',
+ 'simplepie:postedon' => 'Posted on',
);
add_translation("en", $english);
@@ -8,8 +8,7 @@ function simplepie_init() {
add_widget_type('feed_reader', elgg_echo('simplepie:widget'), elgg_echo('simplepie:description'));
-
- extend_view('css','feed_reader/css');
+ elgg_extend_view('css', 'feed_reader/css');
}
register_elgg_event_handler('plugins_boot', 'system', 'simplepie_init');
diff --git a/views/default/widgets/feed_reader/edit.php b/views/default/widgets/feed_reader/edit.php index 77355bfa4..a721f0e8a 100644 --- a/views/default/widgets/feed_reader/edit.php +++ b/views/default/widgets/feed_reader/edit.php @@ -41,7 +41,10 @@ <p> <?php -echo elgg_view('input/hidden', array('internalname' => 'params[excerpt]', 'js' => 'id="params[excerpt]"', 'value' => $excerpt )); +// used a hidden input field so that something is always sent unlike a checkbox +echo elgg_view('input/hidden', array('internalname' => 'params[excerpt]', + 'js' => 'id="params[excerpt]"', + 'value' => $excerpt )); echo "<input class='input-checkboxes' type='checkbox' value='' name='excerptcheckbox' onclick=\"document.getElementById('params[excerpt]').value = 1 - document.getElementById('params[excerpt]').value;\" "; if ($excerpt) { echo "checked='yes'"; @@ -53,7 +56,9 @@ echo ' ' . elgg_echo('simplepie:excerpt'); <p> <?php -echo elgg_view('input/hidden', array('internalname' => 'params[post_date]', 'js' => 'id="params[post_date]"', 'value' => $post_date )); +echo elgg_view('input/hidden', array('internalname' => 'params[post_date]', + 'js' => 'id="params[post_date]"', + 'value' => $post_date )); echo "<input class='input-checkboxes' type='checkbox' value='' name='post_datecheckbox' onclick=\"document.getElementById('params[post_date]').value = 1 - document.getElementById('params[post_date]').value;\" "; if ($post_date) { echo "checked='yes'"; diff --git a/views/default/widgets/feed_reader/view.php b/views/default/widgets/feed_reader/view.php index a8d589f98..329b2fb98 100644 --- a/views/default/widgets/feed_reader/view.php +++ b/views/default/widgets/feed_reader/view.php @@ -51,12 +51,19 @@ if ($feed_url) { </div> <?php if ($excerpt) { - echo '<div class="simplepie_excerpt">' . strip_tags($item->get_description(true), $allow_tags) . '</div>'; +?> + <div class="simplepie_excerpt"> + <?php echo strip_tags($item->get_description(true), $allow_tags); ?> + </div> +<?php } if ($post_date) { ?> - <div class="simplepie_date">Posted on <?php echo $item->get_date('j F Y | g:i a'); ?></div> + <div class="simplepie_date"> + <?php echo elgg_echo('simplepie:postedon'); ?> + <?php echo $item->get_date('j F Y | g:i a'); ?> + </div> <?php } ?> |