Tags:
create new tag
, view all tags
This topic is not formatted like a standard Dev topic because it was created in a different web and later moved. If somebody could please help me reformat/arrange the information here that would be great.

Now down to business....

SHOW operates similar to INCLUDE however it allows you to specify "from" and "to" without need for:

%STARTINCLUDE%

or

%STOPINCLUDE%.

You can put something like:

%SHOW{Web.TopicPage from="somewhere" to="somewhere else"}%

into a topic and it will attempt to include that portion as if the items in "from" and "to" were %STARTINCLUDE% and %STOPINCLUDE%

ShowTopicSectionPluginDev

Adds to the functionality of the

Warning: Can't find topic ""."" tag by allowing includes of patterns from specific topics or revisions of topics.

Syntax Rules

   * %SHOW{Web.TopicPage from="somewhere" to="somewhere else"}%

ShowTopicSectionPluginDev Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Adds to the functionality of the %INCLUDE% tag by allowing includes of sections and patterns of a topic or a specific revision of a topic.

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Test Area:

setting up a few things we can later try to match.

If you are reading this topic please ignore everything between HERE .....

start test

OK

OK

plain text test 1

OK

plain text test 2

OK

end test

...AND HERE

* Test if the plugin is correctly installed:


IF THIS PLUGINS WORKS THERE SHOULD BE SOMETHING BETWEEN HERE %SHOW{ShowTopicSectionPluginDev from="#AnchorTest1" to="#AnchorTest2"}% AND HERE (something other than code)

more testing:


anchor to anchor test is: %SHOW{TWiki.ShowTopicSectionPlugin from="#AnchorTest1" to="#AnchorTest2"}%
anchor to plain text is: %SHOW{TWiki.ShowTopicSectionPlugin from="#AnchorTest1" to="plain text test 1"}%
plain text to plain text is: %SHOW{TWiki.ShowTopicSectionPlugin from="plain text test 1" to="plain text test 2"}%
start test to end test: %SHOW{TWiki.ShowTopicSectionPlugin from="start test" to="end test"}%


Plugin Info

Related Topics: TWikiPreferences, TWikiPlugins

-- TravisBarker - 23 Aug 2005

-- TravisBarker - 23 Aug 2005

I have a working example at http://thetabase.net/twiki/bin/viewf/TWiki/ShowTopicSectionPlugin

-- TravisBarker - 23 Aug 2005

my regex could probably use some work to make the matchin more predictable under various conditions, however I believe the .pm file attached below is a good start.

-- TravisBarker - 23 Aug 2005

 
Topic attachments
I Attachment Action Size Date Who Comment
Perl source code filepm ShowTopicSection.pm manage 2.7 K 2005-08-23 - 21:58 TravisBarker  
Topic revision: r1 - 2005-08-23 - TravisBarker
 
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.