News:

Wondering if this will always be free?  See why free is better.

Main Menu

News Fader Not Working In Chrome

Started by MOCA CPU, January 24, 2015, 06:42:19 PM

Previous topic - Next topic

Arantor

OK, so here's what I came up with. Tested in current Chrome, Firefox, MS IE and just for fun in Opera 12. I assume it works in current Opera too.

I'm surprised, I genuinely thought it had no opacity support, but it was like 4 years ago when I last looked at this and replaced it what seemed like a dozen lines of jQuery. Anyway. Changes to scripts/fader.js.

Code (find) Select
// Try to find the fore- and background colors.
if ('currentStyle' in this.oFaderHandle)


Code (replace) Select
// Try to find the fore- and background colors.
var modern_browser = 'MozOpacity' in this.oFaderHandle.style || 'Opacity' in this.oFaderHandle.style || 'filter' in this.oFaderHandle.style;
if ('currentStyle' in this.oFaderHandle && !modern_browser)


Code (find) Select
else if (!('opera' in window) && 'defaultView' in document)

Code (replace) Select
else if (!('opera' in window) && 'defaultView' in document && !modern_browser)

All this says is: if the browser supports opacity, we'll use that later, otherwise fetch the colour because we will need that.

MOCA CPU

Cool :)  Ill see if mere novice here can implement that  :P

Many Thanks

Sea Mac

Quote from: Arantor on January 27, 2015, 10:51:54 AM
Yes, I realize this. I'm trying to point out how much effort it is for what is considered a minor feature at best - and is disabled by the majority of users as far as we know.
Well, I WAS using the news fader on all 3 of my sites - until a couple of days ago when I glimpsed how Chrome puts all hundred some odd news items at the top of the site - and I was forced to switch it OFF.

Just one more reason I won't use Chrome ... but I can not control what browser my visitors use!

Too bad it is broken ... I had use for it!

Dragon41673

I apologize, I could have sworn I posted here.

Arantor...your fix worked perfectly! Thank you very much for your help!
Owner - Aries Games & Miniatures

Arantor

Quote from: Sea Mac on February 22, 2015, 05:18:59 PM
Quote from: Arantor on January 27, 2015, 10:51:54 AM
Yes, I realize this. I'm trying to point out how much effort it is for what is considered a minor feature at best - and is disabled by the majority of users as far as we know.
Well, I WAS using the news fader on all 3 of my sites - until a couple of days ago when I glimpsed how Chrome puts all hundred some odd news items at the top of the site - and I was forced to switch it OFF.

Just one more reason I won't use Chrome ... but I can not control what browser my visitors use!

Too bad it is broken ... I had use for it!


Too bad you didn't look up and see how to fix it, too.

Sea Mac

I will try changing all that code for those 3 forums ... it is that important to me ...

Thank you! 

Sea Mac

#26
Success!

I'll copy the one I modified to the other two forums ... Thank you again.

The attached .js is the one I'm using now. Simply replace the file found at ~/Themes/default/scripts/ with this one.

Arantor

I hope you have no mods that edited this file, or indeed that it was from a 2.0.9 forum since patches  have touched this file.

Sea Mac

I got this from the default Theme in my SMF 2.0.9 Installation. The MODs in use by that forum are

OS & Browser Detection 1.5
Simple Audio Video Embedder     3.1
SCEditor4Smf     0.5.1
and  httpBL     2.5.1

Do any of those MODs alter the fader.js?

Arantor

I don't know, don't think they do, but you never know.

More of a case that I don't really have the time to go investigate properly.

Sea Mac

At least one of those javascripts had a tilde ~ at the end of its name ... if I remember correctly one of the FTP settings was to 'make a backup of changed files' by marking the depreciated original with a tilde ...

I checked ... there was no fader.js~ file in there so I feel that no MOD got to it ... it is likely that no MOD did touch it or I'd have a backup with a tilde after it. (The 'editor.js' was MODded on October 14th last year - no other .js file has a tilde after it.)

Steve

Those are smf generated backup/temp files.
DO NOT pm me for support!

Miker1029

Hey All,

Googled this issue and Ended up Here...

I have the Same Problem, In FireFox News Fader works great, In Chrome & I.E. It shows on the bottom of the News window....

And Maybe this might be Pertinent, And I find Is strange, I've been adding social Media, And Buttons and Such....

In Firefox (Latest), Only Login/Register Button that Shows Is Google+ Log-In, (I Have Google+, Twitter, Facebook), In the Forums, G+1 Button Doesn't show, But Twitter Does....

In Chrome All Log-In Buttons show, and All G+1, And Twitter Buttons Show, And Yes, Compared, I'd live with the News Fade not working...

BUT, To me, It's a Programming thing with SMF, BTW I'm On 2.0.9, If Chrome Is Running and Showing Everything as it should, the the News fade is the problem....

In Firefox, Buttons don't show, And Etc, Etc, Haven't tried I.E. To see if the Twit & +1 Buttons are there (Hate I.E.)....

But as I said, If the Only thing wrong with Chrome getting it right, Must be a Programming Issue... And Fixable??

Yes?

Just My 2 Cents....

Mike

EDIT:

Okay Came to the end of this post and seen there might be a Fix I'll try and report back...  Sorry for the Rash Post....

Kindred

Maybe... Or maybe it's just another case of a browser programming being completely stupid and breaking functionality because they were not careful enough with updates but now they expect everyone to cater to their changes
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

margarett

We have been noticing that latest versions of most "big" browsers are breaking a lot of JS :(

Those login buttons you have are not part of SMF so you should ask for support in the mod support topic. But IMO, same problem applies: it heavily relies on JS and browsers are breaking it :(

Kindred is totally correct. Unfortunately they just don't care..
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Miker1029

I don't see what the point is of asking the mod developer, it works in some that browsers and not others, Browsers should know....

But I just put that Out there to show how some things are working....Chrome Buttons Mods Add-ins are working..

FireFox There Not....

Chrome News Fader (Built Into SMF 2.0.9) Is NOT working

FireFox news fader is working....

Just trying to put the Info Out there...

If you have an Idea to Fix it in CHROME, Cause Screw F.F., Use chrome, But I'd like it all to atleast work like it should in 1 browser...

Know what I mean?

Or should I try the fix on the top of this page, Hell, I'm more then willing...

Mike 8-)

Miker1029

Sorry you all are posting as I am So it's making it diffucult to talk...I'll give it a few, and yes kindred I Agree, But there should be a way to make it work... (Yes just got your Post after I posted my 2nd one....)

Mike

Shambles

Hang on. Isn't this someone else's already-solved topic?

margarett

Quote from: Shambles on March 31, 2015, 03:03:57 PM
Hang on. Isn't this someone else's already-solved topic?
It is. But it's also perfectly on-topic (because, all and all, the issue is the same ;) )

Proceeding :)

Quote from: Miker1029 on March 31, 2015, 02:43:17 PM
it works in some that browsers and not others, Browsers should know....
That's the thing: browsers are changing the way they interpret JavaScript and not assuring compatibility to older syntax. To make it worse, each browser is supporting different things. That's why "it works in some browsers and not others". That's why the news fader it's failing only in Chrome: because Chrome is not supporting opacity anymore, while others (still) do.

So, in the same way we (SMF) will have to make our JavaScript compatible with newer browsers, so will MOD authors. Because you can be sure that browsers will not care about SMF (or any other software, for what matters).
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Miker1029

Ya, so much for the "Standard" across multi-platforms Huh?

Guess I'll just have to figure a way around it, gonna try the solve here see if I can get it working, for now...

Thanks,

Mike

Advertisement: