Deprecated Handlers and Func API Functions
As of
DakarRelease, various handlers and API functions have been deprecated in the Plugins interface, and while they should still work, they should be replaced as soon as practical.
Use of deprecated handlers is highlighted in the warnings log in your TWiki installation.
This topic describes the mapping from deprecated handlers (and Plugins API functions) to modern usage.
Deprecated HANDLERS
startRenderingHandler
Use
preRenderingHandler instead. This handler correctly handles verbatim and other TWiki ML block types, and exposes them to the plugin.
endRenderingHandler
Use
postRenderingHandler instead.
insidePREHandler
Use
preRenderingHandler instead. This handler correctly handles pre and other TWiki ML block types, and is called only once instead of line-by-line.
outsidePREHandler
Use
preRenderingHandler instead. This handler correctly handles pre and other TWiki ML block types, and is called only once instead of line-by-line.
writeHeaderHandler
Use
modifyHeaderHandler instead. it is a lot more flexible, and allows you to modify existing headers as well as add new ones. It also works correctly when multiple plugins want to modify headers.
Deprecated Func API functions
getPublicWebList
@webs = TWiki::Func::getListOfWebs( "user,public" );
formatGmTime
$timeString = TWiki::Func::formatTime( $epSecs, $format, 'gmtime' )
getDataDir()
getDataDir makes a huge assumption; that the store is implemented using flat files on disc. This means that any plugin that employs this method will not work with any store implementation other than flat files. Plugins assuming flat files should be rewritten to use the other methods of Func that do not assume flat files - for example,
readTopic,
saveTopic,
getTopicList,
getListOfWebs.
getPubDir()
See
getDataDir. The pub area cannot be assumed to be a flat file structure.
Discussions
Crawford, what was the rational to deprecate
startRenderingHandler and
endRenderingHandler? What do Plugin authors need to watch out for?
Also,
getPubDir() is identical to
%PUBDIR%. Are you implying that
%PUBDIR% is deprecated?
--
PeterThoeny - 03 Jan 2006