RandomArea
Is an extension for MediaWiki for multiple random contents.
Example MW code:
<randomArea >
Klaus
Mark
Otto
</randomArea>
Shows one of the contents on each cach flush of media wiki page or article.
<randomArea count="2" >
Klaus
Mark
Otto
</randomArea>
Shows two of the contents, but never the same twice. It shows e.g. “MarkPaul” or “OttoMark” or …
You can use it with inclusion other articles with or without inclusion syntax
<randomArea include="1" >
Klaus
Mark
Otto
</randomArea>
produces Mediawiki syntax like: “{{:Mark}}” or “{{:Otto}}”
<randomArea include="1" nsPrefix="MyRandPrefix:" >
Klaus
Mark
Otto
</randomArea>
produces a Mediawiki syntax “{{:MyRandPrefix:Klaus}}” …
<randomArea>
{{:MyRandPrefix:Klaus}}
{{:MyRandPrefix:Mark}}
{{:MyRandPrefix:Otto}}
</randomArea>
produces the same like the upper vatiant.
Download
- RandomArea.php (1.0)
on September 27th, 2006 at 1:50 pm
http://www.mediawiki.org/wiki/Extension:RandomArea
on November 21st, 2006 at 1:59 pm
Having a bit of trouble using it in table cells.
What I want is a random selection of images one per cell.
When I use the cel start character | it comes out as ouptut on th page and is not interpreted as a cell start.
andy
on November 21st, 2006 at 3:11 pm
The code above works or what do you mean?
on February 22nd, 2007 at 7:22 am
any way of getting this to work with the codes?
on February 22nd, 2007 at 7:22 am
I meant to put the code…
on February 22nd, 2007 at 7:23 am
Code keeps vanishing how about if I say youtube
on March 13th, 2007 at 8:37 pm
sorry, no idea what you are meaning
on February 14th, 2008 at 5:35 pm
Whoa, this extension has some MAJOR bugs.
It totally breaks the wiki if you try to randomly output anything that has only 1 character, like a single digit.
So inserting
1
2
3
4
generates an endless loop. Seriously, check your code before you upload it anywhere.
My patch:
Search for “if (strlen($randTemp) > 1 && !array_key_exists($randVal, $valueIndex)) {”, replace with “if (strlen($randTemp) >= 1 && !array_key_exists($randVal, $valueIndex)) {”.
Search for “$valueIndex[$randVal] = true;
$i++;
}”, replace with “$valueIndex[$randVal] = true;
}
$i++;”.
on July 26th, 2009 at 9:30 pm
Why not edit the source code with this last reply? It’s over a year that this is clear and still not updated.
on July 30th, 2009 at 3:57 pm
ups you are right. I moved all contents to the mediawiki pages and edit the src there.
on May 28th, 2010 at 4:44 pm
UpFuTf http://f8j3ndYbs83Bbq06Wlavp.com