Talk:Visualizer for Wikimedia projects

Add topic
Active discussions

Notice also the url parameters documentation.

InformationEdit

Motion chart and GeoMap require the Flash Player pluginEdit

Al, this is fenomenal! I want to import it to huwiki. But I don't see anything at motion chart example. Is the problem in my machine? Bináris tell me 18:37, 22 July 2010 (UTC) Nor do I see GeoMap, but IntensityMap works properly. Bináris tell me 18:46, 22 July 2010 (UTC)

This is because the motion chart and the GeoMap use the application/x-shockwave-flash. Does your browser support the Flash? --Al Maghi 19:16, 22 July 2010 (UTC)
OK, there was some problem with updating flash, now it works. Bináris tell me 13:11, 25 July 2010 (UTC)

FAQEdit

how to setup the tool on a Wikimedia projectEdit

  1. See the internationalisation file: if the tool is not available in the project language, write your translation here or as an issue.
  2. Choose a name for the meta-template, add it on the Usage table and create it by copying the meta-template from another project.
  3. Create a template that uses the project meta-template. Such as nl:Sjabloon:Diagram, hu:Sablon:Ábrázoló, en:Template:Visualizer or fr:Modèle:Visualiseur.

--Al Maghi 19:39, 22 July 2010 (UTC)

how to setup the tool on a non-Wikimedia projectEdit

This tool can work with any MediaWiki but you need a server - because the script located at http://toolserver.org/~al/, on the toolserver, only works with the Wikimedia's domain names.

--Al Maghi 17:59, 13 January 2011 (UTC)

Issues and code improvementEdit

NewEdit

Space at the beginning of rows: either bug or feature :-)Edit

  • If the ending |} row of a table begins with space, we get an error message (|} not found).
  • If the ending tag has no space, but the other rows do, we get an empty diagram.

See this modification, before that the diagram wasn't visible. With this correction it's OK. Bináris tell me 00:35, 24 July 2010 (UTC)

ReferencesEdit

Ref tags turn into U+007F characters somehow. Source, result. --Tgr 06:13, 27 July 2010 (UTC)

After looking at it closer, that's a problem with MediaWiki, not the visualizing tool. You could filter the delete marks from the display, though. --Tgr 06:18, 27 July 2010 (UTC)

What are the delete marks to filter? I didn't manage to see it. --Al Maghi 16:04, 7 August 2010 (UTC)

Wont fixEdit

Handling old versionsEdit

Click this: [1]. Since then I have modified the visualizer template and the data in the table, too. The format of the diagram is the old one, as written in the linked version, but the data come from the current version. Bináris tell me 17:32, 23 July 2010 (UTC)

Sorry, MediaWiki cannot display the link you want. --Al Maghi 22:33, 25 July 2010 (UTC)
mw:Help:Magic words: Revision variables return data about the latest edit to the current page, even if viewing an older version of the page.

Missing rowEdit

At hu:2008-as romániai önkormányzati választás#Megyei tanácsosok the last row of the table doesn't appear (even if increasing the height of the diagram). --Bináris tell me 07:44, 26 July 2010 (UTC)

The last row value is too low. (Its value is 1 which is lower thant 0.1%, so the visualization does not display it.) --Al Maghi 10:25, 26 July 2010 (UTC)

FixedEdit

HTML comment in the tableEdit

A comment confuses the tool, here I had to put it out from the table -- previously either appeared the comment as part of the name or prevented the very next row of appearing. Bináris tell me 15:11, 23 July 2010 (UTC)

  Fixed (w:Template:Visualizer/Test/1)--Al Maghi 21:57, 25 July 2010 (UTC)

IframeEdit

It would be nice to have the ability to show just the diagram (and maybe a credit line) in an empty page, which could be displayed inside the article as a javascript-created iframe. --Tgr 06:25, 27 July 2010 (UTC)

  Fixed. Use the &view=chart or &view=js url arg to view the raw chart content. (&view=html is the default). You can specify the chart division id with &div=divId. --Al Maghi 15:43, 7 August 2010 (UTC)

