Difference between revisions of "My MediaWiki help"

From Sinfronteras
Jump to: navigation, search
(Insertar Figuras)
(MultimediaPlayer)
Line 919: Line 919:
 
<div style="max-width: 750px"><multimediacontainer /></div>
 
<div style="max-width: 750px"><multimediacontainer /></div>
  
* {{#multimediaitem:YouTube|7ykGmk6H-2Q|YouTube test}}
+
{{#multimediaitem:YouTube|7ykGmk6H-2Q|YouTube test}}
  
 
===MediawikiPlayer===
 
===MediawikiPlayer===

Revision as of 17:36, 24 October 2020

Contents

1 Instalación y actualización del MediaWiki

Main installation guide: https://www.mediawiki.org/wiki/Manual:Installation_guide#Main_installation_guide

Moving a wiki: https://www.mediawiki.org/wiki/Manual:Moving_a_wiki

1.1 Instalación

https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki

1.1.1 Download MediaWiki software

https://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#Download_MediaWiki_software:

wget https://releases.wikimedia.org/mediawiki/1.31/mediawiki-1.31.0.tar.gz

1.2 Back up

https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki

1.2.1 Database

En Databases#Backup debería también haber una explicación de como realizar un Backup de una base de datos.

mysqldump -h hostname -u userid -p --default-character-set=whatever dbname > backup.sql
mysqldump -h localhost -u root -p --default-character-set=binary wikidb > perso_wikidb.sql

Substituting hostname, userid, whatever, and dbname as appropriate. All four may be found in your LocalSettings.php (LSP) file.:

  • hostname may be found under $wgDBserver; by default it is localhost.
  • userid may be found under $wgDBuser,
  • whatever may be found under $wgDBTableOptions, where it is listed after DEFAULT CHARSET=. If whatever is not specified mysqldump will likely use the default of utf8, or if using an older version of MySQL, latin1.
  • dbname may be found under $wgDBname.
  • After running this line from the command line mysqldump will prompt for the server password (which may be found under Manual:$wgDBpassword' in LSP).

1.2.2 File system

Guardar el directorio del wiki en un archivo .tar.gz

La opci'on -C permite generar el .tar sin incluir el full directory path (se coloca el punto (.) al final para indicar que a partir del punto (.) (directori actual) se incluir'an los archivos en el .tar:

tar -czpvf 1-system_cloud/.1-conf-system_cloud/1-respaldo_perso/perso_filesystem.tar.gz -C /var/www/sinfronteras_ws/perso .

1.2.3 Backup the content of the wiki (XML dump)

It is also a good idea to create an XML dump in addition to the database dump. XML dumps contain the content of the wiki (wiki pages with all their revisions), without the site-related data (they do not contain user accounts, image metadata, logs, etc).

XML dumps are less likely to cause problems with character encoding, as a means of transfering large amounts of content quickly, and are easily be used by third party tools, which makes XML dumps a good fallback should your main database dump become unusable.

To create an XML dump, use the command-line tool dumpBackup.php, located in the maintenance directory of your MediaWiki installation. See Manual:dumpBackup.php for more details.

For example the user here is saving all of the revision history ( --full) into a file named dump.xml:

php dumpBackup.php --full > dump.xml
cd /var/www/sinfronteras_ws/perso/maintenance
php dumpBackup.php --full > /root/dump_perso_sinfronteras.xml

1.3 Actualización

https://www.mediawiki.org/wiki/Manual:Upgrading

  • Aunque en este punto ya debe existir un backup del wiki, me parece apropiado comenzar por renombrar el directorio del wiki actual
mv /var/www/sinfronteras_ws/perso /var/www/sinfronteras_ws/perso_old
wget https://releases.wikimedia.org/mediawiki/1.30/mediawiki-1.30.0.tar.gz
mv mediawiki-1.30.0 perso
  • Copy some files and folders from the old installation directory to the new one
  • 1-archivos (mi carpeta de archivos)
  • LocalSettings.php, which contains your old configuration settings.
  • The images directory, which contains all the uploaded files to the wiki.
  • Change the ownership and permissions (e.g. if your web user is apache):
find ./images -type d -exec chmod 755 {} \;
chgrp -R www-data images
Esto lo había realizado antes de la siguiente forma (creo que debe ser lo mismo):
chmod -R 755 images/
chown -R www-data:www-data images/
  • In case you use a custom logo this file also needs to be restored from backup.
  • After 1.24 in resources/assets/ or images/ if that's what you chose to use.
cp /var/www/sinfronteras_ws/perso_old/resources/assets/pangea_day1-redim.png /var/www/sinfronteras_ws/perso/resources/assets/
  • In LocalSettings.php: $wgLogo = "$wgResourceBasePath/resources/assets/pangea_day1-redim.png";
  • Some extensions in the extensions directory. You should always get updated extensions, old extensions aren't guaranteed to work with a newer version of MediaWiki.
  • Any .htaccess file (if you're using Apache and you've defined any rules in them).
cp perso_old/.htaccess_venezuela perso/
cp perso_old/.htaccess_ireland perso/
  • Custom skins from within the skins directory
  • Any modifications made to the old installation files or extensions
  • Upgrade extensions
  • Este paso es muy importante porque muchas extesions no funcionarán en la versión actual; lo cual puede generar errores en la ejecución del update.php o el wiki puede no cargar cuando en el web browser (error 500 entre otros). Como este paso requiere trabajo, podría ser adecuado obviar este paso y luego, si se generan errores, empezar a determinar cuales son las extensiones que están generando problemas.
  • Adapt your LocalSettings.php
Es muy importante revisar este archivo cuando se realiza la actualización debedo a que algunas variables pueden haber cambiado (el valor o el nombre de la variable). Creo que es recomendable comparar un archivo LocalSettings.php generado durante una nueva instalación de la versión que estamos instalando y el LocalSettings.php que estamos usando.
  • Una de los detalles que hay que tomar en cuenta es la nueva forma en que son incluidas las extensiones en el LocalSettings.php:
  • Nueva forma: wfLoadExtension( 'TocTree' );
  • Anteriormente: require_once "$IP/extensions/TocTree/TocTree.php";
Extensiones que no estén actualizadas para la nueva forma deben ser incluidas a través de la antigua manera.
// Esta variable me trajo muchos problemas luego de hacer la actualizaci'on. En mi antigua versi'on, el valor de esta variabla era es_ES.utf8. Cuando actualic'e, debido a que segu'i usando el mismo LocalSettings.php, no actualic'e el valor de esta variable. Esto impidi'o la conversi'on y despliegue de im'agenes svg en el wiki. Adem'as, al usar la variable wgUseImageMagick no se desplegaban muchas de las imagenes del wiki (no s'olo las .svg). Luego vi que al instalar un nuevo MW1.31, en el archivo LocalSettings.ph el valor de esta variable era diferente. Luego de ajustarlo a dicho valor, se resolvieron los problemas.
$wgShellLocale = "C.UTF-8";
// $wgShellLocale = "es_ES.utf8";  # Valor en antiguas versiones de MW
  • Run the update script
php maintenance/update.php
  • Algunos errores encontrados al ejecutar update.php:
php maintenance/update.php --skip-external-dependencies
  • En la versión 1.31:
  • La ejecución de update.php delplegó: Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.
  • Esto tuvo que ser realizado para observar los errores que se generaban en la ejecución del update.php.
  • Primero tuve que instalar versiones actuales de PHP y MySQl. La instalación ha sido bien documentada en las respectivas secciones de instalación de estos programas. Se debe notar que es necesario también instalar: php7.2-mysql
sudo apt-get install php7.0-mbstring
  • Actualizar al versión de PHP usada por apache. Luego de actualizar PHP, Apache puede seguir usando versiones anteriores. Debemos entonces actualizar la versión de PHP que Apache va a usar. Ver Web server#Versión de PHP usada por apache
  • Se generaron muchos errores debido al extensions desactualizadas. La única forma de solventar estos errores fue desactivando extensiones en el LocalSettings.php para ir probando cual de ellas generaba errores.

1.4 Move the wiki to another server

Manual:Restoring a wiki from backup: https://www.mediawiki.org/wiki/Manual:Upgrading#Adapt_your_LocalSettings.php


1.5 Rewrites the URL and hide the index.php file from the page URL

Luego de instalar MediaWiki, la URL de mis páginas era: http://wiki.sinfronteras.ws/index.php/Python

El index.php no es apropiado. Esta url se puede rewrite de la forma explicada aquí: https://www.mediawiki.org/wiki/Manual:Short_URL

Mi idea era configurar las url de esta forma: http://wiki.sinfronteras.ws/Python. Sin embargo en https://www.mediawiki.org/wiki/Manual:Short_URL se explica que esta configuración no es la más apropiada. Ver:

Se recomienda colocar alguna palagra en la ruta. Por ejemplo: http://wiki.sinfronteras.ws/view/Python

Ahora, como se explica en https://www.mediawiki.org/wiki/Manual:Short_URL, para realizar la configuración podemos utilizar el MediaWiki ShortURL Builder: https://shorturls.redwerks.org//. Esta aplicación permite ingresar la URL de nuestro wiki y retorna las configuraciones necesarias para obtener la ruta deseada.

En nuestro caso la applicación retornó las siguietes configuraciones:


Apache configurations:

This configuration is meant to go the same block as whatever VirtualHost or other directive you have your wiki's DocumentRoot, ServerName, etc... already defined in:

RewriteEngine On
RewriteRule ^/?view(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

Pare poder utilizar los módulos RewriteEngine, RewriteRule, etc es necesario primero to enable «mod_rewrite» for Apache como se explica aquí: https://stackoverflow.com/questions/869092/how-to-enable-mod-rewrite-for-apache-2-2 :

sudo a2enmod rewrite
sudo service apache2 restart

The above configurations were placed in «/etc/apache2/sites-available/wiki_sinfronteras_ws.conf» (this is the file where we defined the subdomain) so that file became like this:

<VirtualHost *:8082>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/sinfronteras/wikis/wiki
    ServerAlias   www.wiki.sinfronteras.ws
    ServerName wiki.sinfronteras.ws

    # Configuration to Rewrites the URL and  hide «index.php» file extensions from the page address. See https://www.mediawiki.org/wiki/Manual:Short_URL
    RewriteEngine On
    RewriteRule ^/?view(/.*)?$ %{DOCUMENT_ROOT}/index.php [L]

    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
    RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]

    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
    RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

    <Directory /var/www/sinfronteras/wikis/wiki>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
                Require all granted

    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

More info about VirtualHost configurations at https://httpd.apache.org/docs/2.4/vhosts/examples.html


En lugar de colocar estas configuraciones en «/etc/apache2/sites-available/wiki_sinfronteras_ws.conf», es también posible colocarlas en el «/var/www/sinfronteras/wikis/wiki/.htaccess» file. Sin embargo, obtuve errores al tratar de hacerlo de esta forma y no insistí en la resolución pues me pareció más apropiado colocarlas en el «/etc/apache2/sites-available/wiki_sinfronteras_ws.conf» file.


Configurations in the LocalSettings.php

$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "/view/$1";

$wgEnableUploads  = true;
$wgGenerateThumbnailOnParse = false;



2 Errores solucionados

2.1 Extensiones o configuraciones que podrían generar errores eventualmente

La extensión IndentSections podría generar errores debido a que no es una extensión mantenida y actualizada. Ver Indent Sections para más detalles.

2.2 Media Wiki Search Error

Cuando trataba de hacer una búsqueda en el MediaWiki (Search) se generaba un error que decía:

A database query syntax error has occurred. This may indicate a bug in the software.
Se ha producido un error en la consulta a la base de datos. Esto puede indicar un fallo en el software.

Esto se solucionó siguiendo lo explicado en esta página: http://clusterfrak.com/kb/apps_kb/mediawiki_search_error/#media-wiki-search-error

First you need to log into the database server hosting the database for the MediaWiki application. Select or "use" the database and remove the corrupted searchindex table, and create a fresh one to take it's place. This can be done by using the following sql statement:

CREATE TABLE `es_searchindex` (`si_page` INT(10) UNSIGNED NOT NULL,`si_title` VARCHAR(255) NOT NULL DEFAULT '',`si_text` mediumtext NOT NULL,UNIQUE KEY `si_page` (`si_page`),FULLTEXT KEY `si_title` (`si_title`),FULLTEXT KEY `si_text` (`si_text`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Then, regen Search Index:

cd /var/www/html/mysite/mediawiki-1.19.1/maintenance
php rebuildtextindex.php



2.3 Mediawiki Cannot access the database

Mediawiki Cannot access the database: Access denied for user 'root'@'localhost' (localhost)

Este error fue solventado una vez realizando los pasos listado en Databases#Installing_MySQL en relación al error «no podía ingresar a través de «mysql -u root -p». Se generaba el error ERROR 1698 (28000): Access denied for user 'root'@'localhost'»



3 Problema con el archivo ibdata1

http://www.pc-freak.net/blog/fix-mysql-ibdata-file-size-ibdata1-file-growing-large-preventing-ibdata1-eating-disk-space/

ibdata1 file growing too large. Preventing ibdata1 from eating all your server disk space.


1. Checking size of ibdata1 file On Debian / Ubuntu and other deb based Linux servers datadir is /var/lib/mysql/ibdata1

   server:~# du -hsc /var/lib/mysql/ibdata1
   45G     /var/lib/mysql/ibdata1
   45G     total

2. Checking info about Databases and Innodb storage Engine

   server:~# mysql -u root -p
   password:
   mysql> SHOW DATABASES;
   +——————–+
   | Database           |
   +——————–+
   | information_schema |
   | bible              |
   | blog               |
   | blog-sezoni        |
   | blogmonastery      |
   | daniel             |
   | ezmlm              |
   | flash-games        |


Next step is to get some understanding about how many existing InnoDB tables are present within Database server:

   mysql> SELECT COUNT(1) EngineCount,engine FROM information_schema.tables WHERE table_schema NOT IN ('information_schema','performance_schema','mysql') GROUP BY engine;
   +————-+——–+
   | EngineCount | engine |
   +————-+——–+
   |         131 | InnoDB |
   |           5 | MEMORY |
   |         584 | MyISAM |
   +————-+——–+
   3 rows in set (0.02 sec)


To get some more statistics related to InnoDb variables set on the SQL server:

   server:~# mysqladmin -u root -p'Your-Mysql-Server-Password' var | grep innodb


Here is also how to find which tables use InnoDb Engine

   mysql> SELECT table_schema, table_name FROM INFORMATION_SCHEMA.TABLES WHERE engine = 'innodb';
   +————–+————————–+
   | table_schema | table_name               |
   +————–+————————–+
   | blog         | wp_blc_filters           |
   | blog         | wp_blc_instances         |
   | blog         | wp_blc_links             |
   | blog         | wp_blc_synch             |
   | blog         | wp_likes                 |
   | blog         | wp_wpx_logs              |
   | blog-sezoni  | wp_likes                 |
   | icanga_web   | cronk                    |
   | icanga_web   | cronk_category           |
   | icanga_web   | cronk_category_cronk     |
   | icanga_web   | cronk_principal_category |
   | icanga_web   | cronk_principal_cronk    |
   …

3. Check and Stop any Web / Mail / DNS service using MySQL [No entendí este punto]

   server:~# ps -efl |grep -E 'apache|nginx|dovecot|bind|radius|postfix'
   …

Below cmd should return empty output, (e.g. Apache / Nginx / Postfix / Radius / Dovecot / DNS etc. services are properly stopped on server).

Nota: No entendí muy bien este punto. Pero lo que creo es que la siguiente orden sólo listará los servicios using MySQL (apache|nginx|dovecot|bind|radius|postfix). Debo por lo tanto detener (stop) los servicios. Para detener los servicios (stop):

   server:~# sudo service apache2 stop
   …

4. Create Backup dump all MySQL tables with mysqldump Next step is to create full backup dump of all current MySQL databases (with mysqladmin):

Nota: en este punto hay que tener cuidado porque los "--" que se emplean en el siguiente comando son mostrados, en el sitio Web de donde copié esta información, como un guíon con formato (un guíon más largo). Lo anterior genera, por supuesto, un error al ejecutar la orden en la línea de comandos.

   server:~# mysqldump --opt --allow-keywords --add-drop-table --all-databases --events -u root -p > dump.sql
   server:~# du -hsc /root/dump.sql


If you have free space on an external backup server or remotely mounted attached (NFS or SAN Storage) it is a good idea to make a full binary copy of MySQL data (just in case something wents wrong with above binary dump), copy respective directory depending on the Linux distro and install location of SQL binary files set (in my.cnf). To check where are MySQL binary stored database data (check in my.cnf):


   server:~# grep -i datadir /etc/mysql/my.cnf
   datadir         = /var/lib/mysql

If server is CentOS / RHEL Fedora RPM based substitute in above grep cmd line /etc/mysql/my.cnf with /etc/my.cnf

if you're on Debian / Ubuntu:

   server:~# /etc/init.d/mysql stop
   server:~# cp -rpfv /var/lib/mysql /root/mysql-data-backup

Once above copy completes, DROP all all databases except, mysql, information_schema (which store MySQL existing user / passwords and Access Grants and Host Permissions)

4 How to convert MediaWiki syntax to Latex

http://mediawiki2latex.wmflabs.org/file/714.pdf (this page return un pdf decente con figuras)


http://perso.sinfronteras.ws/api.php

https://forum.sublimetext.com/t/anyone-using-mediawiker/10832/3

https://github.com/tosher/Mediawiker/issues/83

https://www.mediawiki.org/wiki/Manual:Pywikibot/BotPasswords


Convert MediaWiki to Latex: https://tex.stackexchange.com/questions/1420/how-to-convert-mediawiki-syntax-to-latex

https://github.com/hkarl/mw2pdf

https://www.mediawiki.org/w/index.php?oldid=2436206

https://de.wikibooks.org/wiki/Benutzer%3aDirk_Huenniger/wb2pdf

https://devotter.com/converter#814711841



5 Archivos Apache logs demasiado pesados

http://matthewwittering.com/blog/ubuntu-tips/how-to-remove-apache-logs-&-errors.html

Estor archivos pueden ser borrados si necesitamos espacio en el disco. Para borrarlos:

Remove all the files

rm -rf /var/log/apache2/*

Reload Apache

service apache2 reload



6 Insertar Figuras

Para insertar dos o más figuras/Imágenes una al lado de la otra:

<div style="text-align: center;">
<ul> 
<li style="display: inline-block;">
[[File:Model-View-Controller-MVC-Diagram1.png|x300px|thumb|center|Design Pattern: Model-View-Controller (MVC) Diagram]]
</li>
<li style="display: inline-block;">
[[File:Model-View-Controller-MVC-Diagram2.png|x300px|thumb|center|Design Pattern: Model-View-Controller (MVC) Diagram]]
</li>
</ul>
</div>
  • Design Pattern: Model-View-Controller (MVC) Diagram
  • Design Pattern: Model-View-Controller (MVC) Diagram


<div style="text-align: center;">
<ul> 
<li style="display: inline-block; height: 100%; vertical-align: middle">
[[File:Structured_vs_Unstructured_data1.png|500px|thumb|center|Source: IDC. Taken from https://www.youtube.com/watch?v=WBU7sW1jy2o]]
</li>
<li style="display: inline-block; height: 100%; vertical-align: middle">
[[File:Structured_vs_Unstructured_data2.png|500px|thumb|center|Source: Taken from https://docplayer.net/3430405-Self-service-bi-for-big-data-applications-using-apache-drill.html]]
</li>
</ul>
</div>

7 Referencias cruzadas entre Figuras, Tablas, etc

7.1 Extension CrossReference

Para realizar referencias con links entre Figuras y Tablas de forma similar a Latex, vamos a usar la Extension:CrossReference:

https://www.mediawiki.org/wiki/Extension:CrossReference

Shown in <xr id="fig:Market_Organization"/>.

<figure id="fig:Market_Organization">
[[File:Text_classification1.png|thumb|600px|thumb|center|<caption>The organizations and groups of a market-like community in Janus</caption>]]
</figure>

Shown in Figure 1.


Figure 1: The organizations and groups of a market-like community in Janus

7.2 Extension Figures

https://www.mediawiki.org/wiki/Extension:Figures

{{#figure: |label=Figure «prueba» |content=[[File:Text_classification1.png|thumb|600px|thumb|center|{{#xref: |page=Página de pruebas |label=Figure «prueba» }}: Este es una prueba]]}}


Aquí me refiero a la {{#xref: |page=Página de pruebas |label=Figure «prueba» }}


Figure «prueba»: Este es una prueba


Aquí me refiero a la Figure «prueba»

8 Indent Sections

Extension:IndentSections: https://www.mediawiki.org/wiki/Extension:IndentSections

The IndentSections extension causes all sections to be automatically indented as if they were inside nested blockquotes.

Utilizando esta extensión, cada subsección será generada con una sangría (Indentation). Esto es muy conveniente para que la página pueda ser leída con facilidad.

La extensión que se encuentra en la link de arriba no funciona correctamente, pues no general la indentation de manera automática, sino que Se debe colocar <blockquote> antes de la parte que queremos identar y cerramos el bloque identado con </blockquote>

La solución se encuentra descrita en la página «talk» de esta extensión: https://www.mediawiki.org/wiki/Extension_talk:IndentSections

El código propuesto en dicha página lo hemos colocado en la carpeta de la extensión en un archivo que hemos llamado: IndentSections2.php

El código propone dos formas de hacer la indentation. Además, el código es tan corto que es fácil editarlo para cambiar, por ejemplo, el tamaño de la indentation.

Este código podría generar errores en el MediaWiki ya que no es una extensión mantenida y actualizada. Sin embargo, parece estar funcionando decentemente, a pesar de que ya me ha generado algunos errores:

  • Cuando traté de colocar algunos ejemplos de los cuadros generados para las páginas bases de Ciencia, Política-Historia etc, la SideBar fue desplazada hacia la derecha.
  • También cuando traté de generar líneas y áreas de colores entre nombres de secciones de la forma mostrada en el siguiente código, se desplazaron hacia la derecha los textos desplegados al final de cada págian:
// Texto que fue desplazado: 
Esta página fue modificada por última vez el 31 ago 2017 a las 17:38.
Política de privacidad  Acerca de Sinfronteras Aviso legal Versión para móvile
{| style="color: black; background-color: #9370DB; width: 100%;"
| colspan="2" | 
|}
{| style="color: black; background-color: #D8BFD8; width: 100%;"
| colspan="2" |

==Líneas de división==
|}

For greater control over styling nested sections, see https://www.mediawiki.org/wiki/Extension:StyleByHeaderTree

9 Extensión para definir variables

The Variables extension allows you to define a variable on a page, use it later in that same page or included templates, change its value, possibly to a value given by an expression in terms of the old value, etc.

https://www.mediawiki.org/wiki/Extension:Variables

Assigning a value to a variable:

#vardefine

{{#vardefine:variablename|specifiedvalue}}

Assigns the value specifiedvalue to the (already existing or hereby introduced) variable variablename:

Example:
{{#vardefine:iconwidth|25}} making iconwidth = 25
#vardefineecho

{{#vardefineecho:variablename|specifiedvalue}}

Works exactly as #vardefine, but the affected value is printed:

Example:

making iconwidth = <code>{{#vardefineecho:iconwidth|25}}</code>


Retrieving the value of a variable:

#var

The value of the variable variablename is produced by:

{{#var:variablename}}

10 Tamaño de letra - font size

El tamaño de la letra puede ser cambiado a través de plantillas como esta: https://en.wikipedia.org/wiki/Template:Big

He importado la plantilla big.

{{big|Will make the text here larger}} : Will make the text here larger

11 Eliminar la numeración en la TOC

En http://perso.sinfronteras.ws/index.php/MediaWiki:Common.css se debe colocar:

.noautonum .tocnumber { display: none; }

Y en la página donde no queremos que las secciones sean numeradas en la TOC:

<div class="noautonum">__TOC__</div>

12 Subir archivos

12.1 Pré-requis et configuration

Ver el handbook del stage

12.1.1 S’assurer que l’option de chargement de fichiers est activée en PHP

Pour cela il faut fixer file_uploads = On dans le fichier php.ini qui se trouve dans l’un des fichiers listé ci-dessous :

/etc/php/php.ini, /etc/php4/php.ini /etc/php5/cli/php.ini, /etc/php5/apache2/php.ini

OpenSUSE 11.2 : /usr/local/lib/php.ini

En Win32 C:\Windows\php.ini

12.1.2 Vérifier les droits du répertoire

Les droits du répertoire /images de MediaWiki doivent être configurer tel que 755.

Si l’option de save_mode est mise en place, on doit s’assurer que le répertoire /images appartient à l’utilisateur qui exécute le script php (c’est-à-dire, l’utilisateur Apache):

sudo chown -R www-data:www-data images/
o
sudo chown -R www-data images/

12.1.3 Activer le chargement de fichiers en ligne

En LocalSettings.php il faut configurer:

$wgEnableUploads = true; # Enable uploads

12.1.4 Para permitir la subida de archivos con extensiones diferentes a las permitidas por defecto

Se debe editar o agregar la siguiente variable al LocalSettings.php: https://www.mediawiki.org/wiki/Manual:$wgFileExtensions/fr

$wgFileExtensions = array(
   'png', 'gif', 'jpg', 'jpeg', 'jp2', 'webp', 'ppt', 'pdf', 'psd',
   'mp3', 'xls', 'xlsx', 'swf', 'doc','docx', 'odt', 'odc', 'odp',
   'odg', 'mpp'
   );

12.1.5 Cambiar el tamaño máximo de los archivos cargados en el wiki

https://www.mediawiki.org/wiki/Manual:Configuring_file_uploads/fr#Set_maximum_size_for_file_uploads

By default, the configuration code in php.ini limits the size of files to be uploaded to 2 megabytes (and the maximum size of a post operation to 8 megabytes). To allow uploading of larger files, edit these parameters in php.ini:

   post_max_size = 8 megabytes large by default
   upload_max_filesize = 2 megabytes large by default

Locating the php.ini file

The location of the php.ini file varies on the distribution you are using. (Try "locate php.ini" or "php -i" to find the location of your config file.)

It is important to change the php.ini file in the apache2 folder. For example, there may be a core default php.ini at:

/etc/php5/cli/php.ini as well as one at /etc/php5/apache2/php.ini

If you are using mod_php (most common), the most likely location for the correct php.ini file is in:

/etc/php5/apache2 or /etc/php/7.0/apache2

For php-fastcgi, edit /etc/php5/cgi/php.ini.

En mi caso el archivo php.ini se encuentra en: /etc/php/7.2/apache2

You may need to restart Apache or IIS after altering your PHP or web server configuration. (sudo /etc/init.d/apache2 restart in Linux, for example.)

13 Configurar la pemisología de los usuarios

Wiki privado o Wiki público

Para permitir que usuarios anónimos tengan acceso a visualizar o editar páginas, debemos editar las siguientes variables en el LocalSettings.php:

Para un Wiki Privado:

# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;

Si queremos, por ejemplo, que usuarios anónimos puedan ver las páginas:

$wgGroupPermissions['*']['read'] = true;

14 Cambiar la página principal-mainpage-homepage

Editar: MediaWiki:Mainpage

How do I change which page is the main page?

By default, MediaWiki looks for a page with the title Main Page and serves this as the default page. This can be changed by altering the contents of MediaWiki:Mainpage to point to a different title. If this does not change the 'Main Page' link included on the sidebar at install time, edit MediaWiki:Sidebar. https://www.mediawiki.org/wiki/Manual:FAQ#How_do_I_change_which_page_is_the_main_page.3F

Ver también: http://www.mediawiki.org/wiki/Thread:Project:Support_desk/How_to_change_the_default_Main_Page_title_and_the_URL

15 Permitir la visualización de algunas páginas en un Wiki privado para usuarios sin cuentas

Colocar la siguiente orden en el LocalSettings.php http://stackoverflow.com/questions/18255768/how-to-deny-access-to-all-pages-and-allow-only-for-certain-on-wiki

# allow everyone read access to these pages:
$wgWhitelistRead = array( "Main Page", "Public stuff" );

16 Páginas especiales y .css

http://perso.sinfronteras.ws/index.php/Especial:PáginasEspeciales

http://perso.sinfronteras.ws/index.php/MediaWiki:Common.css

http://perso.sinfronteras.ws/index.php/Usuario:Adelo_Vieira/skin.css

16.1 Para ver la versión de MediaWiki instalada y las extensiones adicionadas

http://perso.sinfronteras.ws/index.php/Especial:Versión

16.2 Personalizar el formato de los títulos de las secciones

https://en.wikipedia.org/wiki/Help:Section

https://www.siteground.com/kb/how_to_change_the_font_color_for_the_headings_in_mediawiki/

16.3 Customize the sidebar

http://perso.sinfronteras.ws/index.php/MediaWiki:Sidebar

https://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Customize_the_sidebar

http://www.mediawiki.org/wiki/Manual:Interface/Sidebar#Sidebar_width_in_Vector_skin_.28CSS.29

Para generar la página CV tuve que hacer cambios en MediaWiki:Common.css

16.3.1 Cambiar el espesor de la sidebar in vector skin

En los dos links anteriores se muestra como hacerlo, pero los cambios se realizan en todas las páginas y yo quiero hacerlo sólo en una página.

16.4 Oculta el título de una página

Colocar la siguiente línea en http://wiki.sinfronteras.ws/index.php/MediaWiki:Common.css

body.page-Ciencia h1.firstHeading { display: none; }

16.5 Realizar cambios en una sóla página

http://www.mediawiki.org/wiki/Manual:FAQ/tr

No tratra el caso específico del espesor de la sidebar

17 Descargar extensiones del sitio oficial de MediaWiki

https://www.mediawiki.org/wiki/Special:ExtensionDistributor

18 Editar y dar formato a las páginas

https://www.mediawiki.org/wiki/Help:Formatting

18.1 Tachar y subrayar

<strike>Tachar</strike> Tachar

<u>subrayar</u> subrayar

18.2 Centrar

You can use text-align: center to center your text:

<div style="text-align: center; border: 1px dotted gray;">Some text</div>
Some text


You can use margin-left: auto; margin-right: auto to center blocks such as divs:

<div style="margin-left: auto; margin-right: auto; width: 20em; border: 1px dotted gray">Content</div>
Content


The <center> tag is defined in HTML but is deprecated in (Strict) XHTML. Usage is not recommended.

18.3 Salto de línea

MediaWiki ignora los saltos simples de linea. Para empezar un nuevo párrafo, deje una linea vacía. Se puede forzar un salto de linea en medio de un párrafo con la etiqueta HTML <br /> https://www.mediawiki.org/wiki/Help:Formatting/es

19 Links

https://www.mediawiki.org/wiki/Help:Links

Setting an internal link anchor para poder hacer un liks hacia cualquier parte de una página:

<div id="NameOfAnchorHere">optional text</div>

Omit the "optional text" for invisible anchor.

Luego creamos el link como si se tratara de un párrafo: [[Nobre de la página#NameOfAnchorHere|otro texto]]

19.1 Links entre el Wiki y la computadora desde donde se accede al Wiki

<file>/home/adelo/Escritorio/sismique.pdf</file>

<file>/home/adelo/Imágenes.zip</file>

<file>/home/adelo</file>

<file>/home/adelo/chronopost</file>

<file>/home/adelo/Descargas/11028805_329313270600181_1631282655_o.jpg</file>

19.2 Links entre el Wiki y un servidor

http://perso.sinfronteras.ws/extensions/

http://perso.sinfronteras.ws/1-archivos/notas

19.3 Links entre MediaWiki y una computadora (local)

https://www.mediawiki.org/wiki/Extension:FileProtocolLinks

The FileProtocolLinks extension renders links to local shares on a (corporate) intranet. It can also be used to render links to any resource in your filesystem if you are running a personal wiki on your localhost.

https://www.mediawiki.org/wiki/Extension:FileProtocolLinksLinux

19.4 Links to a mediawiki file

[[Media:Example.jpg]]

[[Media:Example.jpg|Sunflowers]]

Link to a file description page:

[[:File:Example.jpg]]

20 Palabras mágicas (comandos)

Help:Palabras mágicas: https://www.mediawiki.org/wiki/Help:Magic_words/es

20.1 Comentarios en área de edición

<!-- Esto es un comentario -->

20.2 Si queremos que aparezca el texto de un comando

El comando no será procesado sino que éste aparezca impreso en la página de lectura:

<nowiki>

o para códigos: <pre>

20.3 Oculta el enlace 'editar' junto a los encabezados

__NOEDITSECTION__

21 Transclusion: Inclusión de una parte del contenido (cualquier texto) de una página en otra página

21.1 A través de los template

https://www.mediawiki.org/wiki/Transclusion

{{template name}}

21.2 Desde cualquier página - Extension:Labeled Section Transclusion

https://www.mediawiki.org/wiki/Extension:Labeled_Section_Transclusion

{{#lst:Mis páginas|Idiomas}}


22 Videos Mediawiki

En esta página se encuentran todas las extensiones relacionadas con vídeos: https://www.mediawiki.org/wiki/Category:Video_player_extensions

22.1 MultimediaPlayer

https://www.mediawiki.org/wiki/Extension:MultimediaPlayer

The MultimediaPlayer plays a list of multimedia files. It is intended for use with multimedia items hosted by an external service - not stored in the wiki.


YouTube test

22.2 MediawikiPlayer

https://www.mediawiki.org/wiki/Extension:MediawikiPlayer

The MediawikiPlayer extension embeds the JW FLV Media Player into a wiki page and supports multiple formats like FLV, MP4 (H264/AAC), MP3, Youtube-related formats, various streaming server-related formats and various XML playlists formats.

It is, however, licensed under a non-free CC BY-NC-SA license with noncommercial restrictions.

Para instalarla se debe descargar el JW Player de la página www.jwplayer.com. Hay que registrarse en el sitio e ingresar a "License Keys & Downloads". Ahí se puede obtener una versión del JM Player y obtener una License Key. Luego de descargar el JWPlayer, debemos colocar los archivos:

  • player.swf
  • jwplayer.js

en el directorio de instalación de la extensión.

Ahora, como se indica en la página de Discusión de la extensión:

https://www.mediawiki.org/wiki/Extension_talk:MediawikiPlayer#Where_to_put_the_jsplayer_license_key_for_JwPlayer_v7

En la línea 218 del MediawikiPlayer.php:

$code .= "jwplayer($wgMWPlayerIDJS).setup({flashplayer: $playerUrl";

hay que ingresar el License Key. En mi caso, utilizando el código de licencia disponible en www.jwplayer.com:

$code .= "jwplayer($wgMWPlayerIDJS).setup({flashplayer: $playerUrl, key:'ZS3YdyCA6nL2bf5KbP/7Ro4Tt/mp8AG9X/HTNg=='";

De esta forma pude integrar un vídeo de youtube a través de la siguiente orden:

<mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>

<mediaplayer>http://www.youtube.com/watch?v=y8Kyi0WNg40</mediaplayer>


22.3 Extension:YouTube

22.4 Extension:EmbedVideo

https://www.mediawiki.org/wiki/Extension:EmbedVideo


23 Color de texto y de fondo

https://meta.wikimedia.org/wiki/Help:Text_color

https://meta.wikimedia.org/wiki/Wiki_color_formatting_help

Set text color by using TEXT

Set background color by using TEXT : <span style="background:#00FF00"> TEXT </span>

Set both by using TEXT : <span style="color:#FFFFFF; background:#483D8B"> TEXT </span>

24 Customize lists

Para cambiar el espacio vertical entre bullets y la identation:

<ul style="padding-left:23px">
    <li style="margin-bottom: 20px;">[[Supervised Machine Learning for Fake News Detection]]</li>
    <li style="margin-bottom: 20px;">[[Zoo Management System]]</li>
    <li style="margin-bottom: 20px;">[[Java Stock Market Simulator]]</li>
    <li style="margin-bottom: 20px;">[[Airline Management System]]</li>
    <li style="margin-bottom: 20px;">[[Library Management System]]</li>
    <li style="margin-bottom: 20px;">[[Seismic Wave Propagation Modelling]]</li>
</ul> 


To start a numeric list from a particular number:

<li value="4"></li>
<ol start="50">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol> 


Para customize espacios, color, etc, de una sección:

<div style="
 color: white;
 border: white;
 padding-top: 0px;
 padding-right: 0px;
 padding-bottom: 0px;
 padding-left: 23px;
 ">
{{#lst:Mis páginas|geo}}
</div>

25 Display numbers in titles (headings)

Mostrar la numeración de los títulos de secciones (encabezados)

25.1 En todas las páginas: Configurando las preferencias del usuario

http://serverfault.com/questions/248942/how-can-i-configure-mediawiki-to-display-numbers-in-titles

User PREFERENCES -> MISC -> check Auto-numbering of heading.


También encontré esta forma pero no lo he probado:

If you want to add it by default for all users add a line:

$wgDefaultUserOptions['numberheadings'] = 1;

O éstas:

$wgExtensionFunctions[] = 'wfNumberHeadings';
function wfNumberHeadings() {
    global $wgUser;
    $wgUser->setOption('numberheadings', true);
}

to your LocalSettings.php.

25.2 En algunas páginas

Para desplegar la numeración de los títulos de las secciones en sólo algunas páginas existe la extensión MagicNumberedHeadings

https://www.mediawiki.org/wiki/Extension:MagicNumberedHeadings

Luego de instalarla la extensión no funcionaba. El Wiki mostraba un error y no cargaba ninguna página.

Leyendo en el área de Discussion (https://www.mediawiki.org/wiki/Extension_talk:MagicNumberedHeadings) encontré un código un poco más actualizado de la extensión. Realicé el cambio y luego de esto el Wiki sí cargaba. Sin embargo al intentar utilizar la extensión a través de , se generaba nuevamente un error y el Wiki se desactibaba.

En la misma área de Discussion encontré una actualización más reciente en la cual se sugería realizar un pequeño cambio en el código:

The code cannot directly access ParserOptions any longer.
$parser->mOptions->mNumberHeadings = (TRUE);
should become
$parser->mOptions->setNumberHeadings(true);
I'd make this change on the main page, but I am unsure of the effect in earlier versions of MW.
Chiefgeek157 (talk) 15:11, 8 February 2016 (UTC)
It seems to work in MW 1.25.2. I'll check it out in MW 1.26. Пика Пика (talk) 08:40, 25 February 2016 (UTC)

Luego de realizar dicho cambio la extensión funciona correctamente


Ver también:

http://www.gossamer-threads.com/lists/wiki/mediawiki/232559

https://www.mediawiki.org/wiki/Thread:Project:Support_desk/Per-page_Auto-number_headings/reply

26 Líneas de división


Pruebas de líneas de división


Líneas de división

27 Creación de tablas

https://www.mediawiki.org/wiki/Help:Tables/es

https://www.mediawiki.org/wiki/Help:Tables

27.1 Modelo de cuadros/tablas

Device Interface IP Address Subnet Mask Default Gateway
R1 G0/1 172.16.99.1 172.16.99.1 172.16.99.1 172.16.99.1 255.255.255.0 N/A
S1 VLAN 99 172.16.99.11 255.255.255.0 172.16.99.1
PC-A NIC DHCP DHCP DHCP


{| class="wikitable"
!Header 1
!Header 2 
|-
|Bread & Butter
|Pie
|-
|Cheese
|Ice cream
|}
Header 1 Header 2
Bread & Butter Pie
Cheese Ice cream
{| class="wikitable"
! Standard      ||Frequency band        ||Max speed
|-
|802.11         ||2.4 GHz               ||2 Mbps
|-
|802.11a        ||5 GHz                 ||54 Mbps
|-
|802.11b        ||2.4 GHz               ||11 Mbps
|-
|802.11g        ||2.4 GHz               ||54 Mbps
|-
|802.11n        ||2.4 or 5 GHz          ||600 Mbps
|-
|802.11ac       ||5 GHz                 ||1 Gbps
|}
Standard Frequency band Max speed
802.11 2.4 GHz 2 Mbps
802.11a 5 GHz 54 Mbps
802.11b 2.4 GHz 11 Mbps
802.11g 2.4 GHz 54 Mbps
802.11n 2.4 or 5 GHz 600 Mbps
802.11ac 5 GHz 1 Gbps


{| class="wikitable"
|bgcolor="#EEE8AA"|Book            ||bgcolor="#EEE8AA"|Serial          ||Borrower
|-
|bgcolor="#EEE8AA"|accessionNumber ||bgcolor="#EEE8AA"|accessionNumber ||name
|-
|bgcolor="#EEE8AA"|ISBNnumber      ||bgcolor="#EEE8AA"|ISBNnumber      ||studentNumber
|-
|bgcolor="#EEE8AA"|title           ||bgcolor="#EEE8AA"|title           ||
|-
|bgcolor="#EEE8AA"|authors         ||bgcolor="#EEE8AA"|authors         ||
|-
|bgcolor="#EEE8AA"|location        ||bgcolor="#EEE8AA"|location        ||
|-
|bgcolor="#EEE8AA"|pricePaid       ||bgcolor="#EEE8AA"|pricePaid       ||
|-
|bgcolor="#cc99ff"|edition         ||bgcolor="#cc99ff"|editor
|-
|bgcolor="#cc99ff"|referenceOnly   ||bgcolor="#cc99ff"|issueDate
|}
Book Serial Borrower
accessionNumber accessionNumber name
ISBNnumber ISBNnumber studentNumber
title title
authors authors
location location
pricePaid pricePaid
edition editor
referenceOnly issueDate
Ciencia
Ciencia
Ciencia


Encabezado

Cuerpo


Ciencia






Ciencia
Ciencia


Ciencia
Ciencia

27.1.1 Modelo cuadros de traducción

Cálculo del espesor de cada columna:

Si el 100% representa 1 pantalla. El 355% cuantas pantallas representan:

100  →  1
355  →  3.55

Ahora que el 100% son 3,55 pantallas, que porcentaje de ese 100% equivale a 1 pantalla:

100    →  3.55
28.17  →  1

Por tanto, el espacio restante debe ser: 100-24.169 = 71.83

Y cada una de las otras dos pantallas tendrá un porcentaje de Aprox.: 71.83/2 = 35.915

No existe traducción en Inglés

No existe traducción en francés

No existe traducción en español

Subject: Unsolicited Application Letter

Objet: Candidature spontanée

TEXTO en español

Subject: Unsolicited Application Letter

Objet: Candidature spontanée

TEXTO en español

Subject: Unsolicited Application Letter

Objet: Candidature spontanée

TEXTO en español

27.2 Importar tablas de Excel

https://www.iarp.ca/scripts/41-excel-to-mediawiki-table-generator

http://excel2wiki.net/index.php

27.3 Creación de tablas interactivamente a través de una aplicación Web

http://www.tablesgenerator.com/mediawiki_tables#

28 TOC

28.1 Multi-page table of contents

http://www.gossamer-threads.com/lists/wiki/mediawiki/134478

https://www.mediawiki.org/wiki/Extension:ExtIdx_%28Extended_Index%29

http://www.chaosreligion.com/wiki/ExtIdx

28.2 Multiple TOC with MediaWiki using section headings in single page - TOC Limited to showing only H1 and H2

http://webmasters.stackexchange.com/questions/35127/multiple-toc-with-mediawiki-using-section-headings-in-single-page

28.3 Extension:TocTree

https://www.mediawiki.org/wiki/Extension:TocTree

Colapsa las subsecciones y coloca un [+] al inicio de la sección que permite desplegar las subsecciones.

La siguiente línea en el LocalSettings.php hace que la TOC sea flotante. Es decir que el texto del artículo comience desde la parte superior de la página al lado de la TOC:

$wgDefaultUserOptions['toc-floated'] = true;

Sin embargo, no me parece apropiada la medida anterior, porque la TOC flotante queda limitada a tener un ancho específico, razón por la cual los títulos de secciones que superen este ancho serán desplegados en varias líneas. Esto genera en ocasiones TOC muy largas, y me ha parecido que no es apropiado para la lectura. Me parece que se lee mucho mejor la TOC cuando cada título de sección abarca una sólo línea, que es el caso por defecto en MediaWiki.

Ahora, si ajustamos la característica de TOC flotantes, pero no queremos que la TOC sea flotante en un artículo en particular, se debe coloar la siguiente orden en el artículo:

<div class="noFloat">__TOC__</div>

Sin embargo, tempoco me parece apropiada esta opción porque, si bien la orden que evita que la TOC sea flotante, la TOC siguirá estando limitada a tener un ancho específico.

29 Visualización en teléfonos

Extension:MobileFrontend

https://www.mediawiki.org/wiki/Extension:MobileFrontend

30 Manual:Creating pages with preloaded text

https://www.mediawiki.org/wiki/Manual:Creating_pages_with_preloaded_text