2

How to create a link, which will open user login in lightbox, I have installed lightbox2 module in Drupal 7.

2

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.

Features:

  • 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.
1
  • This works perfectly! Surprisingly very few sites use it – Rishi Dua Feb 19 '14 at 5:04
1

You can add rel="lightmodal" to any anchor and it will be opened in a lightbox. Also I'm almost sure lightbox2 have this option (login lightbox) out of the box, check the settings form.

0

Try using: http://drupal.org/project/colorbox I believe it allows for this functionality out of the box. This post explains how to make a login link open in the colorbox; http://drupal.org/node/883210

0

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.