i like to use this module as a login link. not block cant we make our login link work like that. when some one click on login link in menu the popup open.
i think its so easy but
i couldnt figure somehow!
thanks for advise :)

Comments

alexmoreno’s picture

jaxxham’s picture

Hi urwen,

Creating links like that doesn't seem to work for me... It justs sends me to the login page with no ajax. Am I missing something?

alexmoreno’s picture

it's important that you respect the class options:

<a href="/ajax_register/login" class=" thickbox" rel="nofollow">Entrar</a><br /><a href="/ajax_register/register" class=" thickbox" rel="nofollow">Registrate</a></p>

im sorry, i suppose when i pasted the code i didn't realize that the text box converted into real links...

gunwald’s picture

Dear Urwen,

I did as you told, my link looks like that:

<a href="ajax_register/login/nojs" class="thickbox active" rel="nofollow">login</a>

But it does not work. Clicking on the link I am forwarded to the login page. Am I missing something?

zhiqiang.qiu’s picture

Issue summary: View changes

I get it work like this:

template.php

function THEME_preprocess_page(&$vars, $hook) {
if(module_exists('ajax_register')){
_ajax_register_include_modal();
$vars['login_link'] = array(
'#theme' => 'item_list',
'#items' => _ajax_register_ajax_links(array('login')),
'#attributes' => array('class' => array('ajax-register-links'))
);
$vars['regist_link'] = array(
'#theme' => 'item_list',
'#items' => _ajax_register_ajax_links(array('register')),
'#attributes' => array('class' => array('ajax-register-links'))
);
$vars['pass_link'] = array(
'#theme' => 'item_list',
'#items' => _ajax_register_ajax_links(array('password')),
'#attributes' => array('class' => array('ajax-register-links'))
);
}
}

page.tpl.php

print render($login_link);
print render($regist_link);
print render($pass_link);