How to create a link, which will open user login in lightbox, I have installed lightbox2 module in Drupal 7.
Or try using Ajax Login/Register, a complete solution. Here is a quote about it (from the module's project page):
... provides a smooth way for the user to login, register and request new password via AJAX at any Drupal site.
- This module provides a block with 2 links (Login, Register) for the anonymous user.
- When the user clicks on Login or register the requested form appears in a nice ajax popup.
- The login and register forms can validate using ajax and not redirect on error.
- On success the module redirects to the user page.
- When user is logged in, the block provides a Welcome !username message and a link to the user page and a logout link.
- This module integrates the thickbox plugin with the Ajax module and provides a simple, easy to use and cool login and register block.
Indeed, the AJAX Login/Register module adds a block with a login button. Clicking on that button opens a popup login/register dialog.
However, I think the question was how to make any link open the login dialog (e.g. I have blog posts, and clicking on the post title should also open the dialog.
This code does the trick however unlike the regular block dialog, it takes 5 seconds until the popup loads. Anyone knows why?