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
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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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

Edit | Attach | (削除) Watch (削除ここまで) | Print version | History : r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005年09月21日 - CrawfordCurrie
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

AltStyle によって変換されたページ (->オリジナル) /