Jump to content

Extension talk:SCIJAX

Add topic
From mediawiki.org
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

IE Formatting Problems

[edit]

I was having problems with IE screwing up my entire page's formatting whenever the spellchecker would exit. Here is my fix (I'm sure this is probably a nasty hacky way of doing it):

               function unescapeForSpellCheck(str)
               {       
                       var checkSpelling = str;
                       
                       // Get rid of all the DHTML that we added.      
+                      if (window.ActiveXObject) {
+                              var regex = /
/gi; + checkSpelling = checkSpelling.replace(regex,"\n"); + var regex = /\r\n/; + checkSpelling = checkSpelling.replace(regex,""); + var regex = / \n/gi; + checkSpelling = checkSpelling.replace(regex,"\n"); + } var regex = /<.*?>/gi; checkSpelling = checkSpelling.replace(regex,"");

EditPage.php

[edit]

I can't really understand this paragraph

Sadly there are not many hooks in the mediawiki source and on needs to be added to support this extension. 
Add the line proceeded by a plus into the right place (indicated by the line number and lines of content) in your includes/EditPage.php file.

+++ includes/EditPage.php       2005-12-08 15:22:43.529059000 -0500
@@ -1124,6 +1124,7 @@

                $toolbar.="addInfobox('" . wfEscapeJsString( wfMsg( "infobox" ) ) .
                        "','" . wfEscapeJsString( wfMsg( "infobox_alert" ) ) . "');\n";
+                wfRunHooks( 'EditPageToolbar', array( &$toolbar, NULL ) );
                $toolbar.="document.writeln(\"</div>\");\n";

                $toolbar.="/*]]>*/\n</script>";

Were should I be supposed to put the code, after which part of code ? is it line 500 ? , line 1124 ?

Thank you for your answer