miércoles, 30 de septiembre de 2009

FCKeditor para mediawiki (BUG)

Yo uso en una enciclopedia la herramienta Mediawiki y para hacer más sencillo la edicion a los usuarios, le puse la extensión FCKeditor, pero me trae algunos problemas como por ejemplo cuando le pongo a las imágenes que usen thubnail y le pongo un texto alternativo se me pierde el texto alternativo, esto lo arregle de esta forma:
edito includes/parser/Parser.php (line 4394)

# In the old days, [[Image:Foo|text...]] would set alt text. Later it
# came to also set the caption, ordinary text after the image -- which
# makes no sense, because that just repeats the text multiple times in
# screen readers. It *also* came to set the title attribute.
#
# Now that we have an alt attribute, we should not set the alt text to
# equal the caption: that's worse than useless, it just repeats the
# text. This is the framed/thumbnail case. If there's no caption, we
# use the unnamed parameter for alt text as well, just for the time be-
# ing, if the unnamed param is set and the alt param is not.
#
# For the future, we need to figure out if we want to tweak this more,
# e.g., introducing a title= parameter for the title; ignoring the un-
# named parameter entirely for images without a caption; adding an ex-
# plicit caption= parameter and preserving the old magic unnamed para-
# meter for BC; ...
if( $caption !== '' && !isset( $params['frame']['alt'] )
&& !isset( $params['frame']['framed'] )
&& !isset( $params['frame']['thumbnail'] )
&& !isset( $params['frame']['manualthumb'] ) ) {
$params['frame']['alt'] = $params['frame']['title'];
}

Comentando esta linea me funciono todo bien.
$params['frame']['alt'] = $params['frame']['title'];