start.php 566 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * Elgg demo custom index page plugin
  4. *
  5. */
  6. elgg_register_event_handler('init', 'system', 'custom_index_hydra_init');
  7. function custom_index_hydra_init() {
  8. // Extend system CSS with our own styles
  9. elgg_extend_view('css/elgg', 'custom_index_hydra/css');
  10. // Replace the default index page
  11. elgg_register_page_handler('', 'custom_index_hydra');
  12. }
  13. /**
  14. * Serve the front page
  15. *
  16. * @return bool Whether the page was sent.
  17. */
  18. function custom_index_hydra() {
  19. if (!include_once(dirname(__FILE__) . "/index.php")) {
  20. return false;
  21. }
  22. return true;
  23. }