Help:DebateTree

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Other languages:
English • ‎español • ‎українська • ‎العربية

DebateTree is a MediaWiki implementation of the dialectic 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.

Installation[edit]

To install DebateTree on any wiki, simply add the following code to the MediaWiki:Common.js of your wiki:

/**
 * Initialization script for DebateTree
 * Documentation at https://commons.wikimedia.org/wiki/Help:DebateTree
 */

// Only load on debate pages
if ( $( '.debatetree' ).length ) {

	// Load the CSS directly from Commons
	mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:DebateTree.css&action=raw&ctype=text/css', 'text/css' );

	// Only load the script when viewing or previewing
	var action = mw.config.get( 'wgAction' );
	if ( action === 'view' || action === 'submit' ) {
		mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:DebateTree.js&action=raw&ctype=text/javascript' );
	}
}

And that's it! You can now start building debate trees with the following syntax:

<div class="debatetree">
* Argument about something.
** Objection to the argument.
*** Objection to the objection.
** Second objection to the argument.
* Second argument.
** Objection to the second argument.
</div>

See also[edit]