%WEBPREFSTOPIC% topic, and upload a logo file, ex: =mylogo.gif=. You can upload by [[FileAttachment][attaching the file]] to %WEBPREFSTOPIC%, or, to avoid clutter, to any other topic in the same web, e.g. =LogoTopic=. Sample preference setting in %WEBPREFSTOPIC%:
- * Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif
+ * Set MYLOGO = %PUBURL%/%WEB%/LogoTopic/mylogo.gif
Preference settings are *case sensitive*. (Foswiki by convention always writes settings in upper case.)
-
-
+
* Set lower = This is LOWER
* Set LOWER = This is UPPER
* Set LoWeR = This is MIXED
-Expand %lower%, %LOWER% and %LoWeR%
-
-Expand %lower%, %LOWER% and %LoWeR%.
+Expand %lower%, %LOWER% and %LoWeR%
-%I% preference settings can easily be disabled with a # sign. Example:%BR%
- * #Set DENYWEBCHANGE = %USERSWEB%.UnknownUser
+Expand %lower%, %LOWER% and %LoWeR%.
---+++ Hiding preference settings
-%I% You can hide preference settings in the output by enclosing them in HTML comments; for example,
+
+You can hide preference settings in the output by enclosing them in HTML comments; for example,
+
-
+-->
You can also set preference settings in a topic by clicking the link =Edit topic preference settings= under =More topic actions=. Preferences set in this manner are known as 'meta' preferences and are not visible in the topic text, but take effect nevertheless.
+*If the same setting appears as both an inline setting, and in topic meta settings, the meta setting will override the inline setting!* There is no warning when the setting is duplicate. This should be avoided to prevent confusion.
-%X% *Caution* If your topic will be used in an INCLUDE, it is recommended to not use HTML comments. instead, set preferences
-into the topic metadata by using the "Edit Settings for this topic" button on the "More topic actions" page. Settings in an included topic are always ignored,
-but nested comments will break the HTML.
+%X% *Caution* If your topic will be used in an INCLUDE, it is recommended to not use HTML comments. instead, set preferences
+into the topic metadata by using the "Edit Settings for this topic" button on the "More topic actions" page. Settings in an included topic are always ignored, but nested comments will break the HTML.
---+++ Order of preference settings
-If you are setting a preference and using it in the same topic, note that Foswiki reads all the preference settings from the saved version of the topic before it displays anything. This means you can use a setting anywhere in the topic, even if you set it at the very end. *But beware:* it also means that if you change the setting of a macro you are using in the same topic, ==Preview== will show the wrong thing, and you must ==Save== the topic to see it correctly.
+If you are setting a preference and using it in the same topic, note that Foswiki reads all the bullet style preference settings from the saved version of the topic before it displays anything. This means you can use a setting anywhere in the topic, even if you set it at the very end. *But beware:* it also means that if you change the setting of a macro you are using in the same topic, ==Preview== will show the wrong thing, and you must ==Save== the topic to see it correctly. (=%SET{}%= style settings _are_ assigned during the topic rendering, and their effect will be visible in the preview.)
---+++ Preference settings and topic revision history
-Foswiki always reads the settings from the most current topic revision, so viewing older revisions of a topic can show unexpected results.
+Foswiki always reads the bullet style settings from the most current topic revision, so viewing older revisions of a topic can show unexpected results.
-And especially important, *preference settings are never overridden or set in "%INCLUDE{" topics.* %IF{"%BASETOPIC%=Macros" then="in the below example about weather conditions, note the difference in the CONDITIONS expansion" }%
+And especially important, *bullet style preference settings are never overridden or set in when a topic content is obtained by "%INCLUDE{".* However *%SET{ style settings can be overidden* when an INCLUDE is expanded.
+%IF{"%BASETOPIC%=Macros" then="in the below example about weather conditions, note the difference in the CONDITIONS expansion" }%
#MacroParam
---+++ Parameters
+
-Note that !%CONDITIONS% expands differently when this example is viewed in %IF{"'%BASETOPIC%'='Macros'" then="[[PreferenceSettings#MacroParam][PreferenceSettings]]" else="[[Macros#MacroParam][Macros]]"}%. This is because Set statement are not active in included topics. The including topic's set statements are used.
+_The following block of code was read from [[%TOPIC%]], and the "Set" statements were defined in [[%BASETOPIC%]]_
+
+Macros defined using preference settings can take parameters. These are symbols passed in the call to the macro to define local macros that will be expanded in the output.
+For example, Both [[Macros]] and [[PreferenceSettings]] have a Set statement that defines the =%CONDITIONS%= macro as shown here:
+
+ * Set CONDITIONS = According to [[%TOPIC%]] the %WHAT% is %STATE% today (Set in ...).
+The =%TOPIC%= shows where the CONDITIONS macro is expanded, and the ... shows where the Set statement was actually defined.
-Macros defined using preference settings can take parameters. These are symbols passed in the call to the macro to define local macros that will be expanded in the output. For example,
-
- * Set CONDITIONS = According to [[%BASETOPIC%]] the %WHAT% is %STATE% today (Set in ...).
-
You can call this macro passing in values for =WHAT= and =STATE=. For example:
* =%CONDITIONS{WHAT="sea" STATE="choppy"}%=
- * expands to =%CONDITIONS{WHAT="sea" STATE="choppy"}%=.
+ * expands to =%CONDITIONS{WHAT="sea" STATE="choppy"}%=
+
+Note that !%CONDITIONS% expands differently when this example is viewed in %IF{"'%BASETOPIC%'='Macros'" then="[[PreferenceSettings#MacroParam][PreferenceSettings]]" else="[[Macros#MacroParam][Macros]]"}%.
+This is because Set statement are not active in included topics. The including topic's set statements are used.
---++++ Parameter defaults
* The special parameter name =DEFAULT= gets the value of any unnamed parameter in the macro call.
* Parameter macros can accept a =default= parameter so that they expand to something even when a value isn't passed for them in the call.
Example:
-
- * Set WEATHER = It's %DEFAULT{default="raining"}%.
-
+
+
+ * Set WEATHER = It's %DEFAULT{default="raining"}%.
* =%WEATHER%= expands to =%WEATHER%=
* =%WEATHER{"sunny"}%= expands to =%WEATHER{"sunny"}%=
The standard [[FormatTokens][formatting tokens]] can be used in parameters. They will be expanded immediately when the macro is instantiated.
+
%X% Note that parameters *override* all other macros, including system defined macros, in the expansion of the macro where they are used.
---+++ Access Control Settings
-These are special types of preference settings to control access to content. AccessControl explains these security settings in detail. Parameters are *not* available in access control settings.
+These are special types of preference settings to control access to content. AccessControl explains these security settings in detail. Parameters are *not* available in access control settings. AccessControl settings cannot be set or changed by the =%SET{}%= macro.
---+++ Local values for preferences
-Certain topics (user, plugin, web, site and default preferences topics) have a problem; macros defined in those topics can have two meanings. For example, consider a user topic. A user may want to use a double-height edit box when they are editing their home topic - but *only* when editing their home topic. The rest of the time, they want to have a normal edit box. This separation is achieved using =Local= in place of =Set= in the macro definition. For example, if the user sets the following in their home topic:
-
- * Set EDITBOXHEIGHT = 10
- * Local EDITBOXHEIGHT = 20
-
-Then, when they are editing any other topic, they will get a 10 high edit box. However, when they are editing their home topic they will get a 20 high edit box.
+
+Certain topics (user, plugin, web, site and default preferences topics) have a problem; macros defined in those topics can have two meanings. For example, consider a user topic. A user may want to use the wiki text editor, but *only* when editing their home topic. The rest of the time, they want to use the default Wysiwyg editor. This separation is achieved using =Local= in place of =Set= in the macro definition. For example, if the user sets the following in their home topic:
+
+ * Local NOWYSIWYG = 1
+
+Then, when they are editing any other topic, they will get the Wysiwyg editor. However, when they are editing their home topic they will get the wikitext editor.
=Local= can be used wherever a preference needs to take a different value depending on where the current operation is being performed.
-Use this powerful feature with great care! =%ALLVARIABLES%= can be used to get a listing of the values of all macros in their evaluation order, so you can see macro scope if you get confused.
-
+=%SHOWPREFERENCE%= can be used to get a listing of the values of all macros in their evaluation order, so you can see macro scope if you get confused.
+%SHOWPREFERENCE{"CONDITIONS"}% expands into:
+%SHOWPREFERENCE{"CONDITIONS"}%
- *Deprecation warning*. The setting used in
-this example, EDITBOXHEIGHT, is being deprecated and will be removed from
-Foswiki 2.0 Note that if the edit box size is changed using the javascript
-controls in the lower right corner of the edit box window, those settings will
-be used, and the EDITBOX* settings will be ignored.
-
+
-%META:FILEATTACHMENT{name="prefs-stack.jpg" attr="h" comment="" date="1512501336" size="52064" user="ProjectContributor" version="1"}%
-%META:FILEATTACHMENT{name="prefs-stack.odp" attr="h" comment="" date="1512501336" size="15256" user="ProjectContributor" version="1"}%
+%META:FILEATTACHMENT{name="prefs-stack.jpg" attr="h" comment="" date="1519485277" size="52064" user="ProjectContributor" version="1"}%
+%META:FILEATTACHMENT{name="prefs-stack.odp" attr="h" comment="" date="1519485277" size="15256" user="ProjectContributor" version="1"}%
diff --git a/core/data/System/SystemRequirements.txt b/core/data/System/SystemRequirements.txt
index 58a5f26019..d8ecf0c756 100644
--- a/core/data/System/SystemRequirements.txt
+++ b/core/data/System/SystemRequirements.txt
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="ProjectContributor" date="1516511288" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" date="1519446557" format="1.1" version="1"}%
%META:TOPICPARENT{name="AdminDocumentationCategory"}%
---+ System Requirements
@@ -52,6 +52,7 @@ Install apache and rcs: ==apt-get install apache2 rcs==
| CGI::Session | =libcgi-session-perl= | |
| Crypt::PasswdMD5 | =libcrypt-passwdmd5-perl= | |
| Digest::SHA | =libdigest-sha-perl= | *First shipped in perl 5.9.3 |
+| Email::Address | =libemail-address-perl= | |
| Email::MIME | =libemail-mime-perl= | |
| Encode | =libencode-perl= | |
| Error | =liberror-perl= | |
@@ -119,6 +120,7 @@ Install apache2, rcs, and perl-CPAN
| CGI::Session | =perl-CGI-Session= | |
| Crypt::PasswdMD5 | =perl-Crypt-PasswdMD5= | |
| Digest::SHA | =perl-Digest-SHA= | *First shipped in perl 5.9.3 |
+| Email::Address | =perl-Email-Address= | |
| Email::MIME | =perl-Email-MIME= | |
| Encode | =perl-Encode= | |
| Error | =perl-Error= | |
@@ -195,6 +197,7 @@ Install =www-servers/apache=, =dev-vcs/rcs=, and =dev-lang/perl=
| CGI::Session | =dev-perl/CGI-Session= | |
| Crypt::PasswdMD5 | =dev-perl/Crypt-PasswdMD5= | |
| Digest::SHA | | Included with perl |
+| Email::Address | =dev-perl/Email-Address= | |
| Email::MIME | =dev-perl/Email-MIME= | |
| Error | =dev-perl/Error= | |
| Encode | | Included with perl |
@@ -257,6 +260,7 @@ Install =apache24=, =rcs=, and =perl5=
| CGI::Session | =p5-CGI-Session= | |
| Crypt::PasswdMD5 | =p5-Crypt-PasswdMD5= | |
| Digest::SHA | =p5-Digest-SHA= | *First shipped in perl 5.9.3 |
+| Email::Address | =p5-Email-Address= | |
| Email::MIME | =p5-Email-MIME= | |
| Encode | =p5-Encode= | |
| Error | =p5-Error= | |
@@ -321,6 +325,7 @@ If run as root, the modules will be installed in the System perl. Otherwise th
| Crypt::PasswdMD5 | |
| Digest::SHA | Included with perl |
| Error | |
+| Email::Address | |
| Email::MIME | |
| Encode | |
| File::Copy::Recursive | |
diff --git a/core/lib/Foswiki/Contrib/core/DEPENDENCIES b/core/lib/Foswiki/Contrib/core/DEPENDENCIES
index 32ddf84ed3..7dfa69ce74 100755
--- a/core/lib/Foswiki/Contrib/core/DEPENDENCIES
+++ b/core/lib/Foswiki/Contrib/core/DEPENDENCIES
@@ -17,6 +17,7 @@ Crypt::PasswdMD5,>=0,cpan,Required, for admin password hash and .htpasswd encodi
Crypt::SMIME,>=0,cpan,Optional S/MIME email signing feature.
Crypt::X509,>=0,cpan,Optional S/MIME email signing feature.
Convert::PEM,>=0,cpan,Optional S/MIME email signing feature.
+Email::Address,>1.00,cpan,Required for email addresses.
Email::MIME,>=1.903,cpan,Required for correct handling of email MIME structure.
Email::Simple,>=2.206,cpan,Required for compatibility with Email::MIME.
Encode,>=2.01,cpan,Required for international characters.
diff --git a/core/pub/System/PreferenceSettings/prefs-stack.jpg b/core/pub/System/PreferenceSettings/prefs-stack.jpg
index 0eaf404003..27f266daef 100644
Binary files a/core/pub/System/PreferenceSettings/prefs-stack.jpg and b/core/pub/System/PreferenceSettings/prefs-stack.jpg differ
diff --git a/core/pub/System/PreferenceSettings/prefs-stack.odp b/core/pub/System/PreferenceSettings/prefs-stack.odp
index 8589c45b91..b8ff6fc4ca 100644
Binary files a/core/pub/System/PreferenceSettings/prefs-stack.odp and b/core/pub/System/PreferenceSettings/prefs-stack.odp differ