Login Module: Button with icon and text (in IE)

15 years 3 months ago #86746 by flyingwombats
First of all, congratulations to the whole CB team for releasing such a fantastic product! :)

I have just upgraded all of my CB sites and found a small glitch with the login module. It only occurs in Internet Explorer (I've only tested IE7) so I blame Microsoft not Community Builder.

The problem occurs when you set "Display login/logout button as 'Button with icon and text'" in the module parameters. In Internet Explorer, you see a normal button but no icon. It worked fine in RC4 so I compared the files and found the problem. Basically, the button style needs "background-color: transparent;" for IE to work out that is should display the icon on top of the button. You can fix this problem by changing the following lines in modules/mod_cblogin/mod_cblogin.php:

Change line 501 from:
[code:1] $buttonStyle = ' style="min-height:20px;padding-left:30px;cursor:«»pointer;background-image:url(' . $urlImgPath . 'logout.png);background-position:0 0;background-repeat:no-repeat;width:auto;"';[/code:1]

To:
[code:1] $buttonStyle = ' style="min-height:20px;padding-left:30px;cursor:«»pointer;background-image:url(' . $urlImgPath . 'logout.png);background-position:0 0;background-repeat:no-repeat;background-color:transparent;width:auto;"';[/code:1]

And change line 749 from:
[code:1] $buttonStyle = ' style="min-height:20px;padding-left:30px;cursor:«»pointer;background-image:url(' . $urlImgPath . 'logout.png);background-position:0 0;background-repeat:no-repeat;width:auto;"';[/code:1]

To:
[code:1] $buttonStyle = ' style="min-height:20px;padding-left:30px;cursor:«»pointer;background-image:url(' . $urlImgPath . 'login.png);background-position:0 0;background-repeat:no-repeat;background-color:transparent;width:auto;"';
[/code:1]

I hope this helps... B)

Please Log in to join the conversation.

15 years 3 months ago #86748 by beat
In RC4, on some templates we had white text which with transparent became white on white, as the normal background of the image would be removed.

See the login/logout button on this site.

In RC4 it was white background of window. Fortunately the text of the button was black and not white.

Now in CB 1.2 Stable, we keep the site template's default background color (not image, as you can't have 2 images) for buttons.

So the proposed fix which works well for your case and some others, will not work on all templates.

Btw couldn't reproduce the problem in IE. Maybe there is another template issue ?

Make sure to clear your browser cache too before making CSS changes, it could be just a browser cache isssue, as CSS changed a bit.

EDIT: added In RC4 at begin and Stable for clarity

Post edited by: beat, at: 2009/01/27 13:34

Post edited by: beat, at: 2009/01/27 13:36

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 3 months ago #86772 by flyingwombats
Replied by flyingwombats on topic Re:Login Module: Button with icon and text (in IE)
I have just tried it in on a browser that has never loaded the page before, eliminating the possibility that it is the cache. I am just using the default CB template.

I have also just looked at this site in IE7 and it has the same problem. A picture speaks a thousand words so I have uploaded a screenshot.

My IE version is 7.0.6001.18000.

Post edited by: flyingwombats, at: 2009/01/27 14:53
Attachments:

Please Log in to join the conversation.

15 years 3 months ago #86790 by krileon
I've tested this in Opera, FF, Safari, IE7, IE8, and Chrome.

IE7 is the only one with the problem. This is likely due to the fact IE7 is NOT CSS compliant; or web compliant for that matter. (IE8 actually passed ACID test.. thank the heavens!)

It is a CSS related issue.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.288 seconds

Facebook Twitter LinkedIn