A Drupal module that creates a block in which you can display a random Youtube video from a given pool.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

55 lines
1.1 KiB

  1. <?php
  2. // $Id$
  3. /**
  4. * @file
  5. * Implement CCK's install/uninstall hooks.
  6. */
  7. /**
  8. * Implementation of hook_install().
  9. */
  10. function youtuberotate_install() {
  11. variable_set( 'youtuberotate_height', '238' );
  12. variable_set( 'youtuberotate_width', '296' );
  13. drupal_load( 'module', 'content' );
  14. content_notify( 'install', 'youtuberotate' );
  15. }
  16. /**
  17. * Implementation of hook_uninstall().
  18. */
  19. function youtuberotate_uninstall() {
  20. db_query( "DELETE FROM {variable} WHERE name LIKE 'youtuberotate_%';" );
  21. drupal_load( 'module', 'content' );
  22. content_notify( 'uninstall', 'youtuberotate' );
  23. }
  24. /**
  25. * Implementation of hook_enable().
  26. *
  27. * Notify content module when this module is enabled.
  28. */
  29. function youtuberotate_enable() {
  30. drupal_load( 'module', 'content' );
  31. content_notify( 'enable', 'youtuberotate' );
  32. }
  33. /**
  34. * Implementation of hook_disable().
  35. *
  36. * Notify content module when this module is disabled.
  37. */
  38. function youtuberotate_disable() {
  39. drupal_load( 'module', 'content' );
  40. content_notify( 'disable', 'youtuberotate' );
  41. }