[Pmwiki-users] pmwiki-0.4.23 released w/major changes
Patrick R. Michaud
pmichaud at pobox.com
Thu May 1 20:02:20 CDT 2003
Hello, everyone!
PmWiki 0.4.23 has just been released and is available from
http://www.pmichaud.com/pub/pmwiki . There are some reasonably
major changes to the pmwiki.php code in this version which could
potentially cause some problems when upgrading, so I felt I
should send an announcement and outline some of the details.
In some sense I think this release could almost be termed a
major release (i.e., 0.5.0 instead of 0.4.23), but I decided
that most people wouldn't see any real difference and so PmWiki
should stick with the 0.4 numbers for now.
Most sites should be able to upgrade from previous 0.4.x
versions to 0.4.23 without any problems. The sites that may
run into difficulties will be those that have greatly customized
search or link handling facilities. More details are given
below, but if you find yourself reading a section and having no
idea what I'm writing about, then the odds are very good that
you aren't affected by it and you can safely ignore it.
1. New search function
Based on some requests from John Rankin and others, I've gone ahead
and enhanced the search functionality that comes with PmWiki. Most
importantly, most of the search code has been moved out of pmwiki.php
and into a separate scripts/search.php file. In particular, search
forms need to include a page name when submitting the search text
(previously one could just post a form directly to the pmwiki.php
script without supplying a page name).
PmWiki used to do simple text string searches; now the search will
find pages containing all of the words (in any order) given by
the search string. To search for a phrase, surround the phrase in
quotation marks. Placing a hyphen (-) in front of a word or phrase
excludes all of the pages containing that word or phrase. Finally,
placing a group name and a slash at the front of the search string
will limit the search to pages in the specified group.
I have some ideas to enhance the search capability a bit more,
especially in the formatting and output of the search results. But
that will come later. Also, if anyone wants to update the default
Main.SearchWiki page on pmichaud.com to give better search
instructions, I'd really appreciate it.
2. $TableCellAttr variable
A new $TableCellAttr variable has been added that gives the HTML attributes
to be included in <td> tags for ||-style tables. The default value
is "valign='top'".
3. Changes to LinkPatterns array
This is a fairly esoteric change--most sites will never mess with
$LinkPatterns and probably will never need to. Unless you're one of those
sites that is into heavy link customizations, you can safely ignore
this section.
The $LinkPatterns array now gives the wiki administrator more control over
the sequence in which patterns are processed for links. This is accomplished
by adding a "sequence index" as the first dimension of the $LinkPatterns
array. Thus, where pmwiki.php previously did
$LinkPatterns["\\bmailto:($UrlPathPattern)"] = "<a href='$0'>$1</a>";
$LinkPatterns["\\b($UrlMethodPattern):($UrlPathPattern)"] = $FmtUrlLink;
//...
$LinkPatterns["\\b($GroupNamePattern([\\/.]))?($FreeLinkPattern)"] =
$FmtWikiLink;
$LinkPatterns[$FreeLinkPattern] = $FmtWikiLink;
$LinkPatterns["\\b$GroupNamePattern([\\/.])$WikiWordPattern"] =
$FmtWikiLink;
$LinkPatterns["\\b$WikiWordPattern"] = $FmtWikiLink;
it now does
$LinkPatterns[200]["\\bmailto:($UrlPathPattern)"] = "<a href='$0'>$1</a>";
$LinkPatterns[300]["\\b($UrlMethodPattern):($UrlPathPattern)"] =
$FmtUrlLink;
// ...
$LinkPatterns[500]["\\b($GroupNamePattern([\\/.]))?($FreeLinkPattern)"] =
$FmtWikiLink;
$LinkPatterns[600][$FreeLinkPattern] = $FmtWikiLink;
$LinkPatterns[700]["\\b$GroupNamePattern([\\/.])$WikiWordPattern"] =
$FmtWikiLink;
$LinkPatterns[800]["\\b$WikiWordPattern"] = $FmtWikiLink;
The numbers 200, 300, etc., are sequence numbers that determine the
order in which link patterns are to be processed. For example, mailto:
links (200) are processed before regular URL-links (300), which are
processed before Group/{{free links}} (500), etc. So, if an administrator
need to add a pattern to be processed after FreeLink patterns but
before WikiWord patterns, simply add the new LinkPattern at a number
between 600 and 700.
Existing local.php scripts that modify $LinkPatterns can get the
same functionality as before by adding patterns at a number less than 200.
Multiple patterns can be stored at the same number, in which case those
patterns are processed in the order they were created.
4. Custom authorization function
PmWiki's authentication mechanism is simplistic by design. One of the
big reasons I created my own wiki (rather than using an existing one)
was because I wanted the ability to password-protect pages without having
to worry about maintaining individual "user accounts". Still, there
are others who want to implement more sophisticated authentication
and authorization systems.
PmWiki now has a variable called $AuthFunction which should contain
the name of a function to perform authentication and authorization.
The default value for $AuthFunction is "BasicAuth", which is the
function that implements PmWiki's default authentication scheme.
A local.php file can change $AuthFunction to refer to any admin-defined
replacement function for authentication. Details about how to write
a custom authentication function are well beyond the scope of this email.
These are the biggest changes that have been made to PmWiki in 0.4.23, and
there are a number of minor bugfixes and improvements as well. As always,
feel free to email the listserv or me with questions. And, thanks
to all for your continued interested and support of PmWiki!
Pm
More information about the pmwiki-users
mailing list