function contribute_block in Contribute 6
File
- ./
contribute.module, line 438 - Lets users contribute to projects
Code
function contribute_block($op = 'list', $delta = 0, $edit = array()) {
global $user;
switch ($op) {
case 'list':
$blocks[0]['info'] = t('Contribute Account Information');
$blocks[0]['cache'] = BLOCK_CACHE_PER_PAGE;
return $blocks;
case 'view':
if ($user->uid == 0) {
//anonymous user has no account info
$block['subject'] = t('Create an account or log in to get started!');
$block['content'] = l('user', 'Log in!');
}
else {
$block['subject'] = t('Account Summary');
$block['content'] = _contribute_account_summary();
}
return $block;
}
}