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

Patrick R. Michaud pmichaud at sci.tamucc.edu
Mon Apr 28 09:31:31 CDT 2003


On 28 Apr 2003, John Rankin wrote:

> 1. local customisation breaks
> The calendar/wikilog script uses ThisPage:?logdate=yyyymm to navigate 
> up and down the calendar months. For example, in April, I put up 
> links to March and May:
> 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.

Ah.  The wikilog.php script is assuming that logdate is a global variable
(set via the PHP register_globals option).  It's terribly unsafe to have
register_globals set, so PmWiki versions since 0.4.16 unset any global
variables as the first step (basically undoing the effect of register
globals).

Wikilog.php needs to be modified so that it sets the $logdate variable
(and any other parameters it may need from a url) from the $HTTP_GET_VARS
array.  For example, add a line to wikilog.php in the appropriate place
that looks like:

	$logdate = $HTTP_GET_VARS['logdate'];


> 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 local.php
> - 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

Actually, I'm looking for a more general solution than the ones listed
above--I'm trying to figure out a way to control the order of items in
the LinkPatterns array.  I have a few ideas, but nothing leaps out at me
yet.  I'll probably solve it later tonight or tomorrow sometime.

> 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.

Probably an artifact left over from a version of PmWiki before WikiGroups
were introduced.  It'll be fixed in the next release.

> 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.

Yeah, I agree that per-group searching is worthwhile.  The solution
you describe above is good and will be added, and I'll probably also
add a "group=" parameter to the url configuration.  I'll add it to
pmwiki.php directly.

Actually, I may take the entire search code out of pmwiki.php and turn
it into a scripts module.

Pm





More information about the pmwiki-users mailing list