[pmwiki-users] WikiForm - wikilist searching (Peter & Melodye Bowers)
John Rankin
john.rankin at affinity.co.nz
Wed Oct 24 17:41:42 CDT 2007
On Thursday, 25 October 2007 9:27 AM, pmwiki-users-request at pmichaud.com wrote:
> 4. FW: WikiForm - wikilist searching (Peter & Melodye Bowers)
>
>Any thoughts on selecting pages using the (:wikilist variable=value:) as
>below?
Unfortunately, this works for me; see for example:
http://www.wikipublisher.org/wiki/index.php?n=Issues.SuspendedIssues
You will see that instead of "Select all items" it says "Select Status=suspended".
I think the first thing to do is remove all possible extraneous variables,
by testing this with a plain install of pmwiki plus the wikiforms recipe.
Second (although it shouldn't make a difference) use all lower case
variable names.
I'd also test it with pmwiki version 2.1.27, which is a known quantity.
It is possible that something in pmwiki has changed and broken the recipe,
although I do not know what this might be.
If that doesn't work...
Then I would edit the wikiform.php code and in the FmtEntryList function
look for the code that sets $caption.= ... If you insert suitable echo
statements you may be able to work out why the value of
$opt[$f[$i]['element']] is not being picked up. For some reason,
it is not receiving and processing the field=value setting.
You might try adding something like:
foreach($opt as $k => $v) echo "$k=$v";
This should return (for example) Type=Booklet. Insert this just
above the for($i=0;$i<count($f);$i++) line.
JR
>
>
>
>Any thoughts on anchoring that substring search if the search is indeed
>possible, as below?
I think I can make it do exact matches; for example, the author could
write type==book and it would match book but not booklet. Let me
see if that can be made to work.
>
>
>
>-Peter
>
>
>
>I am thrilled with the capabilities of WikiForm - it never occurred to me
>something so powerful could be implemented as simply as you have made it!
>Bravo! (I'm using it to keep a sort of database of published literature in
>the Albanian language)
>
>
>
>1st question: from the documentation it looks like (:wikilist
>EngTitle=Wind:) should give me a list of pages where the variable "EngTitle"
>contains the text "Wind". However, no matter what variable names I put in
>and no matter what values I put in I always end up with a complete list of
>all pages in my WikiForm rather than some subset. (See
>www.ccl-al.org/pmwiki/pmwiki.php?n=X.X for my test-site example - I've
>removed the search criteria right now because I couldn't make
>it work)
>
>
>
>2nd question: is there any way to anchor the substring search? In other
>words EngTitle=a as I understand it would match all pages where the
>"EngTitle" variable contains the letter "a". Is there any way to anchor
>that ala ^ or $ or something like that? (For instance, one of my variables
>is "type" and indicates whether the piece of literature is a Book or a
>Booklet. If I search for "Type=Book" then by my understanding it will
>return BOTH "Book" and "Booklet" results when I obviously want just "Book"
>in that case.)
>
>
>
>-Peter
--
John Rankin
Affinity Limited
T 64 4 495 3737
F 64 4 473 7991
021 RANKIN
john.rankin at affinity.co.nz
www.affinity.co.nz
More information about the pmwiki-users
mailing list