On my sites I tend to provide separate Log in and Register Links. For Login, I tend to link to /user instead of /user/login. The benefit of doing this is that when the user logs in, the Log in link changes to My account -- very handy.

Unfortunately, while I've modified thickbox.js to modify the links properly:

$(document).ready(function() { $("a[@href*='/user']").addClass('thickbox').each(function() { this.href = this.href.replace(/user$\??/,"thickbox_login?height=220&width=250&") }) });
$(document).ready(function() { $("a[@href*='?q=user']").addClass('thickbox').each(function() { this.href = this.href.replace(/user$/,"thickbox_login&height=220&width=250") }) });

I can't figure out how to change the code to only add the "thickbox" class to the /user link, not /user/register. As it is, Thickbox is used to display the registration page in a default-sized portal.

Any suggestions?

Comments

frjo’s picture

Status: Active » Closed (fixed)

Cleaning up old issues.

mrtoner’s picture

Status: Closed (fixed) » Active

Sure would appreciate an answer instead of just ignoring the issue.

frjo’s picture

Status: Active » Fixed

Try this selectors instead:

a[href='/user']

The * matches any element whose attribute value contains the substring. Remove it and you should get what you want.

The @ is depreciated in later jQuery versions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.