Active
Project:
Ajax Login/Register
Version:
7.x-4.0-rc9
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2012 at 08:23 UTC
Updated:
16 Dec 2012 at 10:29 UTC
Hello,
You can show login, register or request new password link on everywhere. Using code:
$enabled_links = variable_get('ajax_register_enabled_links', array('login', 'register', 'password'));
$print_link= array(
'#theme' => 'item_list',
'#items' => _ajax_register_ajax_links($enabled_links),
'#attributes' => array('class' => array('ajax-register-links'))
);
print render($print_link);
- setting enabled_links variable array you want to show the links. for ex: array('login')
- You can put it on page.tpl.php or everywhere.
Enjoy!
John
Comments
Comment #1
arcall commentedJohn,
I have tried to add your code in a block (php mode), and their is all kind of error. Perhaps the ctools and ajax_register function aren't accessible from the blocks ? any ideas how I can fix it ?
Thanks
Comment #2
johntang commented@arcall
Now I still no way to fix it, but I have sollutions for you:
You can disable (comment with '//') the functions of error on ctools (ctools/includes/) and copy this functions to sites/default/settings.php in here this functions is global :)
I don't know why Drupal no see the some functions of the ctools on customize page :)
Regards
John
Comment #3
yurgon commenteddont work for me
Comment #4
bipink8 commentedjohn91tang ,
How to port this to Drupal 6 ?
Thanks,
Bipin
Comment #5
bipink8 commentedI got it working in drupal 6,I added below code in page.tpl.php
Thanks,
Bipin
Comment #6
spleshkaHi all,
Now ajax links are works using this code snippet (See this commit):