function votingapiactivity_activity_info in Activity 6
Same name and namespace in other branches
- 5.4 contrib/votingapiactivity/votingapiactivity.module \votingapiactivity_activity_info()
- 5.2 contrib/votingapiactivity.module \votingapiactivity_activity_info()
- 5.3 contrib/votingapiactivity/votingapiactivity.module \votingapiactivity_activity_info()
Activity definition file
This defines what hooks activity module should use
File
- contrib/
votingapiactivity/ votingapiactivity.module, line 8
Code
function votingapiactivity_activity_info() {
$tags = array();
$query = db_query("SELECT DISTINCT tag FROM {votingapi_cache}");
while ($result = db_fetch_array($query)) {
$tags[$result['tag']] = $result['tag'];
}
return array(
'ops' => array(
'vote' => t('Vote'),
),
'types' => $tags,
'roles' => array(
'author' => array(
'#name' => t('Author'),
'#description' => t('The person who voted'),
'#default' => t('[author] voted on the [content-type] [content-link]'),
),
'all' => array(
'#name' => t('All'),
'#description' => t('The general public.'),
'#default' => t('[author-all] voted on the [content-type] [content-link]'),
),
),
);
}