You are here

README.txt in Advertisement 6.2

Cache hook format:
  $cache['hook_name'] = array(
    'weight' => integer, // optional
    'file' => '/full/path/to/include/file',
    'function' => 'function_name',
  );

Supported hooks:

 - hook_init
    Alter which advertisements are selecting from.

 - hook_filter
    Filter out invalid advertisements.

 - hook_select
    Alter how advertisements are selected.

OLD README (this may not be accurate anymore):
TODO: Update.
Ad caches are defined through external modules.  Ad caches are composed of a
module 'ad_cache_TYPE.module' and an include file 'ad_cache_TYPE.inc' that live
in the 'cache/TYPE' subdirectory where 'TYPE' is replaced with the type of
cache.  For example, the included file cache lives in 'cache/file'.

The ad_cache_TYPE.inc file must have a function named ad_cache_TYPE() which is
used to display ads.  It can optionally include a function titled
ad_cache_TYPE_variables used to extract any necessary variables from the global
$_GET array (this can also be used to override values that would normally be
set from $_GET).  Any functions used by this code without bootstrapping Drupal
should also be in this file.

The ad_cache_TYPE.module file should define the drupal _help() hook so the
module can be enabled.  It should also define the _adcacheapi() hook allowing
for configuration and processing.  Any functions used by this code after
bootstrapping Drupal should also be in this module.

Refer to cache/file/* for an implementation example.

File

cache/README.txt
View source
  1. Cache hook format:
  2. $cache['hook_name'] = array(
  3. 'weight' => integer, // optional
  4. 'file' => '/full/path/to/include/file',
  5. 'function' => 'function_name',
  6. );
  7. Supported hooks:
  8. - hook_init
  9. Alter which advertisements are selecting from.
  10. - hook_filter
  11. Filter out invalid advertisements.
  12. - hook_select
  13. Alter how advertisements are selected.
  14. OLD README (this may not be accurate anymore):
  15. TODO: Update.
  16. Ad caches are defined through external modules. Ad caches are composed of a
  17. module 'ad_cache_TYPE.module' and an include file 'ad_cache_TYPE.inc' that live
  18. in the 'cache/TYPE' subdirectory where 'TYPE' is replaced with the type of
  19. cache. For example, the included file cache lives in 'cache/file'.
  20. The ad_cache_TYPE.inc file must have a function named ad_cache_TYPE() which is
  21. used to display ads. It can optionally include a function titled
  22. ad_cache_TYPE_variables used to extract any necessary variables from the global
  23. $_GET array (this can also be used to override values that would normally be
  24. set from $_GET). Any functions used by this code without bootstrapping Drupal
  25. should also be in this file.
  26. The ad_cache_TYPE.module file should define the drupal _help() hook so the
  27. module can be enabled. It should also define the _adcacheapi() hook allowing
  28. for configuration and processing. Any functions used by this code after
  29. bootstrapping Drupal should also be in this module.
  30. Refer to cache/file/* for an implementation example.