SMF Support > SMF 2.0.x Support
(Beta 4 Charter/Public) Firefox 3.1 and the WYSIWYG editor
LLStarks:
Is there a file I can edit that will allow useragent sniffing of 3.1 so that the rich text stuff works?
Enc0der:
Firefox 3.1 uses a whole new javascript engine, this is why it's not working.
"faking" the browser version will do nothing.
LLStarks:
--- Quote from: Enc0der on September 09, 2008, 05:50:53 PM ---Firefox 3.1 uses a whole new javascript engine, this is why it's not working.
"faking" the browser version will do nothing.
--- End quote ---
Perhaps. But I found a solution.
--- Quote from: Oldiesmann on September 11, 2007, 04:52:07 PM ---Quite simple :)
Sources/Load.php
Find
--- Code: (Lines 1353-1355) --- 'is_firefox' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false,
'is_firefox1' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/1.') !== false,
'is_firefox2' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/2.') !== false,
--- End code ---
Replace
--- Code: --- 'is_firefox' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Minefield') !== false,
'is_firefox1' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/1.') !== false,
'is_firefox2' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/2.') !== false,
'is_firefox3' => strpos($_SERVER['HTTP_USER_AGENT'], 'Minefield') !== false,
--- End code ---
Themes/default/scripts/script.js
Find
--- Code: ---var is_ff = ua.indexOf("firefox") != -1;
--- End code ---
Replace
--- Code: ---var is_ff = (ua.indexOf("firefox") != -1) || (ua.indexOf("minefield") != -1);
--- End code ---
The last change is the only one that's really needed, but it's best to make SMF think that Minefield is Firefox in other places too just in case :)
--- End quote ---
Works.
Enc0der:
oh, so SMF simply doesn't even try to load the JS if it doesn't recognize the browser? weird.. why? ::)
Sorry, my bad. I believed the JS was loading but making errors because of the new (and not-yet-finished) engine..
Fustrate:
--- Quote from: LLStarks on September 09, 2008, 10:04:53 PM ---
--- Code: --- 'is_firefox3' => strpos($_SERVER['HTTP_USER_AGENT'], 'Minefield') !== false,
--- End code ---
--- End quote ---
I'm guessing over time it'll change to
--- Code: --- 'is_firefox3' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/3.') !== false,
--- End code ---
?? So for right now, as long as it's not a public release (and therefore still using minefield) it should be
--- Code: --- 'is_firefox3' => strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox/3.') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Minefield') !== false,
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version