Captcha (Visual Confirmation) for adding comments - Page 9 Captcha (Visual Confirmation) for adding comments - Page 9
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Captcha (Visual Confirmation) for adding comments

Started by Abbas Ali, March 25, 2006, 08:39:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joachim Müller

I doubt that your pagination issue is related to using this mod, but rather the bug discussed here: "thumbnail page navigation - no image counter" :-\

Abbas Ali

GauGau is right, this mod requires only comments template to be modified. So no chance of tabs getting distorted because of it.

Another possibility is that you might have made some mistake while modifying the theme file. If the thread referred by GauGau does not solve your issue then try re-applying the mod from scratch. I hope you have the backups of the modified files.
Chief Geek at Ranium Systems

wfs

Thank you so much, GauGau and Abbas.
I applied the extra % as discussed in the thread referred to by GauGau.
Problem resolved !!!

Thank you guys AGAIN !!

wirewolf

Abbas. great mod! Do you know if anyone has applied this mod to ecards?
John

Abbas Ali

Chief Geek at Ranium Systems

Sami

‍I don't answer to PM with support question
Please post your issue to related board

Sosha

fantastic stuff, worked perfectly first time, cheers

ceesjoore

Hi,

I have made the modifications as described here, but the picture with the code is not vissible
Can you tell me what to do ?

Regards

Cees

http://www.ceesjoore.nl/coppermine/index.php

Hein Traag

I run the classic vertical filmstrip theme, but since that did not contain the pieces of code that needed changing
i used the sample theme.php and edited it accordingly. I edited db_input.php and english.php and dutch.php
I upload the captcha.php to the root of the album along with the fonts dir. Uploaded captcha.class.php to the include folder.

When i now click on a picture i do get a extra box saying Confirmation but there are no images beside it.
When i go the captcha.php file directly i get this error:
Cannot redeclare class phpcaptcha in /home/fototest/public_html/include/captcha.class.php on line 14

I read this post from front to back and again from back to front but found no clue. Can someone point me in the right direction ?

Thanks
Hein

Sami

Post a link to your gallery would be helpful (turn on debug)
‍I don't answer to PM with support question
Please post your issue to related board

dke

ive added everything as in this thread, i get everything up and running, but it dosnt matter if i actually put anything into confirmation code or not, or what i put into confirmation code. Comments still work for everyone even if you type the wrong confirmation code, what might i have missed? Using mac_ox_x theme

Tranz

Quote from: dke on October 22, 2006, 12:07:08 PM
ive added everything as in this thread, i get everything up and running, but it dosnt matter if i actually put anything into confirmation code or not, or what i put into confirmation code. Comments still work for everyone even if you type the wrong confirmation code, what might i have missed? Using mac_ox_x theme
Are you sure you edited db_input.php as instructed?

dke

Youre right,

i searched for if (!(USER_CAN_POST_COMMENTS)) cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);

and added the code directly after it, but there were 2 cases of "if (!(USER_CAN_POST_COMMENTS)) cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);" the second one was the right one :) thanks!

Lovely mod but looks really bad in my theme, anyone have any ideas on how to make it look good with mac_ox_x theme, this is how it looks now: http://dkeserver.mine.nu/displayimage.php?pos=-148968

big thanks to Abbas Ali for this lovely mod, i hate that bot spam!

ceesjoore

Quote from: ceesjoore on October 21, 2006, 01:06:15 PM
Hi,

I have made the modifications as described here, but the picture with the code is not vissible
Can you tell me what to do ?

Regards

Cees

http://www.ceesjoore.nl/coppermine/index.php

Tried everything no result yet ?

Tranz

If you view the file directly, there is no image: http://www.ceesjoore.nl/coppermine/captcha.php

If it worked, you would see the confirmation image. I don't know if it would help, but in Config enable debug mode and see if you get a helpful error message.

If you want help, help the helpers by making it easier on them. I saw your post yesterday but disregarded it since it meant I would have to look around your site for an example. Next time, try to post a more direct url to save everybody's time.

ceesjoore

Quote from: TranzNDance on October 22, 2006, 05:48:08 PM
If you view the file directly, there is no image: http://www.ceesjoore.nl/coppermine/captcha.php

If it worked, you would see the confirmation image. I don't know if it would help, but in Config enable debug mode and see if you get a helpful error message.

If you want help, help the helpers by making it easier on them. I saw your post yesterday but disregarded it since it meant I would have to look around your site for an example. Next time, try to post a more direct url to save everybody's time.

It never worked, it is not working on any of the pictures so my site is filled with examples.
So here is a link to 1 picture http://www.ceesjoore.nl/coppermine/displayimage.php?album=32&pos=11

