Tags:
create new tag
, view all tags

Question

Hello,

I would be happy, when someone can help me with my problem. smile

I want to write a very little Plugin for TWiki, which can only write/save a file, when I click the save-button below the edit-window of a topic.

How and in which Plugin-Handle have I to write the following Perl-code?

open(FFILE,">../../../data/Main/OutFile.txt"); print FFILE "This is a test.\n"; close FFILE;

Thanks a lot! smile

Sven

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Windows XP SP2
Web server: Apache 1.3.28
Perl version: ActivePerl 5.8
Client OS: Windows XP SP2
Web Browser: Mozilla Firefox 1.0.6
Categories: Plugins, Add-Ons

-- SvenStrohschein - 02 Sep 2005

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

EmptyPlugin.pm is a template for a plugin; take a copy of it, save it as your new plugin, and edit as instructed in the file. The handler you want is the beforeSaveHandler.

-- CrawfordCurrie - 21 Sep 2005

 
Topic revision: r3 - 2005-09-21 - CrawfordCurrie
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.