pierre@1: pierre@1: Cache hook format: pierre@1: $cache['hook_name'] = array( pierre@1: 'weight' => integer, // optional pierre@1: 'file' => '/full/path/to/include/file', pierre@1: 'function' => 'function_name', pierre@1: ); pierre@1: pierre@1: Supported hooks: pierre@1: pierre@1: - hook_init pierre@1: Alter which advertisements are selecting from. pierre@1: pierre@1: - hook_filter pierre@1: Filter out invalid advertisements. pierre@1: pierre@1: - hook_select pierre@1: Alter how advertisements are selected. pierre@1: pierre@1: OLD README (this may not be accurate anymore): pierre@1: TODO: Update. pierre@1: Ad caches are defined through external modules. Ad caches are composed of a pierre@1: module 'ad_cache_TYPE.module' and an include file 'ad_cache_TYPE.inc' that live pierre@1: in the 'cache/TYPE' subdirectory where 'TYPE' is replaced with the type of pierre@1: cache. For example, the included file cache lives in 'cache/file'. pierre@1: pierre@1: The ad_cache_TYPE.inc file must have a function named ad_cache_TYPE() which is pierre@1: used to display ads. It can optionally include a function titled pierre@1: ad_cache_TYPE_variables used to extract any necessary variables from the global pierre@1: $_GET array (this can also be used to override values that would normally be pierre@1: set from $_GET). Any functions used by this code without bootstrapping Drupal pierre@1: should also be in this file. pierre@1: pierre@1: The ad_cache_TYPE.module file should define the drupal _help() hook so the pierre@1: module can be enabled. It should also define the _adcacheapi() hook allowing pierre@1: for configuration and processing. Any functions used by this code after pierre@1: bootstrapping Drupal should also be in this module. pierre@1: pierre@1: Refer to cache/file/* for an implementation example.