This page is a translated version of the page Extension:EntreCard and the translation is 33% complete.
Other languages:
English • ‎Türkçe • ‎español • ‎polski • ‎العربية • ‎中文 • ‎日本語
Podręcznik rozszerzeń MediaWiki
OOjs UI icon advanced.svg
Status wydania: niewspierane
Opis EntreCard extension allow you to put EntreCard widgets on your Wiki pages.
Autor(zy) Jung Lee aka Max Lee (zedomax~mediawikiwikidyskusja)
Ostatnia wersja 0.1
MediaWiki 1.36 Not formally tested
MediaWiki 1.34 Not formally tested
MediaWiki 1.32 Not formally tested
Licencja Nie określono
Pobieranie Pobieranie

Sprawdź wykorzystywanie i matrycę wersji.

What can this extension do?

EntreCard extension allows you to put EntreCard widgets on your wiki pages.


Use the following wiki syntax in your pages.

Set the id for your campaign and size.

<entrecard id="10" size="127"></entrecard>


To install this extension, add the following to LocalSettings.php :



 * EntreCard extension for MediaWiki
 * @version 0.1
 * @author Max Lee
 * @link https://www.mediawiki.org/wiki/Extension:EntreCard

//Extension credits that show up on Special:Version 
$wgExtensionCredits['parserhook'][] = array(
	'name' => 'EntreCard',
	'author' => 'Max Lee',
	'url' => 'https://www.mediawiki.org/wiki/Extension:EntreCard',
	'version' => '0.1',
	'description' => 'Allows you to put [http://entrecard.com EntreCard] widgets on your wiki pages',

//Avoid unstubbing $wgParser too early on setHook() on modern (1.12+) MW versions, as per r35980
	$wgHooks['ParserFirstCallInit'][] = 'wfEntreCard';
} else {
	$wgExtensionFunctions[] = 'wfEntreCard';

//Registers the <entrecard> tag with the WikiText parser
function wfEntreCard() {
	global $wgParser;
	$wgParser->setHook( 'entrecard', 'renderEntreCard' );
	return true;

//The callback function for converting the input text to HTML output
function renderEntreCard( $input, $argv ) {
	$output = '<script type="text/javascript" src="http://entrecard.s3.amazonaws.com/widget.js?user_id='.htmlspecialchars($argv["id"]).'';
	$output .='&type=standard_'.htmlspecialchars($argv["size"]).'" type="text/javascript" id="ecard_widget">"';
	$output .= '</script>';
	return $output;

Sites using this extension