https://bugzilla.wikimedia.org/show_bug.cgi?id=54221

--- Comment #7 from Pavel (pastakhov) <pastak...@yandex.ru> ---
I'd suggest using a scripting language as markup for the editable charts,
diagrams, graphs, flowcharts etc.

For end users this may be like the example:

== Extension:Graph ==

 G { "Bonn" --> "Berlin" [ style: bold; ] }    
As
Graph( [ "Bonn" => [ "Berlin", "style"=>"bold" ] ] );
or 
$bonn = node("Bonn");
$bonn->linkTo( node("Berlin", "bold") );
Graph( $bonn );

== Extension:WikiPlot ==

<wikiplot height="200" width="200" caption="Simple plot" xspan="-100;100"
yspan="-100;100">
        <graph label="Graph 1." color="255,0,0">x+4</graph>
        <graph label="Graph 2.">3*x-3</graph>
</wikiplot>

as 

$plot = new Plot( ['height'=>200, 'width'=>200, 'caption'=>'Simple plot',
'xspan'=>[-100, 100], 'yspan'=>[-100, 100] ] );

or 

$plot = new Plot();
$plot->height = 200;
$plot->width = 200;
$plot->caption = "Simple plot";
$plot->xspan = [-100, 100];
$plot->yspan = [-100, 100];

and

$plot.addGraph( ['x+4', 'label'=> 'Graph 1.', 'color'=>[255,0,0] ]);

$graph = new Graph( "3*x-3" );
$graph->label = 'Graph 2.'
$plot.add( $graph );

echo $plot;

It looks like directly code execution, but it is not.
I did mw:Extension:Foxway for testing possibility of this. I ascertained that
this may work and may work quickly.
Now I do new mw:Extension:PhpTags. There any extension can register a hook as a
constant, function or object.
So far I have only worked on the functions and constants, and did not start
work on objects.
I am sure that the PhpTags will cover all the needs and will be convenient and
powerful tool.
I would like to find someone interested in discussing this.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to