[Pmwiki-users] Some issues with the latest pmwiki release

John Rankin john.rankin at affinity.co.nz
Sun Apr 27 19:58:16 CDT 2003

1. local customisation breaks
The calendar/wikilog script uses ThisPage:?logdate=3Dyyyymm to navigate up =
and down the calendar months. For example, in April, I put up links to =
March and May:

March 2003 - May 2003

calendar for April 2003

One clicks on the March and May links to move back and forth. This no =
longer works with the current version of pmwiki. The HTML is correct, but =
the links no longer work. I put back 0.4.14 and it's fine.

Is there something I can change to get it working again??

2. $LinkPatterns again
I discovered another problem with including a $LinkPatterns to format =
Group/Title as a wikilink in local.php. If a URL contains a page reference,=
 such as http://www.pmichaud.com/.../Main/WikiSandbox, the local =
LinkPatterns gets in before the URL formatting. I can think of 3 solutions:=

- modify pmwiki.php to include ($GroupNamePattern)[.\\/]($PageTitlePattern)=
 at the end of $LinkPatterns, with an $EnableGroupTitleLinks parameter in =

- have pmwiki.php look for a file called local/linkpatterns.php after it =
has set the other link patterns

- split $LinkPatterns into $URLLinkPatterns and $PageLinkPatterns

3. Search and RecentChanges
I wonder if anyone has ever done a search and then clicked the =
RecentChanges link on the Search Results page... It looks for a page =
called 'null'/RecentChanges. If such a link is required at all, maybe it =
should link to Main/AllRecentChanges.

4. slightly enhanced search
I have been asked if there is a way to limit a search to a specified group.=
 I know pmwiki's search function is deliberately basic, but I'd like to =
propose that a searcher can enter 'group:search text' in the search box.

This would require the following changes to HandleSearch

- at the start before if ($needle=3D=3D'')
$needlegroup =3D '.';
if (preg_match("/^([A-Za-z0-9]+):(.*)/",$needle,$match)) {
   $needlegroup =3D "$match[1].";
   $needle =3D $match[2];

- in the middle
  if (!stristr($pagefile,$needlegroup)) continue;

- at the end before displaying $needle and the search results
$needle =3D "'$needle'";
if ($needlegroup!=3D'.') {
   $needle .=3D ' in ' . str_replace('.','',$needlegroup);

A search for just group: returns all pages in group that contain ' '.=20

If I do this as a local customisation by trapping $action=3D'search' in =
local.php, how much (if any) of the code in pmwiki.php between reading =
local.php and executing if $action=3D'search' would I  need to copy?=20

Since this feature can be added so easily, unless there are some side-=
effects I have overlooked (where a searcher wants to treat 'text:' as the =
search term, for example), I'd like to propose it be added to pmwiki =

John Rankin

More information about the pmwiki-users mailing list