[pmwiki-users] ContactMe problem
5ko at 5ko.fr
Mon May 20 08:44:15 PDT 2019
This Mailform3 recipe appears to not use the standard handlers of PmWiki
like $HandleActions, I recommend, if you can, change it for PmForm which
can do form-to-mail:
It may appear a little more complex to set a form in a PmForm template,
but follow the documentation. Also PmForm may not work with multiple
selection checkboxes, you should change
(:input checkbox subjects website:)
to something like
(:input checkbox subj_website 1:)
If you cannot migrate away from Cookbook:Mailform3, and if you have a
version similar to the one uploaded to the cookbook, here is what may
1. Near the top, add quotes around CONTACTUS_VERSION, or simply remove
define( 'CONTACTUS_VERSION', '20190520' );
2. There is one line with ereg_replace, it should be changed to look
$bd = preg_replace( "/\n|\r|\n\r|\r\n/", "<br>", $lmessage );
That is, preg_replace instead of ereg_replace, and add 2 slashes around
the first argument.
3. All 8 calls to eregi_replace() can simply be changed to calls to
str_ireplace() for example:
from $bd = eregi_replace( "<img", "[blk_img", $bd );
to $bd = str_ireplace( "<img", "[blk_img", $bd );
I cannot test this extensively, if there is something I missed please
report with the warning messages it shows.
On 17/05/2019 17:48, Daniel wrote:
> I switched to php 7 and now I noticed ContactMe is not working.
> Is this not php7 compatible and does it need an update?
> Here is the form: https://linux020.nl/l20/Main/ContactMe
> (Running under php5.6 for the moment)
More information about the pmwiki-users