Difference between revisions of "Extension:ImageHistoryClear"
From Organic Design wiki
(results of the two print_r's are identical hence regex not working) |
m |
||
Line 27: | Line 27: | ||
function efImageHistoryClear (&$out) { | function efImageHistoryClear (&$out) { | ||
− | $jktext = | + | $jktext = $out->mBodytext; |
print_r($jktext); | print_r($jktext); | ||
preg_replace ('%<h2 id="filehistory">.*<div class="printfooter">%s','<div class="printfooter">',$jktext); | preg_replace ('%<h2 id="filehistory">.*<div class="printfooter">%s','<div class="printfooter">',$jktext); |
Revision as of 05:56, 29 October 2008
<?php /**
* ImageHistoryClear extension - A extension made with Template:Extension to strip the image history and links from image pages. *Template:Php
* See http://www.mediawiki.org/wiki/Extension:ImageHistoryClear for installation and usage details * * @package MediaWiki * @subpackage Extensions * @author User:Jack * @copyright © 2008 User:Jack * @licence GNU General Public Licence 2.0 or later */
if (!defined('MEDIAWIKI')) die('Not an entry point.');
define('IMAGEHISTORYCLEAR_VERSION', '1.0.0, 2008-10-21');
$wgExtensionFunctions[] = 'efSetupImageHistoryClear';
$wgExtensionCredits['parserhook'][] = array(
'name' => 'ImageHistoryClear',
'author' => 'User:Jack',
'description' => 'A extension made with Template:Extension to strip the image history and links from image pages.',
'url' => 'http://www.organicdesign.co.nz/Extension:ImageHistoryClear',
'version' => IMAGEHISTORYCLEAR_VERSION
);
function efImageHistoryClear (&$out) { $jktext = $out->mBodytext; print_r($jktext);
preg_replace ('%