diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-12-29 20:45:58 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-12-29 20:45:58 -0200 |
commit | 97e689213ff4e829f251af526ed4e796a3cc2b71 (patch) | |
tree | b04d03ec56305041216b72328fc9b5afde27bc76 /mod/simplepie/views/default/widgets/feed_reader/edit.php | |
parent | 0ab6351abb7a602d96c62b0ad35413c88113a6cf (diff) | |
parent | 69e2d8c5d8732042c9319aef1fdea45a82b63e42 (diff) | |
download | elgg-97e689213ff4e829f251af526ed4e796a3cc2b71.tar.gz elgg-97e689213ff4e829f251af526ed4e796a3cc2b71.tar.bz2 |
Merge branch 'master' into saravea
Conflicts:
.gitmodules
mod/admins
mod/assemblies
mod/audio_html5
mod/beechat
mod/crud
mod/elgg-activitystreams
mod/elggman
mod/elggpg
mod/favorites
mod/federated-objects
mod/friendly_time
mod/group_alias
mod/group_operators
mod/languages
mod/lightpics
mod/openid_client
mod/spotlight
mod/suicide
mod/tasks
mod/videolist
Diffstat (limited to 'mod/simplepie/views/default/widgets/feed_reader/edit.php')
-rw-r--r-- | mod/simplepie/views/default/widgets/feed_reader/edit.php | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/mod/simplepie/views/default/widgets/feed_reader/edit.php b/mod/simplepie/views/default/widgets/feed_reader/edit.php new file mode 100644 index 000000000..83218dcbb --- /dev/null +++ b/mod/simplepie/views/default/widgets/feed_reader/edit.php @@ -0,0 +1,62 @@ +<?php +/** + * Simplepie feed reader widget settings + */ + +// set default value +if (!isset($vars['entity']->num_items)) { + $vars['entity']->num_items = 10; +} + +if (!isset($vars['entity']->excerpt)) { + $vars['entity']->excerpt = false; +} + +if (!isset($vars['entity']->post_date)) { + $vars['entity']->post_date = false; +} + +$url_label = elgg_echo("simplepie:feed_url"); +$url_textbox = elgg_view('input/text', array( + 'name' => 'params[feed_url]', + 'value' => $vars['entity']->feed_url, + 'onclick' => 'this.select();', +)); + +$num_items_label = elgg_echo('simplepie:num_items'); +$num_items_select = elgg_view('input/dropdown', array( + 'name' => 'params[num_items]', + 'value' => $vars['entity']->num_items, + 'options' => array(3, 5, 8, 10, 12, 15, 20), +)); + +$excerpt_label = elgg_echo('simplepie:excerpt'); +$excerpt_checkbox = elgg_view('input/checkbox', array( + 'name' => 'params[excerpt]', + 'value' => true, + 'checked' => $vars['entity']->excerpt ? 'checked' : '', +)); + +$post_date_label = elgg_echo('simplepie:post_date'); +$post_date_checkbox = elgg_view('input/checkbox', array( + 'name' => 'params[post_date]', + 'value' => true, + 'checked' => $vars['entity']->post_date ? 'checked' : '', +)); + +echo <<<HTML +<div> + $url_label + $url_textbox +</div> +<div> + $num_items_label + $num_items_select +</div> +<div> + $excerpt_checkbox $excerpt_label +</div> +<div> + $post_date_checkbox $post_date_label +</div> +HTML; |