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
Comment #1
frjo commentedCleaning up old issues.
Comment #2
mrtoner commentedSure would appreciate an answer instead of just ignoring the issue.
Comment #3
frjo commentedTry this selectors instead:
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.