Skip to content

Commit

Permalink
Item109: terminology of variables fixed
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@688 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Nov 15, 2008
1 parent 08ca662 commit 2b19db7
Show file tree
Hide file tree
Showing 75 changed files with 199 additions and 198 deletions.
10 changes: 5 additions & 5 deletions CommentPlugin/data/TWiki/CommentPlugin.txt
Expand Up @@ -152,8 +152,8 @@ then the template will be expanded as
<textarea rows="3" cols="75" value="Rubbish">
</pre>

---++++ Special variables
As well as support for all the usual TWiki variables in templates, the following special variables are supported in the =PROMPT= definition:
---++++ Special macros
As well as support for all the usual macros in templates, the following special macros are supported in the =PROMPT= definition:
| *Variable* | *Description* |
| =%<nop>DISABLED%= | Set to 'disabled' when you cannot comment (e.g. in preview mode). |
| =%<nop>MESSAGE%= | The text specified by =default=. This may be overridden by a helpful message when the prompt is DISABLED. |
Expand Down Expand Up @@ -201,7 +201,7 @@ Example comment:
</verbatim>

---+++ The =OUTPUT= template
The =OUTPUT= template defines the format for the text that actually gets embedded into the topic. All the usual TWiki variables are available in the =PROMPT= definition, but note that they get expanded _when the comment is inserted in the text_, so time, date and username will refer to the time and date when the comment was made, and the user who made it.
The =OUTPUT= template defines the format for the text that actually gets embedded into the topic. All the usual macros are available in the =PROMPT= definition, but note that they get expanded _when the comment is inserted in the text_, so time, date and username will refer to the time and date when the comment was made, and the user who made it.

There are also four position tags that are used to indicate where the comment should be placed, relative to the =location= defined in the =%COMMENT= tag:

Expand All @@ -213,7 +213,7 @@ Note that these position tags are obviously mutually exclusive. If you define mo

| =%<nop>COMMENTPROMPT%= | Use with a custom form. If present, the comment prompt will be positioned here. |

