Extension:Approved Revs/es

Aprobado Revs es una extensión que permite a los administradores marcar una cierta revisión de una página como "aprobada". La revisión aprobada es la que se muestra cuando los usuarios ven la página con su URL principal.

Approved Revs fue diseñada para una alternativa más simple y ligera que la extensión. FlaggedRevs es una extensión muy rica en características que provee no solo aprobaciones de revisiones sino también características relacionadas y de revisión; define 4 derechos de usuario, 3 grupos de usuario, 15 variables globales, 3 tipos de registro, 11 páginas especiales y 9 tablas de base de datos (en contraste, Approved Revs define 3 derechos de usuario, ningún grupo de usuario, 7 variables globales, 1 tipo de registro, 1 página especial y 2 tablas de base de datos). Si manejas un wiki a larga escala, digamos, como Wikipedia, donde la decisión de cuál revisisón se debe mostrar como la "oficial" tiene que tomarse por, o al menos aceptarse por muchas personas, FlaggedRevs es probablemente la mejor herramienta para utilizar. Sin embargo, si manejas un wiki a escala media o corta, con sólo unos pocos administradores, Approved Revs puede ser la solución más apropiada.

Incluso si una revisión es aprobada, la mayoría de las extensiones que recuperan el contenido de las páginas seguirán obteniendo la última revisión, y no la aprobada (si son diferentes). Sin embargo, las extensiones que obtienen datos específicos de páginas, como, y , mostrarán los datos correctos, afortunadamente.

Descargar
Puedes descargar el código de Approved Revs en formato .zip aquí.

También puedes descargar el código directamente vía Git desde el repositorio de código de MediaWiki. Desde una línea de comando, puedes llamar lo siguiente:

Para ver el código en línea, incluyendo el historial de versiones de cada archivo, ve a diffusion/EARE/browse/master/.

Instalación
Para instalar esta extensión, crea un directorio ' ' (ya sea al extraer un archivo comprimido o descargándolo con Git) y coloca este directorio dentro del directorio 'extensions' principal de MediaWiki. Luego, en el archivo ' ' añade la siguiente línea:

También necesitarás instalar dos tablas de base de datos para esta extensión: "approved_revs" y "approved_revs_files". Puedes hacer esto en una o dos maneras: ya sea ejecutar el script "" en el directorio /maintenance de MediaWiki, o llamar a SQL directamente en tu base de datos. Puedes encontrarla en los archivos  y , ambos localizados en el directorio /sql de la extensión.

Si estás ejecutando una versión de Approved Revs más antigua que la 1.4, y estás actualizándola a la versión 1.4 o posterior, necesitarás llamar a update.php otra vez, para tener la estructura más nueva de la tabla de base de datos.

Finalmente, existen los siguientes derechos de usuario definidos para Approved Revs:


 * ' ' - El permiso para aprobar o desaprobar revisiones de páginas. Por defecto se le da a todos los miembros del grupo 'administrador'.
 * ' ' - El permiso para ver una nota en la parte superior de las páginas que tienen una revisión aprobada, explicando que lo que el usuario está viendo no es necesariamente la última revisión. Por defecto se le da a todos (es decir, *).
 * ' ' - El permiso para ver otra nota en la parte superior de páginas que tienen una revisión aprobada, declarando quién la aprobó. Por defecto se le otorga a todos los miembros del grupo 'administrador'.

Puedes modificar el conjunto de usuarios de cualesquiera de estos de estos permisos. For example, to have the "view most recent revision" link show up only for administrators, you could add the following, below the inclusion of Approved Revs:

Autores
Approved Revs fue escrita por Yaron Koren. Contribuciones de código importantes también fueron hechas por Raimond Spekking, Siebrand Mazeland, Jeroen De Dauw, Eli Handel, Andrew Engelbrecht, hashar, Anomie, Mark Hershberger, Flo, Addshore, James Montalvo, Fodagus, Kris Field y otros.

Uso
Una vez que la extensión esté instalada, cualquiera con el permiso ' ' verá un enlace que dice "(approve)" en cada línea de una página de historial. Hacer clic en ese enlace establecerá esa revisión como aprobada. If you then go back to the history page, you will see an "approve" link next to every other revision, along with an "unapprove" link for the approved revision; the approved revision's row will also have a star next to it. Clicking "approve" for any other revision will re-set the approval to that revision; while clicking "unapprove" will mean that there will no longer be an approved revision for this page.

Users without ' ' permission will see nothing special in the history page, other than a star icon on the approved revision's row.

By default, if a user with ' ' permission makes an edit to a page that already has an approved revision, that edit, i.e. the latest revision of the page, gets automatically marked as approved. By contrast, if a page has no approved revision (this of course includes new pages), automatic approvals will not be applied.

You can eliminate automatic approvals, thus requiring that every approval has to be done manually, by adding the following to  below the inclusion of Approved Revs:

A similar logic applies for new versions of files; these automatic approvals, too, can be turned off automatically with the following line:

Conversely, if you set " " or " " to true in  (see below), every edit to pages and/or files made by a user with ' ' permission becomes approved - even edits to pages/files that don't have an approved revision.

Manual revision approvals and unapprovals get stored in the 'approval' log; though approvals that happen automatically, as a result of someone with approval power editing a page, do not.

Special:ApprovedRevs page
Approved Revs defines a special page, " " which shows four separate lists:


 * pages whose approved revision is not their latest
 * all pages with an approved revision
 * "unapproved pages" (all pages without an approved revision)
 * pages with invalid approvals (such as pages in a namespace that was previously approvable but no longer is).

For the third list, of pages with no approved revision, you can optionally include a link for each page to mark that page's latest revision as approved. To include such links, add the following to :

