Hi Stella

I would love the feature of displaying the login form in a lightbox. But for me it does not work, despite I activated the function on the settings page. Is there something special I have to consider for this functionality?

Thank you
Cheers

Comments

stella’s picture

Status: Active » Fixed

It will only work on user/login links, like the one that says "Please login or register to post comments". You also need to ensure that lightbox2 functionality is not disabled on those pages. It doesn't work on links which are just http://www.example.com/user.

If the option is enabled, and user/login links still don't open in a lightbox, then send me a link to your site.

Cheers,
Stella

tobiass’s picture

Status: Fixed » Closed (fixed)

Thank you.

Thought that the login refers to the http://www.example.com/user login. Just tried it: user/login works well. Sorry for that!

Cheers

SeanBannister’s picture

I'm feeling rather blind, I can't see the setting to enable the lightbox login. I'm clicking on the login link currently and it takes me to the login page. Where is the setting to use lightbox?

stella’s picture

It's on admin/settings/lightbox2 and is a checkbox labelled "Enable Login Support". If you're using the dev version, then it appears under a collapsed fieldset called "Login Settings". I can't recall where it appears in 5.x-2.8, if it's not visible by default, have you tried looking under the "Advanced Settings" collapsed fieldset.

Cheers,
Stella

SeanBannister’s picture

Wow, there's been a few changes between 2.7 and 2.8 :) helps when you run the right version. Found it.

socialnicheguru’s picture

Hi,

can I use lightbox to show http://mysite.com/user/register page?

If so how?

Thanks,
Chris

stella’s picture

Not automatically. You could use some js code similar to lightbox2_login.js to modify the link so you can do this however.

raiyne’s picture

Version: 5.x-2.8 » 6.x-1.x-dev
Component: Miscellaneous » Code
Assigned: tobiass » Unassigned

So in the newest dev version the lightbox_modal.js file look like this:

// $Id: lightbox_modal.js,v 1.1.2.2 2009/01/05 15:59:08 snpower Exp $

function lightbox2_login() {
  $("a[@href*='/user/login'], a[@href*='?q=user/login']").each(function() {
    $(this).attr({
      href: this.href.replace(/user\/login?/,"user/login/lightbox2"),
      rel: 'lightmodal[|width:250px; height:210px;]'
    });
  });
}

function lightbox2_contact() {
  $("a[@href*='/contact'], a[@href*='?q=contact']").each(function() {
    $(this).attr({
      href: this.href.replace(/contact?/,"contact/lightbox2"),
      rel: 'lightmodal[|width:450px; height:450px;]'
    });
  });
}

Drupal.behaviors.initLightboxModal = function (context) {
  if (Drupal.settings.lightbox2.enable_login) {
    lightbox2_login();
  }
  if (Drupal.settings.lightbox2.enable_contact) {
    lightbox2_contact();
  }
};

So in an attempt to create a lightbox login screen on my front page and maybe even a register lightbox, (a login link, which leads to the same login box being called above), am I going to create a new .js file with separate code or add to this one, trying to call in a new href reference?

If it is a separate file, is the .js file going to be references in other files?

I'm afraid I'm stepping into outside boundaries a bit here, so please bear with me...I'll get it.

-Ben

caspercash’s picture

Hi stella! would you mind posting the js code for the registration form here? I'd really appreciate it if there is a bit of support of it just like the login form. Thank you very much!