cis_service_icor.module

  1. cis7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
  2. cle7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
  3. ecd7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
  4. elmsmedia7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
  5. harmony7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
  6. icor7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
  7. meedjum_blog7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
  8. mooc7 sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module

Code for the CIS Service ICOR feature.

Functions

Namesort descending Description
cis_service_icor_custom_theme Implements hook_custom_theme().
cis_service_icor_init Implements hook_init().
cis_service_icor_wysiwyg_include_directory Implements hook_wywiwyg_plugin().
cis_service_icor_wysiwyg_plugin Implements hook_wywiwyg_plugin().

File

sites/all/modules/elmsln_contrib/cis_connector/instance_data/cis_service_icor/cis_service_icor.module
View source
  1. <?php
  2. /**
  3. * @file
  4. * Code for the CIS Service ICOR feature.
  5. */
  6. include_once 'cis_service_icor.features.inc';
  7. /**
  8. * Implements hook_init().
  9. */
  10. function cis_service_icor_init() {
  11. // add js setting for path so iframe knows where to point
  12. if (arg(0) == 'ciscon' && arg(1) == 'interactive-objects') {
  13. drupal_add_js(drupal_get_path('module', 'cis_service_icor') . '/js/cis_service_icor.js');
  14. }
  15. // add icorpath setting
  16. if (arg(0) == 'node' && arg(2) == 'edit') {
  17. // @ignore druplart_conditional_assignment
  18. if ($settings = _cis_connector_build_registry('icor')) {
  19. $path = $settings['protocol'] . '://' . $settings['address'] . base_path();
  20. drupal_add_js(array('icorPath' => $path), 'setting');
  21. }
  22. }
  23. }
  24. /**
  25. * Implements hook_custom_theme().
  26. */
  27. function cis_service_icor_custom_theme() {
  28. // switch the theme for iframe theme
  29. if (arg(0) == 'ciscon' && arg(1) == 'interactive-objects') {
  30. return 'entity_iframe_theme';
  31. }
  32. }
  33. /**
  34. * Implements hook_wywiwyg_plugin().
  35. */
  36. function cis_service_icor_wysiwyg_plugin($editor, $version) {
  37. // load icor settings if it exists
  38. $path = '';
  39. // @ignore druplart_conditional_assignment
  40. if ($settings = _cis_connector_build_registry('icor')) {
  41. $path = $settings['protocol'] . '://' . $settings['address'] . '/' . base_path();
  42. }
  43. return array(
  44. 'icor' => array(
  45. 'url' => $path,
  46. 'path' => drupal_get_path('module', 'cis_service_icor') . '/plugins/icor',
  47. 'buttons' => array(
  48. 'icor' => t('Interactive Objects (ICOR)'),
  49. ),
  50. 'load' => TRUE,
  51. ),
  52. );
  53. }
  54. /**
  55. * Implements hook_wywiwyg_plugin().
  56. */
  57. function cis_service_icor_wysiwyg_include_directory($type) {
  58. switch ($type) {
  59. case 'plugins':
  60. // You can just return $type, if you place your Wysiwyg plugins into a
  61. // sub-directory named 'plugins'.
  62. return $type;
  63. break;
  64. }
  65. }
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.