Posted by ekrispin on October 12, 2007 at 12:08am
Jump to:
| Project: | Pro and Con arguments |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
For those who wish to have the "Add argument" link placed in the standard links lines rather than in a separate line above the arguments (as it is implemented in the module), do the following:
(1) In function theme_procon_arguments() comment the line:$output = theme('procon_add_argument');
(2) Add the following to the beginning of function procon_link():
global $user;
if ($node->procon_is_enabled) {
if (user_access('create procon_argument content')) {
$links['add-argument'] = array(
'title' => t('Add new argument'),
'href' => "node/$node->nid/add/procon-argument",
'attributes' => array('title' => t('Add a new pro or con argument.')),
);
}
elseif($user->uid == 0) {
$links['add-argument'] = array(
'title' => t('<a href="@login">Login</a> or <a href="@register">register</a> to post arguments', array('@login' => url('user/login', drupal_get_destination()), '@register' => url('user/register', drupal_get_destination()))),
'html' => TRUE,
);
}
}
Comments
#1
And for bonus points this is done in your custom theme + custom module, to have an easy upgrade.
#2