All i get is a red cross by the confirmation code.
I have put on the debugging mode on for everybody to see, But all the code it is generating is not making any sense to me.

Sami

Login as an admin and check if GD with Freetype is enabled under debug output
‍I don't answer to PM with support question
Please post your issue to related board

ceesjoore

Quote from: Sami on October 22, 2006, 06:57:49 PM
Login as an admin and check if GD with Freetype is enabled under debug output

@Sami,
When i check PHPINFO.php i see this:
GD Support  enabled 
GD Version  bundled (2.0.28 compatible) 
FreeType Support  enabled 
FreeType Linkage  with TTF library 
FreeType Version  1.3 

I have put debug output on and this is what i see right now /include/themes.inc.php
Notice line 2196: Undefined index: uid
Notice line 2280: Undefined variable: report_tgt
Notice line 1899: Undefined index: uid
/themes/hardwired/theme.php
Notice line 312: Undefined index: confirm

Is that what you asked ?

Hein Traag

#178
Quote from: Sami on October 22, 2006, 07:27:08 AM
Post a link to your gallery would be helpful (turn on debug)

Stupid of me. Thanks ;)

Link is fototest.scouting.nl

I still get
Fatal error: Cannot redeclare class phpcaptcha in /home/fototest/public_html/include/captcha.class.php on line 14

when i call captcha.php directly. I added the sample theme.php and copy/pasted the needed blocks of code into the theme.php of my classic vertical filmstrip theme.php. Also edited db_input.php correctly and edited both english.php and dutch.php. It now displays a confirmation text box below the picture, but no captcha image. If i now try to add comment and click ok i also get the above error message.