Example javascript-created frame usage:

function makeFrame() { 
   ifrm = document.createElement("IFRAME"); 
   ifrm.setAttribute("src", "http://toolserver.org/~al/visualizer4wm.php?view=chart&div=chart2&page=Template:Visualizer&project=en.wikipedia.org&tpl=visualizer&ct=bar"); 
   ifrm.style.width = 640+"px"; 
   ifrm.style.height = 480+"px"; 
   document.body.appendChild(ifrm); 
}

Try it:

<html> 
<head> 
 <script language="JavaScript" type="text/javascript"> 
 function makeFrame() { 
   ifrm = document.createElement("IFRAME"); 
   ifrm.setAttribute("src", "http://toolserver.org/~al/visualizer4wm.php?view=chart&div=chart2&page=Template:Visualizer&project=en.wikipedia.org&tpl=visualizer&ct=bar"); 
   ifrm.style.width = 640+"px"; 
   ifrm.style.height = 480+"px"; 
   document.body.appendChild(ifrm); 
 } 
 </script> 
</head> 
<body> 
 <p><a href="#" onMouseDown="makeFrame()">GO! </a></p> 
</body> 
</html>

Example php usage with &view=chart

<?php echo file_get_contents("http://toolserver.org/~al/visualizer4wm.php?view=chart&page=Template:Visualizer&project=en.wikipedia.org&tpl=visualizer&ct=bar");?>

Example php usage with &view=js

<script type="text/javascript" src="http://www.google.com/jsapi"></script> 
<script type="text/javascript"> 
<?php 
  $divId = "chart_div";
  $project="en.wikipedia.org";
  $page="Template:Visualizer";
  $tpl="visualizer";
  echo file_get_contents("http://toolserver.org/~al/visualizer4wm.php?view=js&div=$divId&page=$page&project=$project&tpl=$tpl");
?>
</script>
<div id="<?php echo $divId; ?>"></div>

ProblemsEdit

Dont know what is wrong, but look at these two on the end of the page v:cs: Metavisualizer. When you click on the link the charts are not displayed.--Juan de Vojníkov 08:58, 30 July 2010 (UTC)

Fist table is not display because it contains magic words and not numbers.
Second table was not displayed because the parameter id=2 was lacking (see diff). --Al Maghi 18:36, 30 July 2010 (UTC)

And is there a way how we can display charts from the table which get data from magic words? --Juan de Vojníkov 19:01, 30 July 2010 (UTC)

No. The tool uses the raw content and don't handle any mw:magic words, we have to substitute them. --Al Maghi 19:24, 30 July 2010 (UTC)

Does this work on wikia?Edit

I tried uploading the code to here, but it gives me an error that "Sorry but wikia.com is not an authorised domain name. (Contact us if you want to authorise a new domain name.)"

I would really like to have this functional within the next day or so, so if someone could help fix whatever bug I am having and message me when they've got it working, that would be awesome. Thanks!12.53.10.226 03:05, 13 January 2011 (UTC)

No, this doesn't work on Wikia. The only way that you could get it to work there is to contact Wikia staff and request that it be enabled. However, due to the nature of this, I doubt that they will. Regards, Ajraddatz (Talk) 03:08, 13 January 2011 (UTC)
The only thing you need from Wikia is a MediaWiki API running, which you already have at kingdomhearts.wikia.com/api.php. Nothing else is needed from Wikia.com. --Al Maghi 17:59, 13 January 2011 (UTC)
The script located at http://toolserver.org/~al/, on the toolserver, only works with the Wikimedia's domain names. I cannot authorise wikia.com because the toolserver is only made for the Wikimedia projects, sorry.
Yes, this tool can work with any MediaWiki but you have to setup your own tool somewhere else :
Hope that helps you, -Al Maghi 17:59, 13 January 2011 (UTC)
Return to "Visualizer for Wikimedia projects" page.