LesSix, Ltm, Soleiade, Trois, Robots, Bureaucrates, Administrateurs d’interface, ltm, soleil, Modérateurs, Administrateurs, trois, Modificateurs de widgets
5 498
modifications
(7 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 1 : | Ligne 1 : | ||
== Guide officiel == | |||
[http://mediawiki.fckeditor.net/index.php?title=FCKeditor_integration_guide FCKeditor integration guide] | |||
== Pour le fichier LocalSettings.php == | |||
require_once( "extensions/FCKeditor/FCKeditor.php" ); | |||
$wgDefaultUserOptions['riched_disable'] = 0; | |||
$wgDefaultUserOptions['riched_use_toggle'] = 1; | |||
$wgDefaultUserOptions['riched_start_disabled'] = 1; | |||
$wgDefaultUserOptions['riched_use_popup'] = 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 <span style="background-color: rgb(255, 255, 0);">includes/EditPage.php</span>, at the end of showEditForm function, find this code: | |||
<pre>$wgOut->addHtml( wfHidden( 'wpAutoSummary', $autosumm ) ); | |||
if ( $this->isConflict ) { | |||
</pre> | |||
and replace with: | |||
<pre>$wgOut->addHtml( wfHidden( 'wpAutoSummary', $autosumm ) ); | |||
if ( $this->isConflict && wfRunHooks( 'EditPageBeforeConflictDiff', array( &$this, &$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 <span style="background-color: rgb(255, 255, 0);">includes/Sanitizer.php</span>, at the end of fixTagAttributes function, find this code: | |||
<pre>return count( $attribs ) ? ' ' . implode( ' ', $attribs ) : ''; | |||
</pre> | |||
and add this before the last line (with return statement): | |||
<pre>if ( !wfRunHooks( 'SanitizerAfterFixTagAttributes', array( $text, $element, &$attribs ) ) ) { | |||
return ''; | |||
} | |||
</pre> | |||
at the end you should have: | |||
<pre>if ( !wfRunHooks( 'SanitizerAfterFixTagAttributes', array( $text, $element, &$attribs ) ) ) { | |||
return ''; | |||
} | |||
return count( $attribs ) ? ' ' . implode( ' ', $attribs ) : ''; | |||
</pre> |
modifications