Différences entre les versions de « Fichier:FCKeditor.zip »

1 672 octets ajoutés ,  31 août 2008 à 13:43
Patching MediaWiki (1.10 - 1.12)
m
(Patching MediaWiki (1.10 - 1.12))
Ligne 1 : Ligne 1 :
== Guide officiel ==
[http://mediawiki.fckeditor.net/index.php?title=FCKeditor_integration_guide FCKeditor integration guide]  
[http://mediawiki.fckeditor.net/index.php?title=FCKeditor_integration_guide FCKeditor integration guide]  
== Pour le fichier LocalSettings.php ==


  require_once( "extensions/FCKeditor/FCKeditor.php" );
  require_once( "extensions/FCKeditor/FCKeditor.php" );
Ligne 7 : Ligne 11 :
  $wgDefaultUserOptions['riched_use_popup'] = 1;
  $wgDefaultUserOptions['riched_use_popup'] = 1;
  $wgDefaultUserOptions['riched_toggle_remember_state'] = 1;
  $wgDefaultUserOptions['riched_toggle_remember_state'] = 1;
== Patching MediaWiki (1.10 - 1.12)  ==
=== Adding EditPageBeforeEditConflict hook  ===
In the latest MediaWiki (1.13, SVN version), new hook EditPageBeforeEditConflict is already available. This hook is required to fix WikiText/HTML problems when conflict occurs.<br>
MediaWiki 1.10 - 1.12 users have to add this hook manually.
In includes/EditPage.php, at the end of showEditForm function, find this code:
<pre>$wgOut-&gt;addHtml( wfHidden( 'wpAutoSummary', $autosumm ) );
if ( $this-&gt;isConflict ) {
</pre>
and replace with:
<pre>$wgOut-&gt;addHtml( wfHidden( 'wpAutoSummary', $autosumm ) );
if ( $this-&gt;isConflict &amp;&amp; wfRunHooks( 'EditPageBeforeConflictDiff', array( &amp;$this, &amp;$wgOut ) )) {
</pre>
=== SanitizerAfterFixTagAttributes  ===
In the latest MediaWiki (1.13, SVN version), new hook SanitizerAfterFixTagAttributes is already available. This hook is required to keep templates defining tag attributes.<br>
MediaWiki 1.10 - 1.12 users have to add this hook manually.
In includes/Sanitizer.php, at the end of fixTagAttributes function, find this code:
<pre>return count( $attribs )&nbsp;? ' ' . implode( ' ', $attribs )&nbsp;: '';
</pre>
and add this before the last line (with return statement):
<pre>if (&nbsp;!wfRunHooks( 'SanitizerAfterFixTagAttributes', array( $text, $element, &amp;$attribs ) ) ) {
return '';
}
</pre>
at the end you should have:
<pre>if (&nbsp;!wfRunHooks( 'SanitizerAfterFixTagAttributes', array( $text, $element, &amp;$attribs ) ) ) {
return '';
}
return count( $attribs )&nbsp;? ' ' . implode( ' ', $attribs )&nbsp;: '';
</pre>
5 464

modifications