[pmwiki-users] Misc ZAP questions...

The Editor editor at fast.st
Sun Oct 29 08:57:01 CST 2006


Still working on ZAP to improve code and functionality and have a few
misc questions.  Kind of unrelated but can't seem to find answers...
I've studied the pmwiki docs, php.net, and tinkered repeatedly but
answers elude me.

1) Is there any way to insert php into a page.  In drupal, admins (or
whoever you defined to) could put <? misc code ?> and it would execute
that code.  I'm thinking this might be the key to a shopping cart
recipe I'll be tackling soon.

2) I found a thread discussing ways to show categories in a pagelist
that did not have associated category pages created for them.  But
never could find the thread that explained how it could be done.  Or
is it a future code enhancement?

3) How difficult is it to attach a file to an email?  I'm thinking in
terms of the underlying php code that does it.  Currently I'm just
using the mail() command.

4) Can you retrieve a range of times in a pagelist.  Suppose you have
page names created by timestamps, or better yet some text variable
timestamp in a page.  Could you retrun all the pages less then 30 days
old?  Maybe by setting up some kind of conditional in a pagelist?

5) Are there php commands for calculating differences in timestamps?
Like subtract one from another and use something like strftime to give
number of days/hours, etc?  This would be really useful, and I could
probably code it manually, but I figured there ought to be something
out there already???

6) Still perplexed about htmlspecialchars.  I've looked at the form's
script and could not get much help there.  Except, I did realize I
probably should do stripmagic in the zap markup, rather than in the
zap engine.  To be honest, I'm not even sure how to check when it's
right.  Anyone know a test to tell if set right? Better yet, what is
right?

Since the select box options are preset, the only one I probably
really need help with is somehow protecting the value of this one:

Markup('textarea', 'inline', '/\\(:textarea (.*?):\\)/e',
"Keep(PSS(\"<textarea $1>\"))");

7) The following lines of code are absolutely failing and I cannot for
the life of me figure out why.  This is part of the magic boxes which
takes encoded values and restores them to the proper values for use in
a textarea field:

	$htmlout = array("'", '"', '  ', ":)");
	$htmlin = array('&apos;', '&quot;', '&nbsp;&nbsp;', '&#x3a;)');
	$x = str_replace($htmlin, $htmlout, $x);

It was working before but I had to redo it a bit to fix some potential
problems with hidden fields. It's only in the version of zap I'm
working on offline.

8) Last, I'm really looking for a simple piece of (php) mailing list
software that can be handled within pmwiki directly.  I'd prefer not
to have to deal with databases, and would like to be able to throttle
the emails to not get in trouble with my isp.  Finally, it would be
good if it could handle email-based subscribes/unsubscribes.  It would
be nice to find something simple and open--because I envision putting
hooks into ZAP that would allow you to interface directly with the
mailing lists and do all your administrative front end stuff.  Oh, and
bounce help is a plus!  Anyone know anything about qmail or ezmlm...

I'm tempted to right my own--but that's another project.  Unless I had
a super simple one out there I could use a template...




More information about the pmwiki-users mailing list