Difference between revisions of "Extension:MarketResearch"

From Organic Design wiki
m (new extension)
 
({{php}{{Category:Extensions|MarketResearch}})
Line 1: Line 1:
 
<?php
 
<?php
# To activate the extension, include it from your LocalSettings.php
+
# To activate the extension, include it from your LocalSettings.php{{php}{{Category:Extensions|MarketResearch}}
 
# with: include("extensions/marketresearch.php");
 
# with: include("extensions/marketresearch.php");
  

Revision as of 21:06, 10 July 2008

<?php

  1. To activate the extension, include it from your LocalSettings.php{{php}
Info.svg These are the MediaWiki extensions we're using and/or developing. Please refer to the information on the mediawiki.org wiki for installation and usage details. Extensions here which have no corresponding mediawiki article are either not ready for use or have been superseded. You can also browse our extension code in our local Subversion repository or our GitHub mirror.
  1. with: include("extensions/marketresearch.php");

// Extension credits that show up on Special:Version $wgExtensionCredits['parserhook'][] = array(

       'name' => 'marketresearch',
       'author' => 'wikiexpert',
       'url' => 'http://www.organicdesign.co.nz/Extension:Marketresearch',
       'description' => 'Display marketresearch'

);


$wgExtensionFunctions[] = "wfMarketresearch";

function wfMarketresearch() {

   global $wgParser;

   $wgParser->setHook( "Marketresearch", "renderMarketresearch" );

}

  1. The callback function for converting the input text to HTML output

function renderMarketresearch( $input ) {

   # Your Marketresearch Partner ID    # <<<<< EDIT HERE <<<<<
   $partner = "951781402";
   # have to parse data here


  # Building the code
$output = "<iframe src ='TBD' style='width:420px;height:640px;' scrolling='no' marginwidth='0' marginheight='0' frameborder='0'></iframe>";
   return $output;

}