function _ad_channel_load_node in Advertisement 6.2
Same name and namespace in other branches
- 5.2 channel/ad_channel.module \_ad_channel_load_node()
- 6.3 channel/ad_channel.module \_ad_channel_load_node()
- 7 channel/ad_channel.module \_ad_channel_load_node()
Load channels associated with specified node.
1 call to _ad_channel_load_node()
- ad_channel_nodeapi in channel/
ad_channel.module - Implementation of hook_nodeapi().
File
- channel/
ad_channel.module, line 688 - Ad Channel module.
Code
function _ad_channel_load_node($node) {
// currently 0 or 1, with one being a 'premiere' advertisement.
$output['channel'] = _ad_channel_load_nid_channels($node->nid);
$output['premiere'] = (int) db_result(db_query('SELECT priority FROM {ad_priority} WHERE aid = %d', $node->nid));
$output['remnant'] = (int) db_result(db_query('SELECT remnant FROM {ad_channel_remnant} WHERE aid = %d', $node->nid));
return $output;
}