bash-2.05a$ diff -c bu2 TWiki.pm *** bu2/TWiki.pm Mon Jul 12 00:04:06 2004 --- TWiki.pm Thu Jul 15 02:25:33 2004 *************** *** 154,160 **** # =========================== # TWiki version: ! $wikiversion = 'Alpha 10 Jul 2004 $Rev: 1572 $'; # =========================== # Key Global variables, required for writeDebug --- 154,160 ---- # =========================== # TWiki version: ! $wikiversion = 'Alpha 15 Jul 2004 $Rev: 1575 $'; # =========================== # Key Global variables, required for writeDebug *************** *** 2053,2059 **** &TWiki::Prefs::handlePreferencesTags( $text ); handleInternalTags( $text, $theTopic, $theWeb ); ! # Wiki Plugin Hook (4th parameter tells plugin that its called from an include) &TWiki::Plugins::commonTagsHandler( $text, $theTopic, $theWeb, 1 ); # handle tags again because of plugin hook --- 2053,2059 ---- &TWiki::Prefs::handlePreferencesTags( $text ); handleInternalTags( $text, $theTopic, $theWeb ); ! # TWiki Plugin Hook (4th parameter tells plugin that its called from an include) &TWiki::Plugins::commonTagsHandler( $text, $theTopic, $theWeb, 1 ); # handle tags again because of plugin hook *************** *** 3061,3067 **** if( !$theWeb ) { $theWeb = $webName; } ! my @verbatim = (); $text = takeOutVerbatim( $text, \@verbatim ); --- 3061,3070 ---- if( !$theWeb ) { $theWeb = $webName; } ! ! # TWiki Plugin Hook (for cache Plugins only) ! &TWiki::Plugins::beforeCommonTagsHandler( $text, $theTopic, $theWeb ); ! my @verbatim = (); $text = takeOutVerbatim( $text, \@verbatim ); *************** *** 3077,3083 **** # recursively process multiple embedded %INCLUDE% statements and prefs $text =~ s/%INCLUDE{(.*?)}%/&handleIncludeFile($1, $theTopic, $theWeb, \@verbatim, @theProcessedTopics )/ge; ! # Wiki Plugin Hook &TWiki::Plugins::commonTagsHandler( $text, $theTopic, $theWeb, 0 ); # handle tags again because of plugin hook --- 3080,3086 ---- # recursively process multiple embedded %INCLUDE% statements and prefs $text =~ s/%INCLUDE{(.*?)}%/&handleIncludeFile($1, $theTopic, $theWeb, \@verbatim, @theProcessedTopics )/ge; ! # TWiki Plugin Hook &TWiki::Plugins::commonTagsHandler( $text, $theTopic, $theWeb, 0 ); # handle tags again because of plugin hook *************** *** 3095,3100 **** --- 3098,3106 ---- # it again! But this would mean altering many scripts to pass back verbatim $text = putBackVerbatim( $text, "verbatim", @verbatim ); + # TWiki Plugin Hook (for cache Plugins only) + &TWiki::Plugins::afterCommonTagsHandler( $text, $theTopic, $theWeb ); + return $text; } *************** *** 3120,3127 **** $text =~ s/%META{\s*"moved"\s*}%/&TWiki::Render::renderMoved( $theWeb, $theTopic, $meta )/ge; #render topic moved information $text =~ s/%META{\s*"parent"\s*(.*)}%/&TWiki::Render::renderParent( $theWeb, $theTopic, $meta, $1 )/ge; #render the parent information ! $text = handleCommonTags( $text, $theTopic ); ! $text = TWiki::Render::getRenderedVersion( $text, $theWeb ); return $text; } --- 3126,3133 ---- $text =~ s/%META{\s*"moved"\s*}%/&TWiki::Render::renderMoved( $theWeb, $theTopic, $meta )/ge; #render topic moved information $text =~ s/%META{\s*"parent"\s*(.*)}%/&TWiki::Render::renderParent( $theWeb, $theTopic, $meta, $1 )/ge; #render the parent information ! $text = handleCommonTags( $text, $theTopic ); ! $text = TWiki::Render::getRenderedVersion( $text, $theWeb ); return $text; } bash-2.05a$ bash-2.05a$ bash-2.05a$ cd TWiki bash-2.05a$ diff -c bu2 Plugins.pm *** bu2/Plugins.pm Wed Jul 7 23:19:12 2004 --- Plugins.pm Thu Jul 15 02:01:28 2004 *************** *** 33,46 **** $VERSION $initialisationErrors ); ! $VERSION = '1.023'; @registrableHandlers = ( # VERSION: 'earlyInitPlugin', # ( ) 1.020 'initPlugin', # ( $topic, $web, $user, $installWeb ) 1.000 'initializeUserHandler', # ( $loginName, $url, $pathInfo ) 1.010 'registrationHandler', # ( $web, $wikiName, $loginName ) 1.010 'commonTagsHandler', # ( $text, $topic, $web ) 1.000 'startRenderingHandler', # ( $text, $web ) 1.000 'outsidePREHandler', # ( $text ) 1.000 'insidePREHandler', # ( $text ) 1.000 --- 33,48 ---- $VERSION $initialisationErrors ); ! $VERSION = '1.024'; @registrableHandlers = ( # VERSION: 'earlyInitPlugin', # ( ) 1.020 'initPlugin', # ( $topic, $web, $user, $installWeb ) 1.000 'initializeUserHandler', # ( $loginName, $url, $pathInfo ) 1.010 'registrationHandler', # ( $web, $wikiName, $loginName ) 1.010 + 'beforeCommonTagsHandler', # ( $text, $topic, $web ) 1.024 'commonTagsHandler', # ( $text, $topic, $web ) 1.000 + 'afterCommonTagsHandler', # ( $text, $topic, $web ) 1.024 'startRenderingHandler', # ( $text, $web ) 1.000 'outsidePREHandler', # ( $text ) 1.000 'insidePREHandler', # ( $text ) 1.000 *************** *** 465,470 **** --- 467,489 ---- # ========================= =pod + ---++ sub beforeCommonTagsHandler () + + Not yet documented. + + =cut + + sub beforeCommonTagsHandler + { + # Called by sub handleCommonTags at the beginning (for cache Plugins only) + # my( $text, $topic, $theWeb ) = @_; + unshift @_, ( 'beforeCommonTagsHandler' ); + &applyHandlers; + } + + # ========================= + =pod + ---++ sub commonTagsHandler () Not yet documented. *************** *** 483,488 **** --- 502,524 ---- } # ========================= + =pod + + ---++ sub afterCommonTagsHandler () + + Not yet documented. + + =cut + + sub afterCommonTagsHandler + { + # Called by sub handleCommonTags at the end (for cache Plugins only) + # my( $text, $topic, $theWeb ) = @_; + unshift @_, ( 'afterCommonTagsHandler' ); + &applyHandlers; + } + + # ========================= =pod ---++ sub startRenderingHandler () bash-2.05a$ bash-2.05a$ bash-2.05a$ cd Plugins bash-2.05a$ diff -c bu2 . Only in .: .svn diff -c bu2/DefaultPlugin.pm ./DefaultPlugin.pm *** bu2/DefaultPlugin.pm Fri May 28 23:51:35 2004 --- ./DefaultPlugin.pm Thu Jul 15 02:18:13 2004 *************** *** 25,31 **** --- 25,33 ---- # initPlugin ( $topic, $web, $user, $installWeb ) 1.000 # initializeUserHandler ( $loginName, $url, $pathInfo ) 1.010 # registrationHandler ( $web, $wikiName, $loginName ) 1.010 + # beforeCommonTagsHandler ( $text, $topic, $web ) 1.024 # commonTagsHandler ( $text, $topic, $web ) 1.000 + # afterCommonTagsHandler ( $text, $topic, $web ) 1.024 # startRenderingHandler ( $text, $web ) 1.000 # outsidePREHandler ( $text ) 1.000 # insidePREHandler ( $text ) 1.000 *************** *** 123,128 **** --- 125,140 ---- } # ========================= + sub DISABLE_beforeCommonTagsHandler + { + ### my ( $text, $topic, $web ) = @_; # do not uncomment, use $_[0], $_[1]... instead + + TWiki::Func::writeDebug( "- ${pluginName}::beforeCommonTagsHandler( $_[2].$_[1] )" ) if $debug; + + # Called at the beginning of TWiki::handleCommonTags (for cache Plugins use only) + } + + # ========================= sub commonTagsHandler { ### my ( $text, $topic, $web ) = @_; # do not uncomment, use $_[0], $_[1]... instead *************** *** 130,136 **** TWiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug; # This is the place to define customized tags and variables ! # Called by sub handleCommonTags, after %INCLUDE:"..."% # for compatibility for earlier TWiki versions: if( $doOldInclude ) { --- 142,148 ---- TWiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug; # This is the place to define customized tags and variables ! # Called by TWiki::handleCommonTags, after %INCLUDE:"..."% # for compatibility for earlier TWiki versions: if( $doOldInclude ) { *************** *** 145,150 **** --- 157,172 ---- } # ========================= + sub DISABLE_afterCommonTagsHandler + { + ### my ( $text, $topic, $web ) = @_; # do not uncomment, use $_[0], $_[1]... instead + + TWiki::Func::writeDebug( "- ${pluginName}::afterCommonTagsHandler( $_[2].$_[1] )" ) if $debug; + + # Called at the end of TWiki::handleCommonTags (for cache Plugins use only) + } + + # ========================= sub startRenderingHandler { ### my ( $text, $web ) = @_; # do not uncomment, use $_[0], $_[1] instead diff -c bu2/EmptyPlugin.pm ./EmptyPlugin.pm *** bu2/EmptyPlugin.pm Fri May 28 23:51:35 2004 --- ./EmptyPlugin.pm Thu Jul 15 01:52:51 2004 *************** *** 25,31 **** --- 25,33 ---- # initPlugin ( $topic, $web, $user, $installWeb ) 1.000 # initializeUserHandler ( $loginName, $url, $pathInfo ) 1.010 # registrationHandler ( $web, $wikiName, $loginName ) 1.010 + # beforeCommonTagsHandler ( $text, $topic, $web ) 1.024 # commonTagsHandler ( $text, $topic, $web ) 1.000 + # afterCommonTagsHandler ( $text, $topic, $web ) 1.024 # startRenderingHandler ( $text, $web ) 1.000 # outsidePREHandler ( $text ) 1.000 # insidePREHandler ( $text ) 1.000 *************** *** 120,125 **** --- 122,137 ---- } # ========================= + sub DISABLE_beforeCommonTagsHandler + { + ### my ( $text, $topic, $web ) = @_; # do not uncomment, use $_[0], $_[1]... instead + + TWiki::Func::writeDebug( "- ${pluginName}::beforeCommonTagsHandler( $_[2].$_[1] )" ) if $debug; + + # Called at the beginning of TWiki::handleCommonTags (for cache Plugins use only) + } + + # ========================= sub DISABLE_commonTagsHandler { ### my ( $text, $topic, $web ) = @_; # do not uncomment, use $_[0], $_[1]... instead *************** *** 127,133 **** TWiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug; # This is the place to define customized tags and variables ! # Called by sub handleCommonTags, after %INCLUDE:"..."% # do custom extension rule, like for example: # $_[0] =~ s/%XYZ%/&handleXyz()/ge; --- 139,145 ---- TWiki::Func::writeDebug( "- ${pluginName}::commonTagsHandler( $_[2].$_[1] )" ) if $debug; # This is the place to define customized tags and variables ! # Called by TWiki::handleCommonTags, after %INCLUDE:"..."% # do custom extension rule, like for example: # $_[0] =~ s/%XYZ%/&handleXyz()/ge; *************** *** 135,140 **** --- 147,162 ---- } # ========================= + sub DISABLE_afterCommonTagsHandler + { + ### my ( $text, $topic, $web ) = @_; # do not uncomment, use $_[0], $_[1]... instead + + TWiki::Func::writeDebug( "- ${pluginName}::afterCommonTagsHandler( $_[2].$_[1] )" ) if $debug; + + # Called at the end of TWiki::handleCommonTags (for cache Plugins use only) + } + + # ========================= sub DISABLE_startRenderingHandler { ### my ( $text, $web ) = @_; # do not uncomment, use $_[0], $_[1] instead