content_access.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Advanced site settings, content access section.
  4. */
  5. $default_access_label = elgg_echo('installation:sitepermissions');
  6. $default_access_input = elgg_view('input/access', array(
  7. 'options_values' => array(
  8. ACCESS_PRIVATE => elgg_echo("PRIVATE"),
  9. ACCESS_FRIENDS => elgg_echo("access:friends:label"),
  10. ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"),
  11. ACCESS_PUBLIC => elgg_echo("PUBLIC"),
  12. ),
  13. 'name' => 'default_access',
  14. 'value' => elgg_get_config('default_access'),
  15. ));
  16. $user_default_access_input = elgg_view('input/checkbox', array(
  17. 'label' => elgg_echo('installation:allow_user_default_access:label'),
  18. 'name' => 'allow_user_default_access',
  19. 'checked' => (bool)elgg_get_config('allow_user_default_access'),
  20. ));
  21. ?>
  22. <fieldset class="elgg-fieldset" id="elgg-settings-advanced-content-access">
  23. <legend><?php echo elgg_echo('admin:legend:content_access'); ?></legend>
  24. <div>
  25. <label>
  26. <?php
  27. echo $default_access_label;
  28. echo $default_access_input;
  29. ?>
  30. </label>
  31. <p class="elgg-text-help"><?php echo elgg_echo('admin:site:access:warning'); ?></p>
  32. </div>
  33. <div>
  34. <?php echo $user_default_access_input; ?>
  35. <p class="elgg-text-help">
  36. <?php echo elgg_echo('installation:allow_user_default_access:description'); ?>
  37. </p>
  38. </div>
  39. </fieldset>