start.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Modbash Clean Elgg Theme
  4. *
  5. * Copyright (c) 2015 ModBash
  6. *
  7. * @author Shane Barron <admin@modbash.com>
  8. * @copyright 2015 SocialApparatus
  9. * @license GNU General Public License (GPL) version 2
  10. * @version 1
  11. * @link http://modbash.com
  12. */
  13. elgg_register_event_handler('init', 'system', 'hydra_theme_init');
  14. function hydra_theme_init() {
  15. elgg_unextend_view('page/elements/header', 'search/header');
  16. elgg_extend_view('page/elements/sidebar', 'search/header', 0);
  17. if (elgg_get_context() != "admin") {
  18. elgg_require_js("lorea_hydra/js");
  19. }
  20. $bower = elgg_get_site_url() . "mod/lorea_hydra/vendors/bower_components/";
  21. elgg_register_css("bootstrap", "{$bower}bootstrap/dist/css/bootstrap.css", 0);
  22. elgg_register_css("bootstrap-select", "{$bower}bootstrap-select/dist/css/bootstrap-select.min.css");
  23. elgg_register_css("jasny", "{$bower}jasny-bootstrap/dist/css/jasny-bootstrap.min.css");
  24. elgg_register_css("lorea_hydra", elgg_get_site_url() . "mod/hydra_theme/css/lorea_hydra.css", 10000);
  25. elgg_define_js("bootstrap", array("src" => "{$bower}bootstrap/dist/js/bootstrap.min.js"));
  26. //elgg_register_js("bootstrap", "{$bower}bootstrap/dist/js/bootstrap.min.js");
  27. elgg_register_js("bootstrap-select", "{$bower}bootstrap-select/dist/js/bootstrap-select.min.js");
  28. elgg_register_js("jasny", "{$bower}jasny-bootstrap/dist/js/jasny-bootstrap.min.js");
  29. elgg_register_js("lorea_hydra", elgg_get_site_url() . "mod/hydra_theme/css/lorea_hydra.css", 10000);
  30. if (elgg_get_context() != "admin") {
  31. elgg_load_css("bootstrap");
  32. elgg_load_css("bootstrap-select");
  33. elgg_load_css("lorea_hydra");
  34. elgg_load_css("jasny");
  35. elgg_load_js("bootstrap");
  36. elgg_load_js("jasny");
  37. elgg_load_js("bootstrap-select");
  38. elgg_load_js("lorea_hydra");
  39. }
  40. }