[pmwiki-users] ZapCore / nextpage

The Editor editor at fast.st
Sun Apr 29 08:26:41 CDT 2007


On 4/29/07, noskule <noskule at gmx.net> wrote:
> hi list/dan
> I'm checking out zap for a comment - system.   There I used the nextpage
> feature
> to get back to the comment-section in the page footer an anchor after
> submitting the commentform. So I would like to do something like:
>    (:input /type/ nextpage "<Group>.<Name>#comments":)
> this seams not to work, I get the page
>    <Group>.0

Unfortunately there seems to be a conflict here with the page
shortcuts feature in ZAP.  I *suspect* it is mistaking the # symbol
for a request to return a thread. Though it should show up as
Group.Name1000comments...

I started the page shortcuts system a long time ago when there was no
other way to get around it in setting data variables (long before Pm's
wonderful text vars) and while it's no longer necessary, I've kept it
around because

1) it is quite convenient
2) it is used extensively throughout the ZAP code
3) it would break oodles of existing forms

So unfortunately this is probably a limitation in ZAP. There might be
a possible workaround like ## = anchor and not thread (ie escape it
somehow), but I should probably think about the best solution just a
bit.

Just to verify that's the problem you could just comment out this line
in the core module (@ line 300)

	if (strpos(" $vv[1]", "#")) $vv[1] = ZAPgroup("$vv[0]|thread");

If anyone has a suggestion for this, it really should be fixed.
Surprized no one tried using nextpage with an anchor before. I suppose
we could do something like

	$w[1] = str_replace("##", "^^", $w[1]);
	if (strpos(" $vv[1]", "#")) $vv[1] = ZAPgroup("$vv[0]|thread");
	$w[1] = str_replace("^^", "#", $w[1]);

Cheers,
Dan



More information about the pmwiki-users mailing list