function kr2011_nopremium_message($node) { global $user; // Check if this is a free account disabled or has just authenticated role if (isset($user->roles[2]) && $user->sms_user['status'] != 2) { $block = module_invoke('boxes', 'block', 'view', 'premium_box_non_authenticated'); } else { if (isset($user->roles[12]) || !(count($user->roles) && isset($user->roles[1]))) { $block = module_invoke('boxes', 'block', 'view', 'premium_box_disabled_user'); } else { $html = check_markup(t(nopremium_get_message($node->type))); $html .= '<p>'; $html .= 'Logg inn | '; $html .= l(t('Register'), 'user/register', array('query' => array('destination' => 'node/' . $node->nid))) . ' | '; // $html .= l(t('Login'), 'user',array('query' => array('destination' => 'node/'.$node->nid))).' | '; $html .= l(t('Request new password'), 'user/password', array('query' => array('destination' => 'node/' . $node->nid))); $html .= '</p>'; $block = module_invoke('user', 'block', 'view', '0'); } } $html .= $block['content']; return $html; }
function kr2012_nopremium_message($node) { global $user; // Check if this is a free account disabled or has just authenticated role //if (isset($user->roles[2]) && $user->sms_user['status'] != 2) { // $block = module_invoke('boxes', 'block', 'view', 'premium_box_non_authenticated'); //} else if (isset($user->roles[12]) || !(count($user->roles) && isset($user->roles[1]))) { $block = module_invoke('boxes', 'block', 'view', 'premium_box_disabled_user'); } else { $html = '<div class="msg">'; $html .= check_markup(t(nopremium_get_message($node->type))); //$html .= 'Logg inn | '; $html .= l('<span>Registrere deg her</span>', 'user/register', array('html' => true, 'attributes' => array('class' => 'registerhere'), 'query' => array('destination' => 'node/' . $node->nid))); $html .= '</div>'; $html .= '<div class="hr"></div>'; // $html .= l(t('Login'), 'user',array('query' => array('destination' => 'node/'.$node->nid))).' | '; //$html .= l(t('Request new password'), 'user/password',array('query' => array('destination' => 'node/'.$node->nid))); $block = module_invoke('user', 'block', 'view', '0'); } $html .= $block['content']; return $html; }