Popular MediaWiki Extensions

Please forgive me if this is a novice question - I'm a neophyte when it comes to MediaWiki.

I'm looking for Video extensions to add to a MediaWiki project.  Some are probably popular and some are arcane.  For obvious reasons I would like to choose an extension that lots of other Wikis also use.  Examples here:

If this were a WordPress project, I would be able to see the popularity of plug-ins here:

Is there a way to find the popularity of MediaWiki extensions?  I've found lots "top-ten" lists, but I'd rather just get straight to the number of Wiki installations that use a given extension.

Thanks and regards,
LVL 111
Ray PaseurAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Typically these: https://www.mediawiki.org/wiki/Category:Extensions_used_on_Wikimedia get slowly integrated in new base release.
Assuming that there is a coloration between the number of page views for an extension page and the popularity of an extension, you can get the information you looking for by comparing the total number of page views over the past 30 days.

For each of the 27 pages in the category "Video player extensions" found here:

Add the page name to this end of this link:

Like this:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ray PaseurAuthor Commented:
@skij: Very helpful!

Extension:TimedMediaHandler       2,106
Extension:EmbedVideo              1,735
Extension:Widgets                 1,542
Extension:HTML5video                561
Extension:MediawikiPlayer           433
Extension:OggHandler                284
Extension:VideoFlash                248
Extension:Html5mediator             245
Extension:Player                    217
Extension:WidgetsFramework          136
Extension:Mp3                       129
Extension:FramedVideo               126
Extension:FlvHandler                106
Extension:FLVPlayer                 106
Extension:YouTubeTag                 97
Extension:MultimediaPlayer           93
Extension:Quicktime                  89
Extension:GoogleVideo                58
Extension:OFlash                     54
Extension:InteriaVideo               48
Extension:FLVPlayerTwo               43
Extension:SuperDeluxe                36
Extension:Vine                       27
Extension:VPIPPlugin                 25
Extension:Stage6                     22
Extension:YouTube+(emijrp)            0

Open in new window

<?php // demo/mwcounts.php
 * Get MediaWiki page statistics summary
 * http://www.experts-exchange.com/questions/28790419/Popular-MediaWiki-Extensions.html#a41166145
echo '<pre>';

$base  = 'http://stats.grok.se/json/www.w/latest30/';
$pages = array
( 'Extension:EmbedVideo'
, 'Extension:FlvHandler'
, 'Extension:FLVPlayer'
, 'Extension:FLVPlayerTwo'
, 'Extension:FramedVideo'
, 'Extension:GoogleVideo'
, 'Extension:Html5mediator'
, 'Extension:HTML5video'
, 'Extension:InteriaVideo'
, 'Extension:MediawikiPlayer'
, 'Extension:Mp3'
, 'Extension:MultimediaPlayer'
, 'Extension:OFlash'
, 'Extension:OggHandler'
, 'Extension:Player'
, 'Extension:Quicktime'
, 'Extension:Stage6'
, 'Extension:SuperDeluxe'
, 'Extension:TimedMediaHandler'
, 'Extension:TimedMediaHandler/ogv.js'
, 'Extension:VideoFlash'
, 'Extension:Vine'
, 'Extension:VPIPPlugin'
, 'Extension:Widgets'
, 'Extension:WidgetsFramework'
, 'Extension:YouTube (emijrp)'
, 'Extension:YouTubeTag'
$out = [];
foreach ($pages as $page)
    $url = $base . urlencode($page);
    $jso = file_get_contents($url);
    if (!$jso) continue;
    $obj = json_decode($jso);
    if (!$obj) continue;

    $views = array_sum( (array)$obj->daily_views );
    $views = number_format($views);
    $views = str_pad($views, 7, ' ', STR_PAD_LEFT);

    $title = $obj->title;
    $title = str_pad($title, 32, ' ', STR_PAD_RIGHT);

    $out[$title] = $views;

foreach ($out as $title => $views)
    echo PHP_EOL;
    echo $title;
    echo $views;

Open in new window

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Ray PaseurAuthor Commented:
Very practical way of finding a good answer!
I had a feeling you were going to make a script for this!  However, there are two problems with your code.

Firstly, one result is completely missing.  Notice that you have 27 $pages in your array but only 26 items are returned.  "Extension:TimedMediaHandler/ogv.js" is missing.

Secondly, your result for "Extension:YouTube+(emijrp)" is erroneously 0.

I recommend getting the links dynamically to prevent the risk of problems caused by typos and also to provide forward support as new extensions are added.

I modified your code, and it now returns better results.
 * Get MediaWiki page statistics summary
 * http://www.experts-exchange.com/questions/28790419/Popular-MediaWiki-Extensions.html#a41168469

header("Content-Type: text/plain"); 

$data= file_get_contents('https://www.mediawiki.org/wiki/Category:Video_player_extensions');
preg_match_all('#\/Extension\:[^"]+#', $data, $pages);
$base  = 'http://stats.grok.se/json/www.w/latest30/';

$padTitle = max(array_map('strlen', $pages[0]))+2;

$out = array();

foreach ($pages[0] as $page)
    $url = $base . $page;
    $jso = file_get_contents($url);
    if (!$jso) continue;
    $obj = json_decode($jso);
    if (!$obj) continue;

    $views = array_sum( (array)$obj->daily_views );
    $views = number_format($views);
    $title = $obj->title;
    $out[$title] = intval(str_replace(',', '', $views));

$padViews = max(array_map('strlen', $out));

foreach ($out as $title => $views)
    echo str_pad($title, $padTitle, ' ', STR_PAD_RIGHT);
    echo str_pad($views, $padViews, ' ', STR_PAD_LEFT);
    echo PHP_EOL;



Open in new window

PS... I feel like I just coached Magic Johnson how how to play basketball.
Ray PaseurAuthor Commented:
This is probably a better and more generalized solution, thanks.
Ray PaseurAuthor Commented:
Here is another helpful resource: The WikiApiary.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.