Overloading drigg_ui_submit_button
Hi all,
This is more of a general Drupal question, but I thought someone here might be able to help.
I'm trying to overload the 'drigg_ui_submit_button' function in Drigg and can't seem to get things working.
I added in template.php:
function phptemplate_drigg_ui_submit_button() {
return _phptemplate_callback('drigg_ui_submit_button');
}
and in a file named 'drigg_ui_submit_button.tpl.php'
global $user;
if($user->uid != 0){
return l( t('Submit scoop'),
'node/add/drigg',
array('class'=>'drigg-submit') );
} else {
return l( t('Login/register'),
'user/login?destination=' . drupal_get_destination(),
array('class'=>'drigg-login') );
}
I'm trying to add a destination to the login button so that the user is returned to the page they came from. It seems that my current code isn't working at all, any suggestions on what to do to fix it? I know I could change things in the Drigg module, but I wanted to be a bit more elegant and future proof and hopefully learn something about Drupal at the same time.
-Dave
I can't...
Hi,
Sorry, I am totally hopeless at theming :-D
If you find a solution, please let all of us know!
Merc.