Affenformular/Definition

Zur Navigation springen Zur Suche springen

PHP Code

<?php
  /**
   * MediaWiki extension: AffenForm
   * =============================
   *
   * To activate, edit your LocalSettings.php, 
   * save this code as 'AffenForm.php' and copy the file into the subdirectory Affen of your extensions-directory and add
   * require_once("$IP/extensions/Affen/AffenForm.php");
   */

  # User Settings

  # The following variables can be set in LocalSettings.php
  # before the line:
  # require_once("$IP/extensions/Affen/AffenForm.php");

  # Parameter
  
  # default   ...  Standardbelegung für Eingabefeld

  # End User Settings
  
        define("AFFEN_NAME",  "affen");      # Name of tag
        define("AFFEN_EXT_NAME",  "AffenForm");    # Name of extension
        define("AFFEN_IDENTIFIER", "sendAffen");  # Name of POST identifier flag
        define("AFFEN_HOOK", "hookAffen");    # Name of hook

  if ( !defined( 'MEDIAWIKI' ) ) {
           die( "This is not a valid entry point.\n" );
  }

  $wgExtensionCredits['parserhooks'][] = array(
           'path' => __FILE__,
           'name' => AFFEN_NAME,
           'version' => '0.0.1',
           'author' =>$AFFEN_AUTH, 
           'url' => "$wgServer$wgScriptPath/index.php/Extension:" . AFFEN_EXT_NAME,
           'description' => 'erzeugt ein Affenformular'
  );
        $wgExtensionFunctions[] = 'wfAffenFormExtension';

  /*
   * Setup AffenForm extension.
   * Sets a parser hook for <AFFEN_NAME></AFFEN_NAME>.
   */
  function wfAffenFormExtension() 
  {
    new AffenForm();
  }