[pmwiki-users] Failing to include forms in a file
Tegan Dowling
tmdowling at gmail.com
Sat Jan 26 09:42:30 CST 2008
On Jan 26, 2008 6:45 AM, Steven Benmosh <wordz2u at gmail.com> wrote:
> I am trying and failing to include a paypal 'donate' button html code in a
> web page.
>
> 1. I first tried to include the text in a block, [@@} and [==], but got
> text.
>
> 2. Then included in config.php the following:
>
> #This is used to allow inclusion of html tags
> include_once("$FarmD/cookbook/enablehtml.php");
>
> #The following line allows me to include forms in web pages
> EnableHtml('form');
>
> but this did not work either, it skipped the <form tags, but showed as text
> the rest - <input type="hidden" name="cmd" value="_s-xclick"> and so on.
>
> So I added EnableHtml('input'); into config.php, and now I see nothing at
> all in the page.
>
> What am I doing wrong, or alternatively, how do I put a paypal donate button
> into the footer of my site? The code looks something like (I put breaks in
> the encrypted part to fit the page better):
>
Hi again:
You need to enable 'img', as well. So put this in local/config.php:
##Enable HTML
include_once("$FarmD/cookbook/enablehtml.php");
EnableHtml('form|input|img');
(of course, you also need to have the file enablehtml.php in the
cookbook/ directory.)
An even safer way to do this would be to enable html only for the page
where you want to have your paypal form -- so, say you have the form
on page Main/Donate. Then you'd create a new text-file in local/
named Main.Donate.php, containing just these lines:
<?php if (!defined('PmWiki')) exit();
// Enable HTML
include_once('cookbook/enablehtml.php');
EnableHtml('form|input|img');
More information about the pmwiki-users
mailing list