This question about Topic Markup Language and applications: Answered
IF seems incompatible with predecessor...
IpPlugin's topic page correctly detects whether the plugin is installed on TWiki(head).
I did a preliminary port (See
IpPlugin &
Item12126) and it always thinks the plugin is installed.
This comes down the the following %IF statement which seems to evaluate differently here:
%IF{ "$ 'PLUGINVERSION{IpPlugin}'=\"0\"" then="---+++!! !IpPlugin is not installed and active on this wiki
The table below will not be correct" else="---+++!! !IpPlugin plugin is installed and enabled on this wiki
You should see your web browser's IP address and connection type below: " }%
"%PLUGINVERSION{IpPlugin}%" expands to "0" on this wiki, so the %IF should be false. It's evaluating true.
Since this is a compatibility issue, I thought I should raise it here.
Here's the live code to play with:
IpPlugin plugin is installed and enabled on this wiki
You should see your web browser's IP address and connection type below:
Thanks in advance for your help.
--
TimotheLitt - 08 Oct 2012
I don't understand what's failing here. it does seem that you've found a bug, but the way Foswiki would normally check for enabled plugins is to use the context generated for each plugin:
%IF{"context IpPluginEnabled" then="---++!! IpPlugin is installed and enabled on this wiki" else="---++!! IpPluggin is not enabled or not installed"}%
%IF{"context CommentPluginEnabled" then="---++!! CommentPlugin is installed and enabled on this wiki" else="---++!! CommentPlugin is not enabled or not installed"}%
IpPluggin is not enabled or not installed
--
GeorgeClark - 08 Oct 2012
I didn't think of the context variable. Seems equivalent, but this should work. I'm using documented syntax, and we claim compatibiity with where it works as I expect.
I think the failure needs to be root-caused, since it probably fails for someone else too.
(The way quotes and macros nest has always amazed -- and seemed fragile to -- me.)
--
TimotheLitt - 09 Oct 2012
The IF statement shouldn't even parse; it's using double quotes, IIRC we only support single quotes.
--
CrawfordCurrie - 23 May 2013