The Debug message:
USER:
------------------
Array
(
    [ID] => 3507a8f716313a02bc913f96ef5a91bd
    [am] => 1
    [lang] => dutch
    [liv] => Array
        (
            [0] => 12
            [1] => 11
        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 3
    [user_name] => skildery
    [groups] => Array
        (
            [0] => 1
        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [ufc_max] => 3
    [ufc_min] => 3
    [custom_user_upload] => 0
    [num_file_upload] => 5
    [num_URI_upload] => 3
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [upload_form_config] => 3
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
)

==========================
Queries:
------------------
Array
(
    [0] => SELECT extension, mime, content, player FROM cpg149_filetypes; (0s)
    [1] => select * from cpg149_plugins order by priority asc; (0s)
    [2] => delete from `fototest`.cpg149_sessions where time<1161763315 and remember=0; (0s)
    [3] => delete from `fototest`.cpg149_sessions where time<1160557315; (0s)
    [4] => select user_id from `fototest`.cpg149_sessions where session_id=md5("d63c83078b683a3e6b526b8b4400eaa2b8a101053b889122d0f118067ff35962"); (0s)
    [5] => select user_id as id, user_password as password from `fototest`.cpg149_users where user_id=3 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.user_group+100 AS group_id FROM `fototest`.cpg149_users AS u INNER JOIN `fototest`.cpg149_usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='3' (0s)
    [7] => SELECT user_group_list FROM `fototest`.cpg149_users AS u WHERE user_id='3' and user_group_list <> ''; (0s)
    [8] => SELECT MAX(group_quota) as disk_max, MIN(group_quota) as disk_min, MAX(can_rate_pictures) as can_rate_pictures, MAX(can_send_ecards) as can_send_ecards, MAX(upload_form_config) as ufc_max, MIN(upload_form_config) as ufc_min, MAX(custom_user_upload) as custom_user_upload, MAX(num_file_upload) as num_file_upload, MAX(num_URI_upload) as num_URI_upload, MAX(can_post_comments) as can_post_comments, MAX(can_upload_pictures) as can_upload_pictures, MAX(can_create_albums) as can_create_albums, MAX(has_admin_access) as has_admin_access, MIN(pub_upl_need_approval) as pub_upl_need_approval, MIN( priv_upl_need_approval) as  priv_upl_need_approval FROM cpg149_usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg149_usergroups WHERE group_id= 1 (0s)
    [10] => update `fototest`.cpg149_sessions set time='1161766915' where session_id=md5('d63c83078b683a3e6b526b8b4400eaa2b8a101053b889122d0f118067ff35962'); (0s)
    [11] => SELECT user_favpics FROM cpg149_favpics WHERE user_id = 3 (0s)
    [12] => SHOW TABLES LIKE 'cpg149_cms_config' (0s)
    [13] => SELECT * FROM cpg149_cms_config (0s)
    [14] => SELECT * FROM cpg149_final_extract_config (0s)
    [15] => SELECT * FROM cpg149_mark_users WHERE user_id = 3 (0s)
    [16] => SELECT * FROM cpg149_mark_config (0s)
    [17] => SELECT title,keyword from cpg149_albums WHERE aid='3' (0s)
    [18] => SELECT COUNT(*) from cpg149_pictures WHERE ((aid='3'  ) )   (0s)
    [19] => SELECT * from cpg149_pictures WHERE ((aid='3'  ) )   ORDER BY filename ASC  LIMIT 1 ,1 (0s)
    [20] => SELECT * FROM cpg149_mark_users WHERE user_id = 3 (0s)
    [21] => SELECT pid FROM cpg149_mark_watermark WHERE pid = 12 (0s)
    [22] => DELETE FROM cpg149_banned WHERE expiry < '2006-10-25 10:01:55' (0s)
    [23] => SELECT * FROM cpg149_banned WHERE (ip_addr='81.69.50.110' OR ip_addr='81.69.50.110' OR user_id=3) AND brute_force=0 (0s)
    [24] => SELECT title,keyword from cpg149_albums WHERE aid='3' (0s)
    [25] => SELECT COUNT(*) from cpg149_pictures WHERE ((aid='3'  ) )   (0s)
    [26] => SELECT * from cpg149_pictures WHERE ((aid='3'  ) )   ORDER BY filename ASC  LIMIT 1 ,1 (0s)
    [27] => SELECT title, comments, votes, category, aid FROM cpg149_albums WHERE aid='3' LIMIT 1 (0s)
    [28] => SELECT name, parent FROM cpg149_categories WHERE cid = '7' (0s)
    [29] => SELECT cid, name, parent FROM cpg149_categories WHERE cid = '4' (0s)
    [30] => SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM cpg149_comments WHERE pid='12' ORDER BY msg_id ASC (0s)
    [31] => SELECT COUNT(*) FROM cpg149_pictures WHERE approved = 'NO' (0s)
    [32] => SELECT title,keyword from cpg149_albums WHERE aid='3' (0s)
    [33] => SELECT COUNT(*) from cpg149_pictures WHERE ((aid='3'  ) )   (0s)
    [34] => SELECT pid, filepath, filename, url_prefix, filesize, pwidth, pheight, ctime, aid, keywords, title, caption,hits,owner_id,owner_name from cpg149_pictures WHERE ((aid='3'  ) )   ORDER BY filename ASC  LIMIT 0 ,10 (0s)
    [35] => SELECT count(*) from cpg149_comments where pid=11 and msg_id!=0 (0s)
    [36] => SELECT count(*) from cpg149_comments where pid=12 and msg_id!=0 (0s)
    [37] => SELECT * FROM cpg149_cms WHERE conid='12' AND type='2' ORDER BY cpos (0s)
)

==========================
GET :
------------------
Array
(
    [album] => 3
    [pos] => 1
)

==========================
POST :
------------------
Array
(
)

==========================
VERSION INFO :
------------------
PHP version: 4.3.10-16 - OK
------------------
mySQL version: 4.1.11-Debian_4sarge7-log
------------------
Coppermine version: 1.4.9(stable)
==========================
Module: GD
------------------
GD Version: 2.0 or higher
FreeType Support: 1
FreeType Linkage: with freetype
T1Lib Support: 1
GIF Read Support: 1
GIF Create Support: 1
JPG Support: 1
PNG Support: 1
WBMP Support: 1
XBM Support:
JIS-mapped Japanese Font Support:

==========================
Module: mysql
------------------
MySQL Supportenabled
Active Persistent Links 0
Active Links 1
Client API version 4.0.24
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient 
==========================
Module: zlib
------------------
ZLib Support enabled
Compiled Version 1.2.2
Linked Version 1.2.2
==========================
Server restrictions (safe mode)?
------------------
Directive | Local Value | Master Value
safe_mode | On | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | /usr/share/php | no value
safe_mode_exec_dir | no value | no value
sql.safe_mode | Off | Off
disable_functions | no value | no value
file_uploads | On | On
include_path | .:/usr/share/php:/usr/share/pear | .:/usr/share/php:/usr/share/pear
open_basedir | /home/fototest/public_html:/usr/share/php:/tmp | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | no value | no value
sendmail_path | /usr/sbin/sendmail -t -i  | /usr/sbin/sendmail -t -i
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | 60 | 60
upload_max_filesize | 2M | 2M
post_max_size | 8M | 8M
==========================
Page generated in 0.103 seconds - 38 queries in 0 seconds - Album set : ; Meta set: ;

jenkinl1302

I originally had the same problems as some on this board with the captcha image not showing up.  Something with GD.  Actually, it prevented me from using any gallery software until I figured it out.  GD wasn't available until I asked for it (in code).  On captcha.php, try adding dl("gd.so"); immediately before define("IN_COPPERMINE", true);

I'm not sure if there's a better way to do this, or if it will work for everyone, but it seemed to make things work for me.