Storage of approval information
Information about approvals - who made them, and when they were made - is stored in the "Revision approval" log, which can be viewed at the page Special:Log. Recent approvals are also shown in Special:RecentChanges.

Displaying unapproved pages as blank
If you want to, you can have pages that have no approved revision show up as blank - users will still be able to see all the revisions if they click on the "history" tab, but the main display will be a blank page. To do that, just add the following line to, anywhere after the inclusion of Approved Revs:

Similarly, you can set files with no approved version to not show up when embedded in other pages, by adding the following line:

Indicating unapproved pages
By default, pages with no approved revision simply show up normally, with no indication of their status. You can have such pages display a message at the top saying, "This is the latest revision of this page; it has no approved revision." To do that, add the following line to :

Setting pages as approvable
Some wiki pages can have their revisions approved, while others cannot; this is determined in one of three ways.

Setting all pages in a namespace as approvable
A global variable,, exists, which determines which namespaces are handled by the extension. This variable is an array, and by default it holds six namespaces:  (defined as 0, the main namespace),   (2, user pages),   (6, files),   (10, templates),   (12, help pages) and   (4, the project namespace, which usually has the same name as the wiki). You can add additional namespaces to this set - after the inclusion of Approved Revs in LocalSettings.php, add something like:

It is not recommended to add the Category or MediaWiki namespaces to this array, because, due to their special implementation in MediaWiki, approvals will not work correctly on those pages.

To remove default namespaces as approvable, set their value to false. For example, to make files unapprovable, add the following:

Making pages approvable with #approvable_by
Approved Revs defines the  parser function, which lets you define certain pages as being approvable by certain individual users and groups. For example, the following call would allow user Alice Jones, as well as users in the Bureaucrat and Sysop groups, to approve the page on which it was called:

Note that, if a user who is allowed to edit a page because of this parser function approves a revision before this function was added, then they will lose the ability to make any other approvals (since the approved revision does not contain this call), until an administrator comes in and undoes their action.

Setting pages approvable via magic word
Individual pages not within one of the specified namespaces can also be made approvable, by adding the  magic word anywhere within the page. It is recommended to add in this magic word to pages via a template. If  is added directly to a page, just be careful not to approve a revision of the page from before that string was added; this could lead to unexpected behavior.

Letting non-administrators "own" pages
Sometimes it's helpful to allow those without the general ' ' permission to be able to approve revisions of certain pages - in other words, to have ownership of certain pages. An obvious example is user pages - it makes sense to allow each user to be able to approve revisions on their own user pages. For namespaces other than "User", you can choose to have the user who originally created any page in that namespace be designated as the page owner, who then has revision-approval permission for that page.

To have this kind of "ownership" for a specific namespace, you need to add the namespace to the variable. To allow users to "own", i.e. be able to approve, pages in the main and user namespaces, for instance, you should add the following to LocalSettings.php:

A namespace needs to belong to  before it can be added to.

Displaying approval information
Approved Revs defines five "magic words" that can be used to display approval information about a specific page (or file). They are:


 * - the year in which the page was last approved
 * - the month in which the page was last approved
 * - the day of the month in which the page was last approved
 * - the full timestamp of the date/time in which the page was last approved
 * - the user who last approved the page.

All five can be simply called by themselves (which will return that information for the page on which the call is located), or called with a page name passed in (which will return that information for the specified page). So, for example, in the page "Main Page", the call  will display the year in which the page "Main Page" was last approved, while the call   will display the year in which the page "Employees list" was last approved.

If any of these magic words are called for a page that has no approved revision, or for a page that does not exist, they will simply not display anything.

The first four of these magic words can also be called for files; the last one, APPROVALUSER, unfortunately will not work.

Note that, if you began using Approved Revs before version 1.4, the first four magic words, which all have to do with the time in which the revision was made, will most likely display a blank for any page whose revision was approved while Approved Revs was still on an older version.

API
Approved Revs defines an API action, "approve", which lets you either approve or (if the extra parameter "unapprove" is added) unapprove any revision via the MediaWiki API. See here for an explanation of the syntax for this API.

Marking all pages as approved
For pages that do not yet have an approved revision, you may want to automatically approve their latest revision, as a way to quickly initialize their content. For that, you can use the command line script ' '. This script approves the latest revision of all pages that can be approved but do not have an approved revision. (The script has various optional flags, including one that lets you also handle pages that already do have an approved revision.)

File approvals
You can also approve file revisions with Approved Revs. It should be noted that only revisions to the actual file are approvable; revisions to the wikitext of the file pages are not. As such, approval of files is not done by clicking the "view history" link in the top-right of the file's page. Instead, scroll to the "File history" section near the bottom of the file page, and click "approve" on the right of the file history table.

When a version of an image is approved, that version is displayed when the image is included on other pages. For non-image uploads (e.g. PDFs), any links directly to the file will go to the approved version, not the latest.

Just like the  script, there is another script, , that exists specifically for file approvals.

Version history
Approved Revs is currently at version 1.7.3. See the entire version history.

Known issues

 * Approved Revs does not work for anonymous users with the extension - approving a revision leads to a "Deny_action" error, because have deny access to history.

Bugs and feature requests
Send any bug reports and requests to Yaron Koren (yaron57@undefinedgmail.com).

Contributing patches to the project
If you found some bug and fixed it, or if you wrote code for a new feature, please either do a Git commit for it, or create a patch by going to the " " directory, and typing:

git diff > descriptivename.patch

If you create a patch, please send it, with a description, to Yaron Koren.

Translating
Translation of Approved Revs is done through translatewiki.net. The translation for this extension can be found here: https://translatewiki.net/w/?title=Special:Translate&group=ext-approvedrevs. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.