Philio / bootstrapdefault

A modern and responsive theme for Piwigo built with standard Bootstrap components and using the default Bootstrap theme. Intended for easy customisation using Bootstrap styles or as a parent theme for creating responsive themes for Piwigo.
https://philio.me
31 stars 10 forks source link

No captcha in comments section #47

Open Saur0o0n opened 7 years ago

Saur0o0n commented 7 years ago

Hi,

I've just tried to use captcha plugins (both crypto and easy captcha) - both fails to work for comments in Bootstrap theme. They do work for registration. In bootstrap default theme, captcha div simply does not appear in comment section (or anywhere in source code). I'm currently migrating from menalto gallery - so I'm quite fresh in Piwigo :). Perhaps it's easy to fix, but I have just started and not everything is clear to me.

Philio commented 7 years ago

I'll have a look at the internals of these plugins and see if I can figure out what's going on!

CharlesButcher commented 5 years ago

+1 please! Bootstrap Default is by far the nicest Piwigo theme I've found, so it's a pity it doesn't work with captchas.

From my tiny knowledge of PHP I suspect this might be fixed by output buffering. The errors I get with the PHP Captcha plugin are:

Notice: Undefined index: captcha_code in /home/.../gallery/plugins/phpcaptchapiwigo/include/picture.inc.php on line 30

and:

Warning: Cannot modify header information - headers already sent by (output started at .../plugins/phpcaptchapiwigo/include/picture.inc.php:27) in .../gallery/include/functions_html.inc.php on line 486

Warning: Cannot modify header information - headers already sent by (output started at .../plugins/phpcaptchapiwigo/include/picture.inc.php:27) in .../gallery/include/page_header.php on line 101

Line 30 in "picture.inc.php" referred to above is: $postvalue = $_POST['captcha_code'];. So would it be possible to add output buffering somewhere in the template? The problem seems to be unique to Bootstrap Default, and it occurs with three different captcha plugins I've tried. So it doesn't appear to be the fault of either the plugins or of Piwigo more generally.

tekstrand commented 5 years ago

Any thoughts here?