All the usual [[%SYSTEMWEB%.Macros][Macros]] that can be used in a topic template can also be used in an =OUTPUT= template. See [[%SYSTEMWEB%.Macros][Macros]] for details.
All the [[TemplateTopics#TemplateTopicsVars][usual macros]] that can be used in a topic template can also be used in an =OUTPUT= template.

---++ Settings
<!-- required for compatibility
Expand All @@ -223,7 +223,7 @@ All the usual [[%SYSTEMWEB%.Macros][Macros]] that can be used in a topic templat
* Default template type (if not present, defaults to "below")
* Set DEFAULT_TYPE = above
-->
Two TWiki Preference variables are recognised by the CommentPlugin:
Two preference settings are recognised by the CommentPlugin:
| *Preference* | *Default* | *Description* |
| =%<nop>COMMENTPLUGIN_TEMPLATES%= | =comments= | Name of template file in the 'templates' directory that contains the comment templates. The default 'comments.tmpl' automatically includes user templates from %SYSTEMWEB%.CommentPluginTemplate, which in turn includes %SYSTEMWEB%.UserCommentsTemplate. |
| =%<nop>COMMENTPLUGIN_DEFAULT_TYPE%= | =above= | Default template type |
Expand Down
2 changes: 1 addition & 1 deletion CommentPlugin/data/TWiki/CommentPluginTemplate.txt
Expand Up @@ -5,7 +5,7 @@

See [[%SYSTEMWEB%.CommentPlugin#Customisation][CommentPlugin: Customisation]] for help.

While this topic can be viewed as a TWiki topic, it is used by the CommentPlugin as a template file. The syntax is the same as used for the templates used for presentation in skins - see SkinTemplates. The important content in here is in the verbatim blocks. The rest of the topic is just comments.
While this topic can be viewed as a topic, it is used by the CommentPlugin as a template file. The syntax is the same as used for the templates used for presentation in skins - see SkinTemplates. The important content in here is in the verbatim blocks. The rest of the topic is just comments.

%ICON{"hand"}% See CommentPluginExamples to view rendered templates

Expand Down
8 changes: 4 additions & 4 deletions EditTablePlugin/data/TWiki/EditTablePlugin.txt
Expand Up @@ -16,11 +16,11 @@ Multiple tables per topic are editable, but only one at a time can be edited.
Add a =%<nop>EDITTABLE{...}%= variable just before an existing table to make it editable, or add the variable anywhere in a topic to start a new table.
%INCLUDE{"%SYSTEMWEB%.VarEDITTABLE" section="edittable_attributes"}%

---+++ Using TWiki Variables in the Format Parameter
---+++ Using Macros in the Format Parameter

By default, variables in =&lt;initial value&gt;= (of text input field) and =&lt;label text&gt;= (of fixed label) get expanded when a new row is added. This can be used for example to add a timestamp to a label. You can escape characters with format tokens if you do not want that.
By default, macros in =&lt;initial value&gt;= (of text input field) and =&lt;label text&gt;= (of fixed label) get expanded when a new row is added. This can be used for example to add a timestamp to a label. You can escape characters with format tokens if you do not want that.

Any TWiki variable inside a table cell will be preserved. For instance, =%<nop>TOPIC%= will not get expanded to the current topic name.
Any macro inside a table cell will be preserved. For instance, =%<nop>TOPIC%= will not get expanded to the current topic name.

The format tokens are the same as with %SYSTEMWEB%.FormattedSearch:

Expand Down Expand Up @@ -148,7 +148,7 @@ Table in edit mode:

---++ Plugin Settings

Plugin settings are stored as preferences variables. To reference
Plugin settings are stored as preference settings. To reference
a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, ==%<nop>EDITTABLEPLUGIN_SHORTDESCRIPTION%==

* One line description, shown in the %SYSTEMWEB%.TextFormattingRules topic:
Expand Down
2 changes: 1 addition & 1 deletion EditTablePlugin/data/TWiki/VarEDITTABLE.txt
Expand Up @@ -12,7 +12,7 @@
| =changerows= | Rows can be added and removed if ="on"= <br /> Rows can be added but not removed if ="add"= <br /> Rows cannot be added or removed if ="off"= | =CHANGEROWS= %BR% plugin setting |
| =quietsave= | Quiet Save button is shown if ="on"=, hidden if ="off"= | =QUIETSAVE= %BR% plugin setting |
| =include= | Other topic defining the EDITTABLE parameters. The first %<nop>EDITTABLE% in the topic is used. This is useful if you have many topics with the same table format and you want to update the format in one place. | (none) |
| =helptopic= | Topic name containing help text shown below the table when editing a table. The %<nop>STARTINCLUDE% and %<nop>STOPINCLUDE% variables can be used in the topic to specify what is shown. | (no help text) |
| =helptopic= | Topic name containing help text shown below the table when editing a table. The %<nop>STARTINCLUDE% and %<nop>STOPINCLUDE% macros can be used in the topic to specify what is shown. | (no help text) |
| =headerislabel= | Table header cells are read-only (labels) if ="on"=; header cells can be edited if ="off"= or "0" | ="on"= |
| =editbutton= | Set edit button text, e.g. ="Edit this table"=; set button image with alt text, e.g. ="Edit table, %<nop>PUBURL%/%<nop>SYSTEMWEB%/DocumentGraphics/edittopic.gif"=; hide edit button at the end of the table with ="hide"= (Note: Button is automatically hidden if an edit button is present in a cell) | =EDITBUTTON= %BR% plugin setting |
| =buttonrow= | Set to =top= to put the edit buttons above the table. | =bottom= |
Expand Down
2 changes: 1 addition & 1 deletion EmptyPlugin/data/TWiki/EmptyPlugin.txt
Expand Up @@ -15,7 +15,7 @@ To create your own Plugin:

---++ Plugin Settings

Plugin settings are stored as preferences variables. To reference
Plugin settings are stored as preference settings. To reference
a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>EMPTYPLUGIN_SHORTDESCRIPTION%==

* One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
Expand Down
2 changes: 1 addition & 1 deletion InterwikiPlugin/data/TWiki/InterWikis.txt
Expand Up @@ -10,7 +10,7 @@ Whenever you write ==ExternalSite:Page== it will be linked automatically to the
* Inter-Site links are defined in the tables below.
* Each entry must be of format: <br /> ==| External site alias | URL | Tooltip help text |==.
* The Alias must start with an upper case letter and may contain alphanumeric letters.
* The URL and Tooltip Text may contain optional ==$page== variables; the variable gets expanded to the page name.
* The URL and Tooltip Text may contain optional ==$page== formatting tokens; the token gets expanded to the page name.
* __Note:__ The Tooltip Text must not contain any HTML tags (including ==&lt;nop&gt;== escape code), no internal %SYSTEMWEB%.WikiWord links, and no external links. Hint: Escape =='WikiWords'== and =='$page'==.

---+++ General Inter-Site Links
Expand Down
7 changes: 4 additions & 3 deletions InterwikiPlugin/data/TWiki/InterwikiPlugin.txt
Expand Up @@ -13,13 +13,13 @@ The <nop>%TOPIC% links ==ExternalSite:Page== text to external sites based on ali
* Add and edit aliases in %SYSTEMWEB%.InterWikis.
* Each entry must be of format: <br /> ==| External site alias | URL | Tooltip help text |==.
* Site aliases must start with an upper case letter and may contain alphanumeric letters.
* The URL and Tooltip Text may contain optional ==$page== variables; the variable gets expanded to the page name.
* The URL and Tooltip Text may contain optional ==$page== fromatting tokens; the token gets expanded to the page name.
* %H% For TWiki sites, both the *web* and the *topic* have to be specified: ==<nop>TWikisite:Webname/<nop>SomePage==
* TWiki:Plugins/InterwikiPlugin or TWiki:Plugins.InterwikiPlugin

---++ <nop>%TOPIC% Settings

Plugin settings are stored as Preferences variables. To reference
Plugin settings are stored as preference settings. To reference
a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, ==%<nop>INTERWIKIPLUGIN_SHORTDESCRIPTION%==

* One-line description, shown in the %SYSTEMWEB%.TextFormattingRules topic:
Expand All @@ -28,7 +28,8 @@ a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, =
* Link rules topic name: (default is %SYSTEMWEB%.InterWikis)
* Set RULESTOPIC =

* Inter-link format, with variables:
* Inter-link format, with formatting tokens:
| *Token* | *Meaning* |
| $site | Site alias |
| $page | Page (part after colon) |
| $url | Site URL (might contain $page) |
Expand Down
4 changes: 3 additions & 1 deletion MailerContrib/lib/TWiki/Contrib/MailerContrib/Subscriber.pm
Expand Up @@ -266,7 +266,9 @@ sub stringify {
$unsubs = " - $unsubs" if $unsubs;

my $name = $this->{name};
if ($name !~ /^($TWiki::regex{wikiWordRegex}|$TWiki::cfg{MailerContrib}{EmailFilterIn})$/) {
if ($name =~ /^$TWiki::regex{wikiWordRegex}$/) {
$name = '%USERSWEB%.'.$name;
} elsif ($name !~ /^$TWiki::cfg{MailerContrib}{EmailFilterIn})$/) {
$name = $name =~ /'/ ? '"'.$name.'"' : "'$name'";
}
return " * " . $name . ": " .
Expand Down
4 changes: 2 additions & 2 deletions PatternSkin/data/TWiki/PatternSkin.txt
Expand Up @@ -56,13 +56,13 @@ The original Photoshop files of the skin graphics (mainly background images) are

If you have set the SKIN variable setting to =pattern= and you still don't see the layout as on the <a href="%ATTACHURL%/patternskin_screenshot_full.png">screenshot</a>, a few settings in may have been disabled.

Check these variables here:
Check these preference settings here:
* TWIKILAYOUTURL = %TWIKILAYOUTURL%
* TWIKISTYLEURL = %TWIKISTYLEURL%
* TWIKICOLORSURL = %TWIKICOLORSURL%
* SKIN = %SKIN%

If TWIKILAYOUTURL or TWIKISTYLEURL don't give a value or point to non-existing files, check in %SYSTEMWEB%.DefaultPreferences and in %USERSWEB%.SitePreferences that the following variables do exist and that they are set to on:
If TWIKILAYOUTURL or TWIKISTYLEURL don't give a value or point to non-existing files, check in %SYSTEMWEB%.DefaultPreferences and in %USERSWEB%.SitePreferences that the following preferences do exist and that they are set to on:
<pre>
* %<nop>SYSTEMWEB%.PatternSkin settings:
* <nop>Set TWIKILAYOUTURL = %<nop>PUBURLPATH%/%<nop>SYSTEMWEB%/PatternSkin/layout.css
Expand Down
6 changes: 3 additions & 3 deletions PatternSkin/data/TWiki/PatternSkinColorSettings.txt
Expand Up @@ -11,7 +11,7 @@ Let %SYSTEMWEB%.PatternSkin point to the custom-made colors style sheet. In [[%S
</verbatim>

---+++!! Step 2
Edit this topic, and change the color variables as you like.
Edit this topic, and change the color preference settings as you like.

---+++!! Step 3
Save the topic. This will generate an [[%PUBURLPATH%/%SYSTEMWEB%/PatternSkin/theme-colors.css][attachment]] to topic [[PatternSkin]].
Expand All @@ -20,7 +20,7 @@ Save the topic. This will generate an [[%PUBURLPATH%/%SYSTEMWEB%/PatternSkin/the

%ICON{"info"}% For more help on customizing styles, see [[PatternSkinCustomization]].

---++!! Color variables
---++!! Color preference settings
%TOC%

---++ Logical groupings
Expand Down Expand Up @@ -182,7 +182,7 @@ Save the topic. This will generate an [[%PUBURLPATH%/%SYSTEMWEB%/PatternSkin/the
---++++ FORM_HEADER_TEXT Header text on form background
* Set FORM_HEADER_TEXT = #036

<!-- END OF COLOR VARIABLES -->
<!-- END OF COLOR PREFERENCES -->

Do not change the text below this line unless you know what you are doing!
---
Expand Down
8 changes: 4 additions & 4 deletions PatternSkin/data/TWiki/PatternSkinCssCookbook.txt
Expand Up @@ -21,7 +21,7 @@ Have a look at PatternSkinColorSettings.
---+++ When you need lots of graphic changes: Rewriting CSS
* Create a new topic that will contain your new CSS files
* Attach 3 new style sheets to the topic
* Point the CSS variables in [[%SYSTEMWEB%.DefaultPreferences]] or [[%USERSWEB%.SitePreferences]] to your new files:
* Point the CSS preference settings in [[%SYSTEMWEB%.DefaultPreferences]] or [[%USERSWEB%.SitePreferences]] to your new files:
<pre>
* <nop>Set TWIKILAYOUTURL = %<nop>PUBURLPATH%/%<nop>SYSTEMWEB%/YourNewTopic/layout.css
* <nop>Set TWIKISTYLEURL = %<nop>PUBURLPATH%/%<nop>SYSTEMWEB%/YourNewTopic/style.css
Expand All @@ -30,10 +30,10 @@ Have a look at PatternSkinColorSettings.

---+++ When you need to make small adjustments: Adding to existing CSS
With CSS you cannot remove already defined classes, you can only add to it, or overwrite existing styles. <br />
Overriding default CSS is done with 3 variables: =USERLAYOUTURL=, =USERSTYLEURL=, =USERCOLORSURL=.
Overriding default CSS is done with 3 preference settings: =USERLAYOUTURL=, =USERSTYLEURL=, =USERCOLORSURL=.
* Create a new topic that will contain your new CSS files
* Attach 1, 2 or 3 new style sheets to the topic, dependent on your CSS setup (if you don't change much, you might as well put everything in one CSS file, layout, margins and colors)
* Point the CSS variables in [[%SYSTEMWEB%.DefaultPreferences]] or [[%USERSWEB%.SitePreferences]] to your new files (below the =TWIKIXXXURL= variables):
* Point the CSS preference settings in [[%SYSTEMWEB%.DefaultPreferences]] or [[%USERSWEB%.SitePreferences]] to your new files (below the =TWIKIXXXURL= variables):
<pre>
* <nop>Set USERLAYOUTURL = %<nop>PUBURLPATH%/%<nop>SYSTEMWEB%/YourNewTopic/layout.css
* <nop>Set USERSTYLEURL = %<nop>PUBURLPATH%/%<nop>SYSTEMWEB%/YourNewTopic/style.css
Expand All @@ -44,7 +44,7 @@ Overriding default CSS is done with 3 variables: =USERLAYOUTURL=, =USERSTYLEURL=
* Set USERSTYLEURL = %<nop>PUBURLPATH%/%<nop>SYSTEMWEB%/YourNewTopic/style.css
</pre>

Instead of setting these variables in [[%SYSTEMWEB%.DefaultPreferences]] or [[%USERSWEB%.SitePreferences]], you can set these in your home topic, or in any other topic. Setting style URL variables in:
Instead of setting these preferences in [[%SYSTEMWEB%.DefaultPreferences]] or [[%USERSWEB%.SitePreferences]], you can set these in your home topic, or in any other topic. Setting style URL variables in:
* [[%SYSTEMWEB%.DefaultPreferences]] or [[%USERSWEB%.SitePreferences]]: the style is visible for all users, site-wide
* WebPreferences: the style is visible for all users in one web
* Home topic: the style is visible for that one user when viewing the site
Expand Down
12 changes: 6 additions & 6 deletions PatternSkin/data/TWiki/PatternSkinCustomization.txt
Expand Up @@ -96,9 +96,9 @@ view
---+++ How can I change the web logo?

By default the logo at the top left of each web points to the image with name =logo.gif= that is attached to each web's WebPreferences. <br />
The default variables that cause this behavior are defined in [[%WIKIPREFSTOPIC%]].
The preference settings that cause this behavior are defined in [[%WIKIPREFSTOPIC%]].

Redefine your custom variables in [[%LOCALSITEPREFS%]] (to keep %WIKIPREFSTOPIC% intact):
Redefine your custom preference settings in [[%LOCALSITEPREFS%]] (to keep %WIKIPREFSTOPIC% intact):
<blockquote><pre>
* Set <nop>WEBLOGONAME = logo.gif
* Set <nop>WEBLOGOIMG = %<nop>PUBURLPATH%/%<nop>BASEWEB%/%<nop>WEBPREFSTOPIC%/%<nop>WEBLOGONAME%
Expand All @@ -112,20 +112,20 @@ There are 2 ways to change the logo in a web:
<blockquote>
* Create a new image named =logo.gif= and attach it to the web's WebPreferences topic. %TWIKIWEB%.PatternSkin's stylesheet assumes the logo is 40px high. More about that later.
* You can also upload the image with FTP to =/pub/YourWeb/WebPreferences/=.
* Copy the above instructions ("Redefine your custom variables") and insert your logo name.
* Copy the above instructions ("Redefine your custom preference settings") and insert your logo name.
</blockquote>
*Using a new filename:*
<blockquote>
* Attach whatever image and attach it to the web's WebPreferences topic. Then add to the WebPreferences (under _Custom web preferences_):
<pre>
* Set <nop>WEBLOGONAME = your-logo-name.gif-or-png
</pre>
* Copy the above instructions ("Redefine your custom variables") and insert your logo name.
* Copy the above instructions ("Redefine your custom preference settings") and insert your logo name.
</blockquote>

---+++ How do I set a site-wide logo?

There is a bunch of site-wide logo variables in [[%LOCALSITEPREFS%]]: =WIKILOGOIMG=, =WIKILOGOURL= and =WIKILOGOALT=.
There are a bunch of site-wide logo preference settings in [[%LOCALSITEPREFS%]]: =WIKILOGOIMG=, =WIKILOGOURL= and =WIKILOGOALT=.
To change only the web logo image to site-wide, in [[%LOCALSITEPREFS%]] set:
<blockquote><pre>
* Set <nop>WEBLOGOIMG = %<nop>WIKILOGOIMG%
Expand Down Expand Up @@ -198,7 +198,7 @@ Create a new stylesheet with above definition in it, attach it to a topic and po

The image at the top is called "header art" - commonly the top image found on blog sites. The image that is displayed by default is set by the variable =WEBHEADERART=, defined in [[%WIKIPREFSTOPIC%]].

Redefine your custom variables in [[%LOCALSITEPREFS%]] (to keep %WIKIPREFSTOPIC% intact):
Redefine your custom preference settings in [[%LOCALSITEPREFS%]] (to keep %WIKIPREFSTOPIC% intact):
<blockquote><pre>
* <nop>Set WEBHEADERART = %<nop>PUBURLPATH%/%<nop>TWIKIWEB%/PatternSkin/TWiki_header.gif
* <nop>Set WEBHEADERBGCOLOR = somehexcolor (no quotes, for example: #ffffff)
Expand Down
2 changes: 1 addition & 1 deletion RenderListPlugin/data/TWiki/RenderListPlugin.txt
Expand Up @@ -321,7 +321,7 @@ __You get: (if installed)__

---++ <nop>%TOPIC% Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>RENDERPLUGIN_SHORTDESCRIPTION%==
Plugin settings are stored as preference settings. To reference a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>RENDERPLUGIN_SHORTDESCRIPTION%==

* One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
* Set SHORTDESCRIPTION = Render bullet lists in a variety of formats
Expand Down
2 changes: 1 addition & 1 deletion SlideShowPlugin/data/TWiki/SlideShowPlugin.txt
Expand Up @@ -82,7 +82,7 @@ This text is not part of the slideshow

---++ <nop>%TOPIC% Global Settings

Plugin settings are stored as preferences variables. To reference a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>SLIDESHOWPLUGIN_SHORTDESCRIPTION%==
Plugin settings are stored as preference settings. To reference a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, i.e. ==%<nop>SLIDESHOWPLUGIN_SHORTDESCRIPTION%==

* One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
* Set SHORTDESCRIPTION = Create web based presentations based on topics with headings.
Expand Down
2 changes: 1 addition & 1 deletion SmiliesPlugin/data/TWiki/SmiliesPlugin.txt
Expand Up @@ -37,7 +37,7 @@ Here is the list of smilies supported by this plugin. To add others, attach new

---++ <nop>%TOPIC% Global Settings

Plugin settings are stored as preferences variables. To reference
Plugin settings are stored as preference settings. To reference
a plugin setting write ==%<nop>&lt;plugin&gt;_&lt;setting&gt;%==, for example, ==%<nop>INTERWIKIPLUGIN_SHORTDESCRIPTION%==

* One line description, shown in the %SYSTEMWEB%.TextFormattingRules topic:
Expand Down

0 comments on commit 2b19db7

Please sign in to comment.