Help:DebateTree/ru

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
This page is a translated version of a page Help:DebateTree and the translation is 6% complete. Changes to the translation template, respectively the source language can be submitted through Help:DebateTree and have to be approved by a translation administrator.

DebateTree is a MediaWiki implementation of the DebateTree algorithm. It computes the status (sustained or refuted) of any argument out of the structure (rather than the content) of its debate tree. DebateTree is currently enabled on the English and Spanish Wikiversity (see Wikiversity:Wikidebate) and can be easily installed on any wiki.

Установка

To install DebateTree on any wiki, first create a template called "Argument" (or whatever) with the following basic wikitext:

<div lang="en" dir="ltr" class="mw-content-ltr">
<span class="debatetree">'''Argument'''</span>
</div>

Then create a template called "Objection" (or whatever) with the following basic wikitext:

<div lang="en" dir="ltr" class="mw-content-ltr">
<span class="debatetree">'''Objection'''</span>
</div>

Finally, add the following code to the MediaWiki:Common.js of your wiki:

/**
 * <span lang="en" dir="ltr" class="mw-content-ltr">Initialization script for DebateTree</span>
 * <span lang="en" dir="ltr" class="mw-content-ltr">Documentation at https://commons.wikimedia.org/wiki/Help:DebateTree</span>
 */

// <span lang="en" dir="ltr" class="mw-content-ltr">Only load on debate pages</span>
if ( $( '.debatetree' ).length ) {

	// <span lang="en" dir="ltr" class="mw-content-ltr">Only load when viewing or previewing</span>
	var action = mw.config.get( 'wgAction' );
	if ( action === 'view' || action === 'submit' ) {

		// <span lang="en" dir="ltr" class="mw-content-ltr">Load the code directly from Commons</span>
		mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:DebateTree.js&action=raw&ctype=text/javascript' );
		mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:DebateTree.css&action=raw&ctype=text/css', 'text/css' );
	}
}

Then you can start building debate trees with the following wikitext pattern:

<div lang="en" dir="ltr" class="mw-content-ltr">
*{{Argument}} Argument about something.
**{{Objection}} Objection to the argument.
***{{Objection}} Objection to the objection.
**{{Objection}} Second objection to the argument.
*{{Argument}} Second argument.
**{{Objection}} Objection to the second argument.
</div>

The key element of the templates is the debatetree class, which tells the DebateTree script that the current list item is an argument or objection, as opposed to other list items that may be present in the page, such as lists of external links or bibliography.

See also