summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/conditional.pm
AgeCommit message (Collapse)Author
2010-07-04remove unnecessary and troublesome filter callsJoey Hess
This better defines what the filter hook is passed, to only be the raw, complete text of a page. Not some snippet, or data read in from an unrelated template. Several plugins that filtered text that originates from an (already filtered) page were modified not to do that. Note that this was not done very consistently before; other plugins that receive text from a page called preprocess on it w/o first calling filter. The template plugin gets text from elsewhere, and was also changed not to filter it. That leads to one known regression -- the embed plugin cannot be used to embed stuff in templates now. But that plugin is deprecated anyway. Later we may want to increase the coverage of what is filtered. Perhaps a good goal would be to allow writing a filter plugin that filters out unwanted words, from any input. We're not there yet; not only does the template plugin load unfiltered text from its templates now, but so can the table plugin, and other plugins that use templates (like inline!). I think we can cross that bridge when we come to it. If I wanted such a censoring plugin, I'd probably make it use a sanitize hook instead, for the better coverage. For now I am concentrating on the needs of the two non-deprecated users of filter. This should fix bugs/po_vs_templates, and it probably fixes an obscure bug around txt's use of filter for robots.txt.
2010-04-15conditional: Fix bug that forced "all" mode off by default.Joey Hess
Commit b7351daacd0d4a041a51b43d99b7bf589de54f53 introduced the bug.
2010-02-12setup file orderingJoey Hess
2010-02-11Group related plugins into sections in the setup file, and drop unused rcs ↵Joey Hess
plugins from the setup file.
2009-10-09conditional: use pagespec_match_listJoey Hess
2009-10-09indentationJoey Hess
2009-10-09conditional: use yesnoJoey Hess
2009-01-10Consistently allow use of relative paths in all PageSpecs that take a page ↵Joey Hess
name parameter. Previously, match_created_before(), match_created_after(), match_sourcepage(), and match_destpage() did not support that, and the docs were not clear.
2008-12-23finalise version 3.00 of the plugin apiJoey Hess
2008-12-17Coding style change: Remove explcit vim folding markers.Joey Hess
2008-09-29avoid unnecessarily rebuilding pages with complex conditionalsJoey Hess
I noticed that ikiwiki/formatting was beilg rebuilt when any page changed. This turned out to be because it contained a complex conditional "enabled(foo) or enabled(bar)", and the conditional plugin did not notice that this consisted only of enabled() tests, and copied it unchanged into add_depends. Thus, the page's dependencies were satisfied by any page change. The fix is to beef up the parser so that it can handle that and more complex conditionals, and detect if they consist only of such tests.
2008-08-03add plugin safe/rebuild info (part 1 of 2)Joey Hess
too many plugins.. brain exploding..
2008-07-13switch preprocess hooks to use error functionJoey Hess
2007-12-28* conditional: Improve regexp testing for simple uses of pagespecsJoey Hess
that match only the page using the directive, adding 'included()' and supporting negated pagespecs and added whitespace.
2007-07-28fixjoey
2007-05-17* Add a destpage parameter to the filter hook.joey
* Fix links to smilies generated by the smiley plugin for inlined pages. The old links were often wrong, but often still worked by accident.
2007-05-09* Add all=no option to conditional, can be used to form conditionals that dojoey
not need to examine every page in the wiki. * Use this to simplify the goodstuff detection in the plugin template.
2007-04-27the kind of perl code that can only be written at 4:30 amjoey
(Get a good message when a PageSpec fails due to a negated success by creating success objects with a reason string, which morph into failure objects when negated.)
2007-04-27* Make pagespec_match on failure return a value that is false, but in ajoey
scalar context, evaluates to a reason why the match failed. * Add testpagespec plugin, which might be useful to see why a pagespec isn't matching something.
2007-04-27* pagespec_match() has changed to take named parameters, to better allowjoey
for extended pagespecs. The old calling convention will still work for back-compat for now. * The calling convention for functions in the IkiWiki::PageSpec namespace has changed so they are passed named parameters. * Plugin interface version increased to 2.00 since I don't anticipate any more interface changes before 2.0.
2007-03-21* Fix link() PageSpecs to not just look at the raw link text, but at wherejoey
that given link points based on the page doing the linking. Note that this could make such PageSpecs match different things than before, if you relied on the old behavior of them only matching the raw link text. * This required changing the match_* interface, adding a third parameter. * Allow link() PageSpecs to match relative, as is allowed with globs.a * Add postform option to inline plugin. * Add an bug tracker to the softwaresite example.
2007-03-07more i18n improvementsjoey
2007-02-14* Fix the template, toggle, and conditional plugins to filter text beforejoey
preprocessing it. * Fix smiley plugin to support smileys at the very beginning or end of the content.
2007-02-12* Allow plugins to add new types of tests that can be used in PageSpecs.joey
* Add a "conditional" plugin, which allows displaying text if a condition is true. It is enabled by default so conditional can be used in the basewiki. * Use conditionals in the template for plugins, so that plugin pages say if they're currently enabled or not, and in various other places in the wiki.