[pmwiki-users] Misc ZAP questions...
Patrick R. Michaud
pmichaud at pobox.com
Mon Oct 30 12:34:31 CST 2006
On Sun, Oct 29, 2006 at 10:57:01AM -0400, The Editor wrote:
> 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.
Allowing authors to add PHP directly into a page sounds very
dangerous. Doubly-so if the pages are being used for a shopping
cart application. Still, it can be done -- just define a markup
for <?php ... ?>.
> 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?
There are several ways to do it. Also, pmwiki-2.2 has the
ability to automatically create Category pages.
> 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?
It would need to be a custom conditional.
> 5) Are there php commands for calculating differences in timestamps?
Definitely look at the strftime, localtime, gmtime, and mktime functions.
Using anything else for date/time manipulation is asking for
trouble and extra work.
> 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(''', '"', ' ', ':)');
> $x = str_replace($htmlin, $htmlout, $x);
What do you mean by "failing" -- i.e., how do you know it's not working?
> 8) Last, I'm really looking for a simple piece of (php) mailing list
> software that can be handled within pmwiki directly. [...]
> It would be nice to find something simple and open [...]
Mail is almost never simple, because of all of the variables involved.
Pm
More information about the pmwiki-users
mailing list