edit.php 819 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * widget settings for the discussions widget
  4. */
  5. $widget = $vars["entity"];
  6. $discussion_count = sanitise_int($widget->discussion_count, false);
  7. if (empty($discussion_count)) {
  8. $discussion_count = 5;
  9. }
  10. if (elgg_in_context("dashboard")) {
  11. $noyes_options = array(
  12. "no" => elgg_echo("option:no"),
  13. "yes" => elgg_echo("option:yes")
  14. );
  15. echo "<div>";
  16. echo elgg_echo("widgets:discussion:settings:group_only");
  17. echo "&nbsp;" . elgg_view("input/dropdown", array("name" => "params[group_only]", "value" => $widget->group_only, "options_values" => $noyes_options));
  18. echo "</div>";
  19. }
  20. echo "<div>";
  21. echo elgg_echo("widget:numbertodisplay");
  22. echo "&nbsp;" . elgg_view("input/dropdown", array("name" => "params[discussion_count]", "value" => $discussion_count, "options" => range(1, 10)));
  23. echo "</div>";