You edit | You see |
---|---|
Casablanca is Humphrey Bogart's finest film. Of all the gin joints in all the world, you had to walk into mine. | Casablanca is Humphrey Bogart's finest film. Of all the gin joints in all the world, you had to walk into mine. |
and you start editing this text before going for coffee. Meanwhile, a colleague also starts editng the same topic and changes the text to: | |
The Maltese Falcon is Humphrey Bogart's finest film. Of all the gin joints in all the world, you had to walk into mine. | The Maltese Falcon is Humphrey Bogart's finest film. Of all the gin joints in all the world, you had to walk into mine. |
When you get back from coffee, you finish your edit, changing the text to | |
To Have or Have Not is Humphrey Bogart's finest film. You know how to whistle, don't you Steve? You just put your lips together and blow. | To Have or Have Not is Humphrey Bogart's finest film. You know how to whistle, don't you Steve? You just put your lips together and blow. |
and saving it. The topic will now look like this when you display it: | |
<div class="twikiConflict"><b>CONFLICT</b> original 5:</div> Casablanca is <div class="twikiConflict"><b>CONFLICT</b> version 6:</div> The Maltese Falcon is <div class="twikiConflict"><b>CONFLICT</b> version 7:</div> To Have or Have Not is <div class="twikiConflict"><b>CONFLICT</b> end</div> Humphrey Bogart's finest film. You know how to whistle, don't you Steve? You just put your lips together and blow. |
CONFLICT original 5:
Casablanca is
CONFLICT version 6:
The Maltese Falcon is
CONFLICT version 7:
To Have or Have Not is
CONFLICT end
Humphrey Bogart's finest film.
You know how to whistle, don't you Steve?
You just put your lips together and blow.
|
mailnotify
cron script has moved out of the bin
directory and into the tools
directory - active crontab entries needs to be updated accordingly.
.htpasswd
password manager, e-mail addresses that new users provide during registration are stored in the .htpasswd
file. To aid in migration, if TWiki can't find a registered e-mail address in .htpasswd
, it will still look in the personal topic. All users should register a valid e-mail address at ChangeEmailAddress.
If a different password manager is in use (e.g. LDAP, or 'none'), user e-mails will still be stored in personal topics. Sites that use other password systems (such as LDAP) should consider implementing a TWiki password manager, so that TWiki can look up email addresses, rather than storing them in personal topics.
%INCLUDE{}%
variables have a predefined set of parameters. In the past, any parameters not in this set were simply ignored. With Dakar, these parameters are now defined as TWikiVariables within the included topic - for example,
%INCLUDE{ "BugList" FAVOURITE="Damsel Flies" }%will define
%FAVOURITE%
as Damsel Flies
in the included topic, so if BugList
contained the line
My favourite bugs are %FAVOURITE%it will be expanded to
My favourite bugs are Damsel Flies
%INCLUDE{}%
variable allows to include only a named section of the included topic. These sections are defined in the included topic using the %STARTSECTION%
and %ENDSECTION%
variables. For example, if the included topic has:
---+ News ---++ IT News All news related to IT. %STARTSECTION{"itnews"}% * 2005-10-02 Final deployment of Dakar * 2005-10-01 Moving platform to Dakar %ENDSECTION{"itnews"}%Using
%INCLUDE{ "AllNews" section="itnews" }%
will produce:
* 2005-10-02 Final deployment of Dakar * 2005-10-01 Moving platform to DakarThis syntax also allows for nested sections. For example, given the following topic:
%STARTSECTION{"outer"}% * Top Outer Text %STARTSECTION{"inner"}% * Inner Text %ENDSECTION{"inner"}% * Top Outer Text %ENDSECTION{"outer"}%Using
%INCLUDE{"SampleTopic" section="outer"}%
will produce:
* Top Outer Text * Inner Text * Top Outer TextAnd
%INCLUDE{"SampleTopic" section="inner"}%
will produce:
* Inner TextOverlapped sections are also allowed.
configure
. Other new prerequisites are CPAN:CGI::Session and CPAN:CGI::Cookie, if you want to take advantage of the new session support.
If you want user interface internationalization support, CPAN:Locale::Maketext::Lexicon and CPAN:Encode (in perl 5.8's core) are required, as well as perl 5.8 or higher. See TWiki:Codev.UserInterfaceLocalisation for details on TWiki internationalization support.
LocalLib.cfg
that contains local path settings. setlib.cfg
contains documentation of what has to be done. Old setlib.cfg
files will not work with Dakar.
TWiki.cfg
now contains all the default configuration settings, and the installer should provide a file called LocalSite.cfg
that contains just those settings that are different than the defaults. The syntax of the settings in the file has also changed. Old TWiki.cfg
files will not work with Dakar. The UpgradeTWiki script can be used to automate most of the necessary changes.
testenv
/ configure
testenv
has been removed, and replaced with the new configure
interface. This interface performs all the checking functions of the old testenv
, adds several new ones (including permissions checks) and also acts as a browser interface allowing you to do all TWiki configuration from the browser. configure
is now the main installation interface for TWiki.
The configure
script can be used like the old testenv
for public review of the configuration of the site. Saving from the interface is password-protected, using a password set in the configuration files, so to ordinary users configure
just looks like a posh version of testenv
. If you want to hide your configuration from public view, you can restrict access to the script using webserver access controls (Apache users see the Apache documentation on the 'require' directive for more infomation on how to do this).
configure
optional features configure
.
%ALLVARIABLES%
in a topic to get a dump of all preferences set in that context.
Permissions controls are not affected by this change.
FAVICON
favicon.ico
is a small graphic that can appear in a variety of places in the browser: the titlebar, the taskbar, the address bar, bookmarks/favourites, and page tabs. Each web browser has a unique user interface, and as a result uses the Favicon in different ways. Most browsers display it in most of the locations listed.
Out of the box, TWiki is configured to easily customise the favicon.ico
for each web. To switch to a new favicon.ico
, upload it to the desired web's WebPreferences. favicon.ico
, hardcode a specific web, for example: FORCENEWREVISIONCHECKBOX
$editLockTime
in lib/TWiki.cfg
, now {ReplaceIfEditedAgainWithin}
), TWiki will fold together your changes. This is often the "right thing to do", as it can reduce the visual clutter of diffs.
The "Force New Revision" checkbox is a way to force it to create a separate revision each time you save.
The TWiki.TWikiPreferences variable FORCENEWREVISIONCHECKBOX
controls whether this is checked by default or not.
On a related note, you can force every save to be a new revision number by editing lib/TWiki.cfg
and setting {ReplaceIfEditedAgainWithin}
to 0.
NOTE: Although this feature is being introduced in this release, it is also being deprecated at the same time. TWiki:Codev.EdinburghRelease is planned to provide the ability to elide revisions at the GUI level, rather than the Store level, thus obviating the need for this stopgap measure.
WEBLOGONAME
, WEBLOGOIMG
, WEBLOGOURL
, WEBLOGOALT
logo.gif
to a web's WebPreferences, and it will appear in the top-left corner.
To change the logo's filename, set the WEBLOGONAME
variable. You'll especially need to do this if you use a different logo file format: WEBLOGOURL
variable. For example: WIKILOGOIMG
, WIKILOGOURL
, WIKILOGOALT
WIKITOOLNAME
. If you change WIKITOOLNAME
, you'll probably want to change these variables, too. WIKILOGOIMG
, WIKILOGOURL
, WIKILOGOALT
, and WIKITOOLNAME
are now used more consistently together.
FINALPREFERENCES
setting prevents particular preference settings from being over-ridden at a lower level. The hierarchy of how FINALPREFERENCES
settings are applied has been clarified/formalized as reflected in the following chart:
Level | Set By | Local site examples |
---|---|---|
default site | %TWIKIWEB%.TWikiPreferences or %WIKIPREFSTOPIC% | DefaultPreferences |
local site | %MAINWEB%.TWikiPreferences or %LOCALSITEPREFS% | SitePreferences |
web | WebPreferences | WebPreferences |
user | In one's user topic | WikiGuest |
topic | "Edit topic preferences settings" under "More topic actions" | TWikiReleaseNotes04x00x00 |
FINALPREFERENCES
are set in Main.SitePreferences so as not to conflict with preference settings in that topic.
mod_perl
support improvements @INC
path in mod_perl
, that mainly impacts plugins that lazy-load modules. You should use the PerlSetEnv
directive that mod_perl
provides to make sure that your TWiki lib
directory is permanently on the path, if you are using mod_perl
.
configure
. To enable and disable plugins, use the configure
interface. The entire @INC path is searched for plugins, so you can easily point at plugins outside the installation. However only the first instance of a plugin on the @INC path will be found (it is a path, after all).
%INSTALLEDPLUGINS%
and %DISABLEDPLUGINS%
are no longer supported in TWikiPreferences. If you have set %INSTALLEDPLUGINS%
in TWikiPreferences, you need to move that setting into the {PluginsOrder}
configuration key, using the configure
interface. To disable plugins, uncheck them in the configure
interface, and save the changes.
configure
interface. There are some incompatibilities with TWiki:Plugins.SessionPlugin, with resepect to the in-line variables. See TWikiUserAuthentication in the release for full details of how authentication works now. TWiki also now supports the concept of pluggable password managers, making the integration of corporate authentication services much simpler.
Administrators, especially of public sites, need to be aware of the security implications of cookied sessions, and the potential risks of cross-site scripting attacks that may be used to steal user sessions. See TWikiUserAuthentication for more details.
ALLOWWEBVIEW
set to AdminGroup.
.htpasswd
file - you can safely edit this file with a text editor to modify the info field that contains the e-mail addresses (the format of each line in this file is username>::
, and TWiki expects the info field to be a ;-separated list of e-mail addresses). Password managers for other systems e.g. LDAP can esily be extended to support the new API. If the password manager does not have an e-mail address for a user, then TWiki will still look in the users' personal topic.
The script tools/upgrade_emails.pl
can be used to extract e-mail addresses for existing TWiki users from personal topics, and add them to the password manager. mailnotify
script has been retired in favour of the MailerContrib. See MailerContrib for information about functional changes.
WebPreferences.txt
) will be considered to be webs. This may result in directories that used to return search matches no longer doing so.
{AllowInlineScript}
setting in the Security section of configure
.
%VARIABLE%s
depended on where they were expanded in the code. The parser was somewhat crude, and could easily be confused when embedded variables (variables embedded in the parameters of other variables) were used.
The parser has been replaced in Dakar with a deterministic variable parser with predictable behaviour. Specifically, variables are now always evaluated left to right and inside out. For example, consider %VAR2{ "%VAR1{ "%VAR0{ "params" }%" }%" }% %VAR3%
. Previously, the expansion order would have depended on the order of expressions in the code, so the expansion may have proceeded VAR3 - VAR0 - VAR2 - VAR1. If you were lucky, this was the intended order. In Dakar, the order is now guranteed to be VAR0 - VAR1 - VAR2 - VAR3 (i.e. inside out and left to right).
The main impact of this is that some TWikiApplications may cease to work if they have been written to take advantage of the old chaotic order. There is no way to predict which will work and which will fail, so you will have to deal with this on a case-by-case basis. In most cases TWikiApplication authors will have worked hard to do the "sensible thing" so instances of this problem should be rare.
Note that because the TWiki spec allows double quotes within double-quoted strings in certain variable parameters it has been impossible to make the parser 100% deterministic. There may still be pathological cases where the parser may fail. In these cases, consider how open and close curly brackets are matched up.
regex
type searches, you can use (%_G_%|%0A)
to match encoded newlines in field data in both old and new format topics, (%_Q_%|%22)
to match quotes, and (%_P_%|25)
for percent signs.
{AllowInlineScript}
in configure
to see if it is allowed on your site. If not, script sections will simply disappear from topics.
verbatim
tags to be on their own line. TWiki can now deal with inline verbatim blocks such as
blah<verbatim>inside</verbatim>afterresults in blah
insideafter NOTE: VARIABLES are still Set within verbatim tags (this is a historical peculiarity)
ALLVARIABLES
%ALLVARIABLES%
in a topic to get a dump of all variables set in that context. Invaluable for debugging those tricky TWikiApplications!
IF
%IF()%
variable defines simple conditional statements that are evaluated at view time. This allows you to include content conditionally based on environmental factors. See IfStatements for more information on usage.
$count(reg-exp)
variable in Formatted Search view.mylocalskin.tmpl
and then setting Set SKIN = mylocalskin,pattern
mylocalskin
, it will be picked up when you view a topic because mylocalskin
is first on the search path. But you didn't define edit.mylocalskin.tmpl
, so when you edit the next skin on the search path will be used instead (in this case edit.pattern.tmpl
). You can put as many skins on the search path as you like.
As with older releases, setting SKIN (or the skin
parameter in the URL) replaces the existing skin path setting. Dakar supports extension of the path as well, using covers.
Set COVER = mylocalskin
cover
URL parameter. For example, /foswiki/TWiki/WhatIsWikiWiki?cover=print.pattern. This gives you an extra level of flexibility when defining skins.
See TWikiSkins for more information.
%WEB%
variables; only standalone %WEB%
text that potentially could be turned into a link (because of a WikiWord) needs to be escaped. Same for %MAINWEB%
and %TWIKIWEB%
.
Examples:
%WEB%
-- needs to be escaped with <nop>%WEB%
(%WEB%)
-- needs to be escaped because of parenthesis
"%WEB%"
-- no need to escape, does not get linked
<b>%WEB%</b>
-- no need to escape, does not get linked
%WEB%.%TOPIC%
-- no need, is a Web.TopicName
(%WEB%.%TOPIC%)
-- no need, is a Web.TopicName
%WEB%
in a %SEARCH%
should not be escaped.
%EDITTOPIC%
. This was only available in view templates, and had no flexibility in formatting. It was also impossible to disable other active links, such as Attach.
Dakar release includes new support for "context if" parameters to the %TMPL:P%
construct. See TWikiTemplates for details. The default templates shipped with Dakar have been modified to use this support. %EDITTOPIC has been deprecated, though it is still available as a simple edit link, defined in TWikiPreferences. Skin authors are strongly recommended to replace this link with context-if conditionals.
%TMPL:P%
now accepts parameters. Values passed in these parameters will be expanded when the %TMPL:DEF%
is instantiated. See TWikiTemplates for full details. (Remember, this happens at template expansion time, which is usually very early in the rendering process.)
/foswiki/TWiki/TWikiReleaseNotes04x00x00?make=Reliant&model=Robin
, the query string is ?make=Reliant;model=Robin
(yes, the semicolon is correct!)
%VARIABLE%
has been made semantically identical to %VARIABLE()%
, so if you set a preference named %VARIABLE%
it will automatically be instantiated in place of %VARIABLE{}%
. This is an elegant solution in several ways: first, it allows an administrator to electively disable TWikiVariables, simply by defining an overriding preference. Second, it rationalises the semantics in line with the common syntax. Third, it allows a single parser to do all the work, allowing localised optimisation. Fourth, it prevents a plugin from accidentally kidnapping system TWikiVariables (while this can still be done by registering a tag handler, it's a much more explicit process). Fifth, the ground rules are set for a possible future extension to support parameterised TWikiVariables e.g. Set CAR{make model accessory} = I drive %make% %model% with %accessory% in my dreams
%CAR{make="an Aston Martin" model="DB9" accessory="a gorgeous blonde"}%
TWiki::Func
API and call core functions directly are unlikely to work.
The restructuring of the code internals is such that there are no 1:1 equivalents for the old core functions. Only the TWiki::Func API is guaranteed to work.
You should convert your plugins to call the TWiki::Func
API. If you have called unpublished functions that have no equivalent in TWiki::Func
, then you may still be able to call the function via the TWiki "session" object, $TWiki::Plugins::SESSION
. See the implementation of the TWiki::Func
module for ideas on how to do this. However calling internals is not recommended, even using this new mechanism, as they are liable to change without prior notice.
TWiki::Func
API has been extended to expose a number of new core functions. Review TWikiFuncDotPm for details.
TWiki::Meta
API, which was previously for internal core use only, has now been exposed and may be used in plugins. See TWikiMetaDotPm for full details.