Jump to content

Extension talk:Plotters

Add topic
From mediawiki.org

Hello Ryan,

You examples look very nice. I am trying to install your extention on mediawiki-1.12.0. I have followed your installation instructions. But until now, with no success.

When I add:

require_once( "$IP/extensions/Plotters/Plotters.php" );

to my LocalSettings.php, I get the error:

Error, Setup.php must be included from the file scope, after DefaultSettings.php

When I add:

$wgPlottersRendererFiles = array( "customrenderer" = array( "/customjs/Custom.js", "/customjs/MoreCustom.js", "..." ) );

to my LocalSettings.php, I get the error:

$wgPlottersRendererFiles = array( "customrenderer" = Error: expected a )

Futher: What is the best place to install plotkit and MochiKit and are there any symbolic links needed to resolve the scrips inside these packages.

Are you adding the require to the end of LocalSettings.php? What version of MediaWiki are you using?
As for plotkit/mochikit, here's how I have it set up:
laner@ubuntu:/var/www/html/static/scripts$ ls *
mochikit:
Async.js     DOM.js          Logging.js      __package__.js  Sortable.js
Base.js      DragAndDrop.js  LoggingPane.js  Position.js     Style.js
Color.js     Format.js       MochiKit.js     Selector.js     Test.js
DateTime.js  Iter.js         MockDOM.js      Signal.js       Visual.js

plotkit:
Base.js    EasyPlot.js  PlotKit.js         SweetCanvas.js
Canvas.js  excanvas.js  PlotKit_Packed.js  SweetSVG.js
dummy.svg  Layout.js    SVG.js
A URL to one of Plotkit's javascript files would look like: http://localhost/static/scripts/plotkit/SweetCanvas.js
I have the following at the end of LocalSettings.php:
require_once( "$IP/extensions/Plotters/Plotters.php" );
$wgPlottersJavascriptPath = "/static/scripts";
Hope that helps.
--Ryan lane 03:12, 16 July 2009 (UTC)Reply


Thanks Ryan,

Thanks for your quick responce. I am working on Mediawiki 1.12.0 (see above) I have managed to edit the LocalSettings.php file without the errors. Just with:

require_once( "$IP/extensions/Plotters/Plotters.php" );
$wgPlottersJavascriptPath = "/static/scripts";

The LocalSettings.php file runs without errors.

Still I am not getting the plots. I have put the javascript files in the same directory structure as your showed me. The {{*plot in my wiki page is recognized only the plot is not drawn. I am searching in the Plotters.php code to see what might go wrong. Maybe you can give me some hints. (the samples on the web are plotted very nicely on my brouwser)

Best regards, Lucas

Did you install the javascript in Special:Plotters? Are you getting any javascript errors?
--Ryan lane 18:26, 16 July 2009 (UTC)Reply

FYI. --Nemo 12:19, 17 September 2013 (UTC)Reply