Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
On this page:
TWiki Plugins | ||||||||
Line: 204 to 204 | ||||||||
Example: <Include an example of the Plugin in action. Possibly include a static HTML version of the example to compare if the installation was a success!>" | ||||||||
Changed: | ||||||||
< < | Plugin Global Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>" | |||||||
> > | Plugin Settings: <Description and settings for custom Plugin %VARIABLES%, and those required by TWiki.>" | |||||||
| ||||||||
Line: 231 to 231 | ||||||||
Publishing for Public Use | ||||||||
Changed: | ||||||||
< < | You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]() | |||||||
> > | You can release your tested, packaged Plugin to the TWiki community through the TWiki:Plugins![]() ![]() | |||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
Changed: | ||||||||
< < | -- AndreaSterbini - 29 May 2001 -- PeterThoeny - 11 Dec 2003 -- MikeMannix - 03 Dec 2001 | |||||||
> > | Thank you very much for sharing your Plugin with the TWiki community ![]() Recommended Storage of Plugin DataPlugins sometimes need to store data. This can be Plugin internal data like cache data, or generated data for the browser like images. The following is a recommendation where to store the data.
Where to store Plugin Internal DataIn case the Plugin generates data just for internal use, or data which is not specific to a topic, store it in the Plugin's attachment directory.
Where to Store Data for Topics using the PluginIn case the Plugin generates data which is specific to a topic, store it in the topic's attachment directory.
Example code to build the file name: sub _make_filename { my ( $web, $topic, $name ) = @_; # Create web directory "pub/$web" if needed my $dir = TWiki::Func::getPubDir() . "/$web"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } # Create topic directory "pub/$web/$topic" if needed $dir .= "/$topic"; unless( -e "$dir" ) { umask( 002 ); mkdir( $dir, 0775 ); } return "$dir/_FooBarPlugin_$name"; }
-- TWiki:Main/PeterThoeny |