Loading...
 
Tiki and PluginR

Tiki and PluginR


Re: Jyhem coding RR plugin settings variables directly from within RR

posts: 40 France

This is what works for us.

In the params definition
Copy to clipboard
'customoutput' => array( 'required' => false, 'safe' => true, 'name' => tra('Custom output'), 'description' => tra('Write your custom png creation R command. Use tikiRRfilename for value of output. RR does not produce an output file.'), 'filter' => 'int', 'default' => '0', 'options' => array( array('text' => '', 'value' => ''), array('text' => tra('No'), 'value' => '0'), array('text' => tra('Yes'), 'value' => '1'), ), 'advanced' => true, ),

in the function runR()
Copy to clipboard
// Check if the user wants to handle the creation of his custom png if ( isset($params["customoutput"]) && $params["customoutput"]=="1" ) { $image_number = 1; $content .= 'tikiRRfilename < - "' . $rgo . "_$image_number.png" . '"' . "\n"; // Add the user input code at the end $content .= $input . "\n"; } else { // Check if the user requested an svg file or pdf file to be generated instead of the standard png in the wiki page if (isset($_REQUEST['gtype']) && $_REQUEST['gtype']=="svg") { […] $content .= $input . "\n"; } # enf of choice between svg and png }
There are no comments at this time.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting