forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: François Keller on October 22, 2006, 11:27:36 am

Title: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on October 22, 2006, 11:27:36 am
Hi

Here is a plugin inspired from Gizmo add on (http://forum.coppermine-gallery.net/index.php?topic=29822.0) for adding a contact form in your Coppermine gallery:
This plugin add un menu button to display a contact form to let your visitors sending a mail to the administrator Email Adress. A field verification is made before sending mail
Plugin also avaible in English and French.
Feel free to translate the lang/english.php language file to your own language.

Version 1.2
Adding a Spam prevention field: You must answer a simple math question before submitting the form. See the contact_1_2.zip file in attachement


Original pack update with this change:
- changing the way to display menu button (Sami's code)
- changing table width to 100% instead 800px acording Gysmo suggestion
- adding Italian language file (Thank's Lontano)
- adding Dutch language file (Thank's Hlabout)
- changing operator word "plus" into sign "+" in lang files
- Correct english.php file (Thank's Gysmo)



New version 1.3 (By Sami)

Original pack update with this change:
- CAPTCHA confirmation instead of mathematic question (Spam checking)
- Blank fields after error checking , bug fixed
- Display specific error message for invalid emal adress (code modif by Frantz)
- Persian & German lang. added
-Russian lang. added (Thank's to dheep)



Install:

* Unpack the archive and upload the "contact" directory structure to your Coppermine gallery's plugins folder.
* Login as an admin, go to config, then "Manage Plugins"
* Find the Contact entry in the available plugins and click install.
* A new menu button is now added for opening contact form.
Title: Re: Contact: add new menu button to display a contact form
Post by: Sami on October 22, 2006, 01:48:44 pm
Good work Frantz , thank you
Title: Re: Contact: add new menu button to display a contact form
Post by: Gizmo on October 23, 2006, 02:49:23 am
Hey Frantz! Thanks for pluging this guy. :D There are a couple of items to look at.
Cheers!

Gizmo
Title: Re: Contact: add new menu button to display a contact form
Post by: François Keller on October 23, 2006, 07:28:24 am
Hey Gizmo,
Quote
In contact.php, the table size should be set to 100% instead of 800px to allow for narrow themes
Yes sure, i will do that
Quote
In themes that have vertical list like the OrangeSky theme, the contact menu item won't match the others if they have an image assocated with them
Oh, I haven't test with OrangeSky theme. Will have a look to this problem
Quote
I've gotten so much spam through my contacts forms lately that I've been trying out various methods such as Captcha and this new method that has been working well for me. It's easier to implement than Captcha so maybe you can incorporate it directly into the plugin. It's called Fee Contact Form at http://www.freecontactform.com/ but just read and make sure there isn't any legal issues but I don't there is. You have to answer a simple math question before the email is sent but you can also make up your own questions and answers. You can check it out here on my sports gallery - http://www.bullseyephotos.com/sports/contact.php.
Yes I've seen it on your site and it's on my todo list for next version  ;)
Thank's for your support
Frantz
Title: Re: Contact: add new menu button to display a contact form
Post by: Sami on October 23, 2006, 07:41:27 am
BTW you have a problem with contact button positioaning
- on those themes that comes with javascript show/hide menu such as mac_ox_x , eyeball , igames
- or those themes that use picture for button or picture toframe button , such as fruity , hardwired , rainy_day ,...

maybe you could check contact_user_menu function and re-code it with better logic ;)
Title: Re: Contact: add new menu button to display a contact form
Post by: Sami on October 23, 2006, 08:26:19 am
Check the new codebase.php and if you like the idea put it under orginal pack ;)
It will create a contact button right after Home button by using home button template

Regards,
Title: Re: Contact: add new menu button to display a contact form
Post by: François Keller on October 23, 2006, 11:58:43 am
Oh yes Sami

Your way for displaying the menu button is more better  :D
Thank's.
I've update the original pack in first post

I've changed table width according Gysmo suggestion
Title: Re: Contact: add new menu button to display a contact form
Post by: François Keller on October 29, 2006, 07:07:23 pm
Hi,

version 1.2 is avaible with Spam prevention field. You must answer a simple math question before submitting the form (inspired by Fee Contact Form at http://www.freecontactform.com/ (http://www.freecontactform.com/))
See attachement in the first post
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Davide Renda on November 05, 2006, 01:43:32 pm
italian translation attached, unzip and upload in the lang directlory of the plugin.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 05, 2006, 02:03:39 pm
Thank's lontano for your contribution. Your file will be add to the pack.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 06, 2006, 10:58:19 am
Hi there,

i would like to use this plugin but i do have a question. Is it possible to make a edition of this plugin which uses Captcha
for confirmation instead of using math questions ?

I already got the captcha plugin for comments from Sami and that works like a charm.

Cheers!
Hein
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 06, 2006, 11:47:21 am
Quote
Is it possible to make a edition of this plugin which uses Captcha
for confirmation instead of using math questions ?

feel free to modif the code  :D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 06, 2006, 01:39:41 pm
feel free to modif the code  :D

I so wish i could. But i discovered that my skillset does not include coding php  :(
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: hlabout on November 07, 2006, 10:07:40 pm
HI

I have one question.
I added this almost perfect pluginn to my coppermine gallery.
Just have one error: - no PLUS sign between the nubers of the math question.
Tried to solve it by myself, but faild.
Does someone know the answer to this problem.

Regards Harald
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Nibbler on November 07, 2006, 10:12:57 pm
I'm not clear on what your question actually is. The place to change the word 'plus' is in the plugin's lang/english.php (or whatever language you use)

Code: [Select]
  'opertator'     => ' plus ',
Be sure to preserve the typo when you make your change.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 07, 2006, 10:33:48 pm
If your question is how to change the word 'plus' with the sign '+'
change in the plugin's lang/english.php (or in your language file)
Code: [Select]
'opertator'     => ' plus ',to
Code: [Select]
'opertator'     => ' + ',
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: hlabout on November 07, 2006, 10:36:39 pm
After a few hours found the problem myself.
In the lang file code operator is spelled as "opertator".
Changed it, working fine now.
Thanks for your reaction.

Top plugin, was getting sick of all the spam in my comment fields.
This contact form is a great solution.

Harald
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: hlabout on November 07, 2006, 11:28:19 pm
Made a Dutch language file, somebody interested?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Nibbler on November 07, 2006, 11:40:44 pm
Attach it to the thread.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: hlabout on November 07, 2006, 11:51:42 pm
ok

dutch lang.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 08, 2006, 07:40:34 am
Thank's for your contrib, will add it in the pack
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Nibbler on November 08, 2006, 01:08:47 pm
Be sure to preserve the typo when you make your change.

You changed it to 'operator' in your translation. It won't work like that.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: hlabout on November 08, 2006, 01:41:23 pm
it works fine with me, with opertator i dont see the "plus" in the math question.

Harald
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 08, 2006, 09:59:44 pm
Downloaded the plugin and installed it on my CPG. Works like it should.

:) i still would be interested in a plugin version that uses the Captcha way of confirmation code.

Maybe Frantz and Sami can get together (hint  ;D hint)

Thanks again for a good clean plugin Frantz!

Cheers!
Hein
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 08, 2006, 10:05:21 pm
Quote
Maybe Frantz and Sami can get together (hint  Grimaçant hint)
:D :D
maybe... ;D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on November 08, 2006, 10:46:55 pm
Am I hear something about Sami here ;)
Sorry I don't have much time this week But I'll add captcha to this plugin with Frantz help ;D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Gizmo on November 16, 2006, 01:09:54 pm
Hey Frantz and Sami,

Very nice! After fixing the English wording and typos (don't worry, you should try to read my French and German! ;)) this has turned out to be a great plugin. Here are a couple of issues for me:

1. If you make a mistake or don't fill in a box, you get the error page with a "continue" button. Selecting this button returns you to an empty page. If this can't be fixed, I'd remove it and say to use the back button.

2. If you enter an incorrectly formatted email address but fill in all the other fields and get the math right, you get the error page that says "all fields must be completed !". I see in the language file that you have  "You must enter your Email Address" and "You must enter your Email Address" so is this suppose to be functional with these comments?

This is going to be a great plugin especially for people who do a lot of themes. Now when someone comes to my site, there will be a contact menu on everyone of them. I only have one theme that seems to be a problem (I feel dirty) so I'll look and see what the issue is with that but all the others work great.

Thanks again!

Gizmo
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 16, 2006, 01:19:38 pm
Hey Gizmo
Quote
Very nice! After fixing the English wording and typos
can you attach your english.php file with your corrections ?

For your first issue, you're right. We must see this problem and fix it

For the second issue, I'll try to see what's hapend.

Thank's for your report  ;)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Gizmo on November 16, 2006, 01:42:17 pm
Here's my version of the English language file.

Thanks again!
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 16, 2006, 01:59:00 pm
Hi guys,

any luck yet with building Captcha into this plugin ?

Cheers!
Hein
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Rifuku on November 16, 2006, 06:50:03 pm
Hi.

What a great plug in, thank for that but I have some problems with it because the math question does not show what is needed (+ or -) it shows only 4848 for example and not what is required : 48+48 or 48-48. What's wrong?

Regards
Oliver
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Gizmo on November 16, 2006, 09:30:36 pm
There are a couple of spelling errors in the English language file. You can either download the one I attached a couple of posts earlier or wait until Frantz releases the next version.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Rifuku on November 17, 2006, 06:40:18 am
Hi

many thanks, works great now.  :) :)

Regards
Oliver
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 17, 2006, 07:14:19 am
Quote
There are a couple of spelling errors in the English language file. You can either download the one I attached a couple of posts earlier or wait until Frantz releases the next version.
Gysmo's english.php file is added in the contact_1_2.zip archive in the very first post
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on November 17, 2006, 05:51:30 pm
New version added (v1.3)
- CAPTCHA confirmation instead of mathematic question
- Blank fields after error checking fixed

@Contributers (translators):
Due to changing the method of spam checking , we have some changes on LANG files , it would be nice if you post the new translation file for new version
Thanks all

use this thread to report bugs ;)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 17, 2006, 07:55:11 pm
Hi Sami,

Thank's for this new version  ;)

french.php attached.

P.S. Persian language file is nor in the pack :-\

Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 17, 2006, 10:40:50 pm
Quote
If you enter an incorrectly formatted email address but fill in all the other fields and get the math right, you get the error page that says "all fields must be completed !". I see in the language file that you have  "You must enter your Email Address" and "You must enter your Email Address" so is this suppose to be functional with these comments?
Attached, 1.3 version with specific error message for invalid email adress.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Stramm on November 17, 2006, 11:16:51 pm
I really like that plugin. It's pretty helpful. Attached a german lang file. Oh, and wihile testing the lang fiel I was able to send the email just with entering email addy and the code
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on November 17, 2006, 11:45:22 pm
Orginal package Update ver 1.3 (attached to first post of this thread)

french.php attached.

P.S. Persian language file is nor in the pack :-\
Thanks for quick work Frantz
French language added to orginal package
Persian is available now ;D

Attached, 1.3 version with specific error message for invalid email adress.
Added to orginal package

I really like that plugin. It's pretty helpful. Attached a german lang file. Oh, and wihile testing the lang fiel I was able to send the email just with entering email addy and the code
german language added to orginal package
Thank you Stramm for contribution and that bug fixed ;)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 18, 2006, 01:25:53 pm
Sami, Frantz and other contributors. Thanks!
Plugins works as it should.

Attached dutch.php ( i hope you don't hlabout )

Cheers!
Hein

Woops. No winzip on my home pc. Only winrar. Downloading winzip now to zip the file ;)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 18, 2006, 01:33:08 pm
Hey Hein,
Quote
Attached dutch.php

You was to fast, no file attached  :D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 18, 2006, 01:45:59 pm
Hey Hein,
You was to fast, no file attached  :D

Ok. Now it is attached  ;D

I don't want to nag but is it possible to make the contact form button only appear to registered users ?

Cheers!
Hein
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Gizmo on November 18, 2006, 01:59:28 pm
Frantz, once word gets out about this, you're going to have one of most popular plugins.  ;)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 18, 2006, 02:21:06 pm
@Gizmo
Thank's , but it's Your Mod who inspired me  ;)
@Hein
Quote
I don't want to nag but is it possible to make the contact form button only appear to registered users ?
in codebase.php search
Code: [Select]
function contact_page_start()

    global $template_sys_menu, $template_sys_menu_spacer, $template_sys_menu_button, $sys_menu_buttons;
    global $CONFIG, $lang_plugin_contact;
    require ('plugins/contact/include/init.inc.php');
    require_once('plugins/contact/include/captcha.class.php');
   
  contact_add_admin_button('index.php?file=contact/contact',$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link']);
}
and replace with:
Code: [Select]
function contact_page_start()

    global $template_sys_menu, $template_sys_menu_spacer, $template_sys_menu_button, $sys_menu_buttons;
    global $CONFIG, $lang_plugin_contact;
    require ('plugins/contact/include/init.inc.php');
    require_once('plugins/contact/include/captcha.class.php');
   
if (USER_ID){ contact_add_admin_button('index.php?file=contact/contact',$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link'],$lang_plugin_contact['menu_link']);
}
}
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 18, 2006, 05:17:19 pm
Thanks Frantz. Attached codebase file for registered users only.

Cheers!
Hein

p.s. <Yoda> Gizmo speaks truth he does</Yoda>  :D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Joachim Müller on November 18, 2006, 05:42:41 pm
[ot]
Woops. No winzip on my home pc. Only winrar. Downloading winzip now to zip the file ;)
I recommend using 7zip (http://www.7-zip.org/) as tool for all purposes that relate to compressing and uncompressing stuff. It's free, open source, fast, multi-lingual.
If you don't have a zip utility ready, you can attach single files by just renaming then (e.g. from dutch.php to dutch.php.txt) and just tell people that they have to rename it back after downloading.
[/ot]
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on November 18, 2006, 05:52:21 pm
you read my mind  ;D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: docgonzo on November 19, 2006, 06:05:58 pm
Hi there...
I Installed this, but there seems to be a problem with the captcha image.
It won't show on the page.
What am i doing wrong ?

Check http://www.docgonzo.com/index.php?file=contact/contact
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on November 19, 2006, 08:15:30 pm
Enable debug please
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: docgonzo on November 19, 2006, 08:43:34 pm
Enable debug please

Code: [Select]
USER:
------------------
Array
(
    [ID] => d229d9cd7d452f3861aa3d4834ec9b63
    [am] => 1
    [liv] => Array
        (
            [0] => 20698
            [1] => 21203
            [2] => 20884
            [3] => 21451
            [4] => 30328
        )

    [lap] => 1
    [name] => ladida
    [lang] => english
    [search] => Array
        (
            [search] => jessica
            [album] => search
            [title] => on
            [newer_than] =>
            [caption] => on
            [older_than] =>
            [keywords] => on
            [type] => AND
            [params] => Array
                (
                    [title] => on
                    [caption] => on
                    [keywords] => on
                )

        )

)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 1
    [user_name] => Doc Gonzo
    [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 cpg11d__filetypes; (0s)
    [1] => select * from cpg11d__plugins order by priority asc; (0s)
    [2] => delete from `docgonzo`.cpg11d__sessions where time<1163961718 and remember=0; (0.002s)
    [3] => delete from `docgonzo`.cpg11d__sessions where time<1162755718; (0.002s)
    [4] => select user_id from `docgonzo`.cpg11d__sessions where session_id=md5("3dfa0a1806031ccad06163eb155bb87a0f0260e4123c8a7828a88f683fb53a99"); (0.001s)
    [5] => select user_id as id, user_password as password from `docgonzo`.cpg11d__users where user_id=1 (0s)
    [6] => SELECT u.user_id AS id, u.user_name AS username, u.user_password AS password, u.avatar_url AS avatar_url, u.enable_admin_email AS notify, u.auto_subscribe_post AS auto_subscribe_post, u.auto_subscribe_comment AS auto_subscribe_comment, u.user_group+100 AS group_id FROM `docgonzo`.cpg11d__users AS u INNER JOIN `docgonzo`.cpg11d__usergroups AS g ON u.user_group=g.group_id WHERE u.user_id='1' (0s)
    [7] => SELECT user_group_list FROM `docgonzo`.cpg11d__users AS u WHERE user_id='1' 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 cpg11d__usergroups WHERE group_id in (1) (0s)
    [9] => SELECT group_name FROM  cpg11d__usergroups WHERE group_id= 1 (0s)
    [10] => update `docgonzo`.cpg11d__sessions set time='1163965318' where session_id=md5('3dfa0a1806031ccad06163eb155bb87a0f0260e4123c8a7828a88f683fb53a99'); (0.001s)
    [11] => SELECT user_favpics FROM cpg11d__favpics WHERE user_id = 1 (0.001s)
    [12] => SHOW TABLES LIKE 'cpg11d__cms_config' (0.001s)
    [13] => SELECT * FROM cpg11d__cms_config (0s)
    [14] => DELETE FROM cpg11d__mod_online WHERE last_action < NOW() - INTERVAL 10 MINUTE (0.001s)
    [15] => REPLACE INTO cpg11d__mod_online (user_id, user_name, user_ip, last_action) VALUES ('1', 'Doc Gonzo', '84.196.109.223', NOW()) (0.001s)
    [16] => SELECT count(*) FROM  cpg11d__pms WHERE owner=1 (0s)
    [17] => SELECT count(*) FROM  cpg11d__pms WHERE owner=1 AND showed='0' (0s)
    [18] => SELECT count(*) FROM  cpg11d__buddy WHERE user_id=1 (0s)
    [19] => SELECT count(*) FROM  cpg11d__buddy_req WHERE buddy_to=1 (0s)
    [20] => DELETE FROM cpg11d__banned WHERE expiry < '2006-11-19 21:41:58' (0.001s)
    [21] => SELECT * FROM cpg11d__banned WHERE (ip_addr='84.196.109.223' OR ip_addr='84.196.109.223' OR user_id=1) AND brute_force=0 (0s)
    [22] => SELECT COUNT(*) FROM cpg11d__pictures WHERE approved = 'NO' (0s)
)

==========================
GET :
------------------
Array
(
    [file] => contact/contact
)

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

==========================
VERSION INFO :
------------------
PHP version: 4.3.10-18 - OK
------------------
mySQL version: 4.0.24_Debian-10sarge2-log
------------------
Coppermine version: 1.4.10 modpack v1(stable)
==========================
Module: gd
------------------
module doesn't exist
==========================
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 | Off | Off
safe_mode_exec_dir | no value | no value
safe_mode_gid | Off | Off
safe_mode_include_dir | no value | 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 | no value | no value
==========================
email
------------------
Directive | Local Value | Master Value
sendmail_from | me@localhost.com | me@localhost.com
sendmail_path | /usr/sbin/sendmail -t -i -f postmaster@premiumhosting.be | /usr/sbin/sendmail -t -i -f postmaster@premiumhosting.be
SMTP | localhost | localhost
smtp_port | 25 | 25
==========================
Size and Time
------------------
Directive | Local Value | Master Value
max_execution_time | 30 | 30
max_input_time | -1 | -1
upload_max_filesize | 25M | 25M
post_max_size | 25M | 25M
==========================
Page generated in 0.205 seconds - 23 queries in 0.011 seconds - Album set : ; Meta set: ;
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on November 19, 2006, 08:48:37 pm
I said enable it not post it !
Enable debug and go to contact and see if make any error , warning ...
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: docgonzo on November 19, 2006, 08:51:04 pm
I said enable it not post it !
Enable debug and go to contact and see if make any error , warning ...
That was the output from the Contact page.
No error's to my knowledge.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on November 19, 2006, 09:09:06 pm
in fact your posted debug info helped me out to see the issue ;D
- You need GD2 + freetype support to use this plugin
you can use the older version with mathematic question instead
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 07, 2006, 11:41:51 am
Hi all,
i hope you can understand my english??  :o
I have installed the contact-plugin, but it will be dont show in my i games theme.
I have change the theme.php, i think thats the problem, but i will use my changed theme.php in the future.
How can i include the contact-plugin in my theme.php?

Code: [Select]
define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_NO_SUB_MENU_BUTTONS',1);
define('THEME_IS_XHTML10_TRANSITIONAL',1);  // Remove this if you edit this template until
                                            // you have validated it. See docs/theme.htm.

// HTML template for sys menu
$template_sys_menu = <<<EOT

<!-- BEGIN home -->
<!-- <a href="{HOME_TGT}" title="{HOME_TITLE}" >{HOME_LNK}</a> -->
<!-- END home -->

<!-- BEGIN my_gallery -->
<a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}" >{MY_GAL_LNK}</a>|
<!-- END my_gallery -->

<!-- BEGIN allow_memberlist -->
<a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a>|
<!-- END allow_memberlist -->

<!-- BEGIN my_profile -->
<a href="{MY_PROF_TGT}" title="{MY_PROF_LNK}">{MY_PROF_LNK}</a>|
<!-- END my_profile -->

<!-- BEGIN faq -->
<a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a>|
<!-- END faq -->

<!-- BEGIN enter_admin_mode -->
<a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a>|
<!-- END enter_admin_mode -->

<!-- BEGIN leave_admin_mode -->
<a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a>|
<!-- END leave_admin_mode -->

<!-- BEGIN upload_pic -->
<a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a>|
<!-- END upload_pic -->

<!-- BEGIN register -->
<a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a>|
<!-- END register -->

<!-- BEGIN login -->
<a href="{LOGIN_TGT}" title="{LOGIN_LNK}">{LOGIN_LNK}</a>|
<!-- END login -->

<!-- BEGIN logout -->
<a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}">{LOGOUT_LNK}</a>|
<!-- END logout -->

EOT;

// HTML template for template sub_menu
// special note: I left the java 'hide' off of the first and third buttons to help avoid trouble keeping sys_menu open. :Donnoman
if ($CONFIG['custom_lnk_url'] != '') {
$template_sub_menu = <<<EOT
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                <tr>
<!-- BEGIN custom_link -->
                                  <td class="top_menu_left_bttn">
                                       <a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>

<!-- END custom_link -->
                                        <td class="top_menu_bttn">
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="javascript:;" onmouseover="MM_showHideLayers('SYS_MENU','','show')">@</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                  <!--<td class="top_menu_bttn">
                                                <a href="{LASTCOM_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPN_LNK}">{TOPN_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>-->
                                        <td class="top_menu_bttn">
                                                <a href="{TOPRATED_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="http://localhost/gallery/credits.php" title="Credits">Credits</a>
                                        </td>
                                    <!--<td class="top_menu_bttn">
                                                <a href="{FAV_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{FAV_LNK}">{FAV_LNK}</a>
                                        </td>-->
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
                                        </td>
                                        <td><img src="themes/igames/images/menu_spacer.gif" width="2" height="35" border="0" alt="" /><br /></td>
                                        <td class="top_menu_bttn_right">
                                       [b]**** Here i want to include the contact plugin ****[/b]
                                        <td width="100%">&nbsp;</td>
                                </tr>
                        </table>
EOT;

Sorry for the long code.
Greatings
Parti
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on December 08, 2006, 05:32:52 am
Post a link to your gallery please (with installed plugin)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 08, 2006, 03:12:19 pm
Ok, you can visit my gallery at

http://parti.dyndns.org/gallery/index.php

on the right side of the sysmenu you will see the contact button,
i include it manually in the /igames/theme.php with
<a href="plugins/contact/contact.php" title="Contact">Contact</a>

Thx
Parti
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on December 08, 2006, 10:58:30 pm
Here is the problem , Contact plugin use home button theme to create contact button and as you comment out (by adding <!--) your home button that plugin generate comment out contact button so you can't see it ;D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 09, 2006, 11:52:23 am
Thx Sami, that was the problem, after enable GD2   ;D it runs nice.
Is there a way to start the contact form manually from my theme.php in the submenu section,
and disable the home button in the sysmenu.
Pls see my code above on the bottom.

Sry, i am not a coder, i hope i call the menus right and you understand it  :P

Parti
 
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on December 09, 2006, 12:27:21 pm
Everything is okey you just need to change href value of link to index.php?file=contact/contact instead of plugins/contact/contact.php
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on December 09, 2006, 01:32:35 pm
For using the plugin, i think it's possible to change in codebase.php
Code: [Select]
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sys_menu, $template_sys_menu_spacer;

  $new_template=$template_sys_menu;
  $button=template_extract_block($new_template,'home');
 
   $params = array(
      '{HOME_LNK}' => $target,
      '{HOME_TITLE}' => $title,
      '{HOME_TGT}' => $href,
      'home' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sys_menu,'home',"<!-- BEGIN home -->" . $button . "<!-- END home -->\n" .$new_button);
}
to
Code: [Select]
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sys_menu, $template_sys_menu_spacer;

  $new_template=$template_sys_menu;
  $button=template_extract_block($new_template,'my_gallery');
 
   $params = array(
      '{MY_GAL_LNK}' => $target,
      '{MY_GAL_TITLE}' => $title,
      '{MY_GAL_TGT}' => $href,
      'home' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sys_menu,'home',"<!-- BEGIN my_gallery -->" . $button . "<!-- END my_gallery -->\n" .$new_button);
}
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 09, 2006, 04:18:12 pm
Thx Frantz, it works.

Parti
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on December 09, 2006, 04:23:48 pm
Thx Frantz, it works.

Parti
Yes it work's with all uncommented links (just change the code with parameters from the link you will use for creating the new one). But it's possible that it doesn't work with all themes
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 09, 2006, 05:33:36 pm
Sry, what i have to do, to put it away from the sysmenu and get it into my submenu?
Here i want it.

Theme.php

Code: [Select]
   <td class="top_menu_right_bttn">
       <a href="plugins/contact/contact.php" title="Contact">Contact</a>
   </td>

For better understanding pls visit me http://parti.dyndns.org/gallery/index.php

Parti
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on December 09, 2006, 06:10:23 pm
do you want to have the link whith the login and register link ?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 09, 2006, 06:14:14 pm
Now it runs.

Code: [Select]
     <td class="top_menu_right_bttn">
        <a href="index.php?file=contact/contact" title="Contact">Contact</a>
     </td>

It is possible, i get problems with later using the Contact form or is it a good way??

Parti
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on December 09, 2006, 06:50:28 pm
I don't understand, do you use the plugin to create the link or do you create the link in your theme.php file ?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 09, 2006, 07:05:52 pm
I want to create the link in the theme.php, but a link like

<a href="plugins/contact/contact.php" title="Contact">Contact</a>

shows only a message "not in coppermine".
But now i thing it runs.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 09, 2006, 07:12:21 pm
Thank you very much Sami and Frantz.
I can imagine my questions are not easy to understant, bad english and no experince with php.
I am a newbie.  :'(
I hope this is the last question.   :-\

contact.php
Code: [Select]
require('include/init.inc.php');
require ('plugins/contact/include/init.inc.php');
pageheader($lang_plugin_contact['name']);
    starttable(-1, $lang_plugin_contact['name']);
    ?>

I want to write text direktly in the starttable.
But every table i create with <td><tr>text etc. starts always with a few empty lines under the starttable?

You have a idea??

Parti

Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on December 09, 2006, 08:11:27 pm
I want to create the link in the theme.php, but a link like

<a href="plugins/contact/contact.php" title="Contact">Contact</a>

shows only a message "not in coppermine".
But now i thing it runs.

The plugin create this link, your problem is to explain after what menu link you will put the contact link
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Sami on December 09, 2006, 08:18:33 pm
We have one issue per thread policy , respact th rules please
BTW You have 4 <br/> tag under starttable function !, remove them and you'll be fine
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: parti02 on December 11, 2006, 11:47:58 am
Thx
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: jonesy on February 02, 2007, 09:19:14 pm
Hi there,

great plugin.
I noticed that the table is lower in the screen, than my other pages. Can I change that?
I would like to see it right under de submenu (like my other pages)

http://fotografie.jonesy.nl/index.php?file=contact/contact

Thnx

Jonesy
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on February 03, 2007, 01:33:16 pm
Hi,
Quote
I noticed that the table is lower in the screen, than my other pages. Can I change that?
You're right, i haven't notice there before. I'm searchin why this happend, but i don't find of the moment.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: jonesy on February 03, 2007, 05:42:59 pm
If you find it, i'd really like to hear from you.
I'm trying to find it too, but i also can't find it.

grtz
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Muurvaren on April 01, 2007, 05:52:26 pm
If you find it, i'd really like to hear from you.
I'm trying to find it too, but i also can't find it.

Same here...

http://www.muurvaren.nl/index.php?file=contact/contact (http://www.muurvaren.nl/index.php?file=contact/contact)

Theme used is Reynolds/Chaoticsoul

Tried to rebuild the contact.php by using one of my own 'php-creations' (link.php) :-) But no go, so if someone has the time to look into this I would appreciate it!



Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Muurvaren on April 02, 2007, 06:00:22 pm
Here is a plugin inspired from Gizmo add on (http://forum.coppermine-gallery.net/index.php?topic=29822.0) for adding a contact form in your Coppermine gallery:
This plugin add un menu button to display a contact form to let your visitors sending a mail to the administrator Email Adress. A field verification is made before sending mail

Nice one!

Just a small 'problem', as already mentioned by others and myself. The form is positioned to low. With the help of the Developer Toolbar I reviewed the generated source code.
As you can see in the attached image, there are four <br> under the line '<!-- Start standard table -->'. I'am not sure if this is the problem but could you find the time to look into this (no hurry!)? Of course I searched the code myself but with no luck, not surprisingly as a PHP-noob  ;D

Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Muurvaren on April 02, 2007, 07:04:52 pm
Just a small 'problem', as already mentioned by others and myself. The form is positioned to low. With the help of the Developer Toolbar I reviewed the generated source code.
As you can see in the attached image, there are four <br> under the line '<!-- Start standard table -->'. I'am not sure if this is the problem but could you find the time to look into this (no hurry!)? Of course I searched the code myself but with no luck, not surprisingly as a PHP-noob  ;D

Never mind!
Still a noob but I found it myself  :)

remove <br/> on line 46 (contact.php)
remove <br><br> on line 49
remove <br> on line 63

As you can see for youre self at
http://www.muurvaren.nl/index.php?file=contact/contact (http://www.muurvaren.nl/index.php?file=contact/contact)

Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: jonesy on April 02, 2007, 08:27:21 pm
Okay wadh, that does the trick.
Thnx

grtz Jonesy
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on April 03, 2007, 07:57:47 am
thank's, correction will bee add in the pack asp
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: rubenix on July 10, 2007, 01:16:42 pm
Does somebody know how to show the browser time instead of the server time on the email??

Ie. It shows on '10/07/2007 at 07:08' and I would like to add the timezone difference depending on where the user who send me a comment is based.
My server is based in NY time and I'm in Europe...I thought that the plugin would catch the coppermine time, but catching the server time instead.

Something like grabbing the computer time of the sender, any ideas?? completely new in php
If somebody knows how to grab the coppermine time would be fine  ;)

Thanks in advance guys!

Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on July 10, 2007, 02:26:47 pm
Never mind!
Still a noob but I found it myself  :)

remove <br/> on line 46 (contact.php)
remove <br><br> on line 49
remove <br> on line 63



Thanks, needed that.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: rollabones on August 16, 2007, 01:22:51 am

Nevermind... I'm blind.


I installed this plug-in and all works well.

I have one picky question. Look at any of the pages on my site. You'll see all tables in the middle are at top of page directly under "Rolla Area Photo Gallery".

Now, click on "Contact Us" link. Why is there so much white space between "Rolla Area Photo Gallery" and the form? I've looked at the html and can't see anything.

Any ideas anyone?

Thanks,
Steve
http://gallery.rollanet.org/
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Zeder on August 31, 2007, 08:03:59 am
Hello,
I installed V1.3 it worked for a while sending my self email.  No I do not get any emails.  A lot of people have tried to email me and I get nothing.  I am using 1.4.12 stabl.  Any ideas?

www.infocus-imagery.com

Cheers
Z
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on August 31, 2007, 08:23:29 am
is your email adress ok in the coppermine config ?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dke on September 01, 2007, 12:24:47 pm
no button appears after installation, is my theme.php corrupt?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on September 01, 2007, 01:01:20 pm
what theme ?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dke on September 01, 2007, 09:16:46 pm
what theme ?


macosx slightly modified
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on September 01, 2007, 10:33:26 pm
did you look the sub menu under the @ button ?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dke on September 01, 2007, 11:32:41 pm
did you look the sub menu under the @ button ?

Ohh its added under there? Then that explains why i didn't find it as i removed that button from my gallery. Any chance you would be so kind on how to modify it to add a button out in the open among with the other buttons?

Thanks!
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on September 02, 2007, 09:40:31 am

for exemple:for displaying the contact button after the search button:
edit your codebase.php and find this function
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sys_menu, $template_sys_menu_spacer;

  $new_template=$template_sys_menu;
  $button=template_extract_block($new_template,'home');
 
   $params = array(
      '{HOME_LNK}' => $target,
      '{HOME_TITLE}' => $title,
      '{HOME_TGT}' => $href,
      'home' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sys_menu,'home',"<!-- BEGIN home -->" . $button . "<!-- END home -->\n" .$new_button);
}
change with
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sub_menu, $template_sys_menu_spacer;

  $new_template=$template_sub_menu;
  $button=template_extract_block($new_template,'search');
 
   $params = array(
    '{SEARCH_LNK}' => $target,
      '{SEARCH_TITLE}' => $title,
      '{SEARCH_TGT}' => $href,
      'search' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sub_menu,'search',"<!-- BEGIN search -->" . $button . "<!-- END search -->\n" .$new_button);
}
in your theme.php search
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td width="50%"></td>
  </tr>
</table>
and change with
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- BEGIN search -->
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- END search -->
    <td width="50%"></td>
  </tr>
</table>
with another theme be sure the <!-- BEGIN xxxxx --> and <!-- END xxxxx --> exist .
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dke on September 02, 2007, 12:46:40 pm
for exemple:for displaying the contact button after the search button:
edit your codebase.php and find this function
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sys_menu, $template_sys_menu_spacer;

  $new_template=$template_sys_menu;
  $button=template_extract_block($new_template,'home');
 
   $params = array(
      '{HOME_LNK}' => $target,
      '{HOME_TITLE}' => $title,
      '{HOME_TGT}' => $href,
      'home' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sys_menu,'home',"<!-- BEGIN home -->" . $button . "<!-- END home -->\n" .$new_button);
}
change with
Code: [Select]
// create button template from current sys menu template (added by Sami)
function contact_add_admin_button($href,$title,$target,$link)
{
  global $template_sub_menu, $template_sys_menu_spacer;

  $new_template=$template_sub_menu;
  $button=template_extract_block($new_template,'search');
 
   $params = array(
    '{SEARCH_LNK}' => $target,
      '{SEARCH_TITLE}' => $title,
      '{SEARCH_TGT}' => $href,
      'search' => $link,
   );
   $new_button="<!-- BEGIN $link -->".template_eval($button,$params)."<!-- END $link -->\n";
   template_extract_block($template_sub_menu,'search',"<!-- BEGIN search -->" . $button . "<!-- END search -->\n" .$new_button);
}
in your theme.php search
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <td width="50%"></td>
  </tr>
</table>
and change with
Code: [Select]
<td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- BEGIN search -->
    <td><img src="themes/mac_ox_x/images/menu_button_bg_left.gif" border="0" alt="" /><br /></td>
    <td style="background-image:url(themes/mac_ox_x/images/menu_button_bg_middle.gif);" valign="top">
            <a href="{SEARCH_TGT}" onmouseover="MM_showHideLayers('SYS_MENU','','hide')" title="{SEARCH_LNK}">{SEARCH_LNK}</a>
    </td>
    <td><img src="themes/mac_ox_x/images/menu_button_bg_right.gif" border="0" alt="" /><br /></td>
    <!-- END search -->
    <td width="50%"></td>
  </tr>
</table>
with another theme be sure the <!-- BEGIN xxxxx --> and <!-- END xxxxx --> exist .

thanks, it worked great, however the contact form looks really bad in macosx, how can i add white texture to the grey areas? And how can i make the "gap" between "contact" and "contact form" to be removed?

Thanks.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Hein Traag on September 02, 2007, 01:34:21 pm
Adjust the colours in the coppermine stylesheet file.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dke on September 02, 2007, 01:35:37 pm
Adjust the colours in the coppermine stylesheet file.

Hi,

I'm no high-end user, can you be a little bit more precise what i have to modify?

I've modified my style.css and looked for #7F7F7F which is "dark grey" but if i change this to #FFFFFF (which is white) my entire gallery looks weird, the dark line between thumbnails are removed etc. Is there a way to modify contact.php insted to suit my needs?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on September 02, 2007, 02:12:18 pm
just replace the entire code of the contact.php file with this
Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

/*********************************************
  Plugin Coded by Frantz Based on Gizmo MOD
  
  Fixing contact button positioning & Added CAPTCHA confirmation
  by B.Mossavari (Sami)
**********************************************/

require('include/init.inc.php');
require (
'plugins/contact/include/init.inc.php');
pageheader($lang_plugin_contact['name']);

    
starttable("100%"$lang_plugin_contact['name'], 2);
    
?>

    <tr>
    <td colspan="2" class="tableh2" valign="top" align="center">
       <?php echo "<b>".$CONFIG['gallery_name'].":</b>".$lang_plugin_contact['intro']; ?>
    </td>
    </tr>
    <tr>
    <td colspan="2"  class="tableb" valign="top" align="left"><i><b><?php echo"<font color=red>""* ".$lang_plugin_contact['required']."</font color>"?></b></i></td>
    </tr>
<form method="post" action="index.php?file=contact/fcf_parse" name="contactform">
<tr>
<td class="tableb" valign="top" align="right" ><?php echo $lang_plugin_contact['your_name'];?> *: </td>
        <td class="tableb" align="left"><input name="Name" type="text" title="required" value="<?php if(isset($_SESSION['cnt_name'])) echo $_SESSION['cnt_name']; ?>" size="35"/></td>
</tr>
<tr>
<td class="tableb" valign="top" align="right"> <?php echo $lang_plugin_contact['your_mail'];?> *:</td>
      <td class="tableb" align="left"><input type="text" name="Email" size="35" title="required" value="<?php if(isset($_SESSION['cnt_email'])) echo $_SESSION['cnt_email']; ?>"/></td>
</tr>
<tr>
<td class="tableb" valign="top" align="right"> <?php echo $lang_plugin_contact['subject'];?> *:</td>
      <td class="tableb" align="left"><input type="text" name="Subject" size="35" title="required" value="<?php if(isset($_SESSION['cnt_subject'])) echo $_SESSION['cnt_subject']; ?>"/></td>
</tr><br/>
 <tr><td colspan="2" class="tableb" valign="top" align="center"> <?php echo $lang_plugin_contact['text'];?> *:</td></tr>     
<tr><td class="tableb" colspan="2"align="center"><textarea rows="10" cols="60" name="Comments" title="required"><?php if(isset($_SESSION['cnt_comments'])) echo $_SESSION['cnt_comments']; ?></textarea></td></tr>
      <br><br>
<tr>
<td colspan="2" class="tableb" valign="top" align="center"><b> <?php echo $lang_plugin_contact['spam_question'];?></b></td>
</tr>
<tr>
<td class="tableb" valign="top" align="right"><?php echo $question;?></td>
        <td class="tableb" align="left"><img src="plugins/contact/captcha.php" align="absmiddle" />&nbsp;
        <input type="text" name="confirmCode" id="confirmCode" size="5" class="textinput" style="width:50px; height:20px; font-size:12pt;">
        *</td>
</tr>
<tr><td colspan="2" class="tableb" valign="top" align="center">       
        <input type="hidden" value="captcha_check" id="contact_captcha" name="contact_captcha" />
        <input name="submit" type="submit" class="cfcSub" id="submit" value="<?php echo $lang_plugin_contact['submit'];?>" /></td>
</tr>
<br>
      </form>
   
    <?php
    endtable
();
pagefooter();
ob_end_flush();
?>
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dke on September 02, 2007, 02:23:11 pm
just replace the entire code of the contact.php file with this

Thanks so much! Not to be a pain in the ass, but isn't there anyway to remove the gap between "Contact" and Contact Form, there seems to be nothing there, is it intended for something?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dke on September 02, 2007, 08:14:19 pm
Fixed my self, sorry for double post, i forgot i could modify my post.

Fixed by removing all <br> & </br> in contact.php

Thanks for this fantastic plugin!
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dudegetalife on November 06, 2007, 04:23:06 am
how do you add more words or a brief description to what appears when the user clicks the contact button?


Also, is their anyway that you can change what the menu says underneath contact whenever you are on top of it like you can with the menu buttons?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on November 06, 2007, 07:30:50 am
Quote
how do you add more words or a brief description to what appears when the user clicks the contact button?
look in the contact.php file and modify accordingly
Quote
is their anyway that you can change what the menu says underneath contact whenever you are on top of it like you can with the menu buttons?
yes make the changes in the plugin lang file
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dudegetalife on November 06, 2007, 09:15:57 pm
thx works great  ;D
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: DangRabbit on January 30, 2008, 04:19:43 pm
my site: www.ModBookGallery.com

version: 1.4.13 (stable)

theme: gray_satin (customized)

Form: http://www.modbookgallery.com/index.php?file=contact/contact

Problem: The menu... it didn't add the button properly. It added a second "Home" button (I already  had a home button added myself to the theme) and it didn't add any button/link to the contact form...

Help :)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: DangRabbit on January 30, 2008, 04:33:46 pm
Nevermind, I figured it out! It was the lack of the comment codes in my theme.php template
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on January 30, 2008, 04:36:01 pm
Nevermind, I figured it out! It was the lack of the comment codes in my theme.php template
:D
btw update your gallery with the latest version wich is currently 1.4.15
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: jeffnow on February 23, 2008, 06:19:52 am
Hello,

I installed V1.3 it worked but I do not get any emails.  And yes all my registrations and ecard emails work fine. Any ideas?

Thanks in advance.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Joachim Müller on February 23, 2008, 11:58:04 am
Without mind-reader capabilities: no. Maybe you might want to post details (e.g. a link to your site and a report wether sending regular emails works using built-in coppermine features).
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: gremlin on March 03, 2008, 11:42:54 am
hello,

i got the same problem too.
a regestration mail will be sent and all other mails too.
but the contact form will display only the message "mail wurde versand" but nothing will take effect.

any idee

***

problem solved
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Joachim Müller on March 04, 2008, 08:01:29 am
You require a login, so what should we look at? Provide a non-admin test user account if you want support... ::)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dawid8 on June 19, 2008, 04:07:42 pm
Hi,

i have edit the design of the config.php

the pic is old now the submit button is at the center
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: ttlive on February 21, 2009, 10:26:01 pm
Please find attached the German translation, as it was not part of the download zip.

I wonder how the language could be used.
I added the language file, next to french, dutch, italian and english but how or where can the language be changed?



Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on February 22, 2009, 09:10:25 am
german lang file is in the 1.3 version pack (on the very first post)
The plugin detect if the lang file exist (the same as used for the gallery, so you have nothing to do)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: ttlive on February 22, 2009, 09:37:45 am
Thank's for your quick reply.
I thought version 1.2 ist more brain jogging but as spam secure as version 1.3, isn't it?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on February 22, 2009, 11:02:44 am
Quote
I thought version 1.2 ist more brain jogging but as spam secure as version 1.3, isn't it?
yes, it is.
So add your lang file into the plugin lang folder, clear the browser cache and the cookies, it should do it
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: dheep on February 26, 2009, 09:27:55 pm
Here is the Russian language!
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on February 27, 2009, 07:35:21 am
Thank's for your contribution.
Your lang file is added to the 1.3 pack in the very first post
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Cath22 on March 18, 2009, 10:26:18 pm
Hi there,

Any idea to change the email adress which it will send to (now administrator), would like to send it to someone else, but cant seem to get it changed.

Thanks
Cath
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Nibbler on March 18, 2009, 10:32:26 pm
Edit include/init.inc.php (of the plugin, not Coppermine itself)

Code: [Select]
/* email configuration */
$email_it_to = $CONFIG['gallery_admin_email'];

Change as you want

Code: [Select]
/* email configuration */
$email_it_to = 'you@example.com';
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Nibbler on March 18, 2009, 10:43:31 pm
Sami, you seem to have removed the author attribution link from version 1.3 of the plugin. You're not permitted to do that according to the license of the original script.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Cath22 on March 21, 2009, 05:37:31 pm
Edit include/init.inc.php (of the plugin, not Coppermine itself)

Code: [Select]
/* email configuration */
$email_it_to = $CONFIG['gallery_admin_email'];

Change as you want

Code: [Select]
/* email configuration */
$email_it_to = 'you@example.com';

Thanks Nibbler, works like a charm.  :-*
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: sharon1 on April 09, 2009, 08:46:11 pm
Hello, I have installed this plugin in my store. My store link is:

http://www.vanlieuphotography.com/store/

I would like to remove the contact link from the admin login section on the lower right side and move it up to the menu section to replace my email link. I can't seem to figure this out. Help would be appreciated.

Sharon
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: sharon1 on April 09, 2009, 11:28:33 pm
Sorry - found the answer in this thread.

Now it runs.

Code:

     <td class="top_menu_right_bttn">
        <a href="index.php?file=contact/contact" title="Contact">Contact</a>
     </td>

Sharon
Title: After install "contact" captcha images stop showing in login form and comments
Post by: dimasikos on April 10, 2009, 11:00:06 am
Hello. Thanks for good product.

Before installation of 'contact' i already have installed 'captcha 3' for login form and comments.

When i install "contact" my already installed 'captcha 3' images stop showing in login form and comments http://dmitriygalaktionov.kz/displayimage-28-1.html (http://dmitriygalaktionov.kz/displayimage-28-1.html). Contact's captcha work fine http://dmitriygalaktionov.kz/index.php?file=contact/contact (http://dmitriygalaktionov.kz/index.php?file=contact/contact).

Feature of my gallery is 'image anti theft'.

I also try but nothing change:

When i turn off  'conact' plugin all work fine.

Thanks, Dmitriy
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: lakersfan on June 16, 2009, 11:14:23 am
Hi!

I made polish translation and attached , unzip and upload in the lang directlory of the plugin. I hope it will be useful.  :)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on June 16, 2009, 11:32:44 am
Thank's for your contribution. I'll add your lang file in the pack asp
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: lakersfan on June 16, 2009, 12:55:27 pm
thanks, It's all my pleasure  ;)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: follett on August 07, 2009, 09:44:03 pm
In Poland, we have a few strange letters like : ą, ć, ś ó, ł
When I get the message, that messegae does not include that sepcial signs.
So messages witch i get looks like

Quote
sory ale nie kumam w jaki sposĂłb zapĹ‚acić tÄ… kasÄ™ (5zĹ‚) . Przy rejstracji wpisaĹ‚em to co byĹ‚o wymagane i to samo  jeĹ›li chodzi o wpĹ‚atÄ™ a nadal nie mam dostÄ™pu. Jak mogli byĹ›cie mi to rozjaĹ›nić?    rejstracji dokonaĹ‚em wczoraj

Is any solution, to make it right?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: François Keller on August 07, 2009, 10:15:56 pm
the lang file is probably not in the UTF8 chartset andmust be convert.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Joachim Müller on August 08, 2009, 01:35:03 pm
Don't answer to threads by follett, he's banned - see http://forum.coppermine-gallery.net/index.php/topic,61075.msg302920.html#msg302920
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Tom_Boucher on September 24, 2009, 06:01:44 pm
Hi there,

Any idea to change the email adress which it will send to (now administrator), would like to send it to someone else, but cant seem to get it changed.

Thanks
Cath

I got the same problem.
Any answer
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Magic2010 on March 22, 2010, 11:41:33 pm
Hi there,
is there anyway to remove the gap between "Contact" and the top, the contact form is valigned to center.

Thank you
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Joachim Müller on March 23, 2010, 07:16:42 am
Board rules / Forum policies: Post Links (http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616)
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Magic2010 on March 23, 2010, 12:03:26 pm
Hello sir,
Thank you for reply, my gallery is privat htacces password protected gallery, posting the site url wouldnt help, but I have attached a screenshot of the problem.

thank you in advance.
 
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Joachim Müller on March 23, 2010, 01:05:43 pm
Then you're on your own with your issues. We can not support things that we can not see.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Magic2010 on March 23, 2010, 01:15:37 pm
ok thank you!
is it ok if I pm you my user/password?
Im going to use my gallery as a family photo album, therefor its not public.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Joachim Müller on March 23, 2010, 02:58:06 pm
is it ok if I pm you my user/password?
No.
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Magic2010 on March 23, 2010, 05:27:41 pm
dos this mean I cant get any help if its private gallery?
Title: Re: Contact: add new menu button to display a contact form with spam prevention
Post by: Magic2010 on March 23, 2010, 07:04:22 pm

Quote
Mr. Muller wrote no
Admin, how would you login to my gallery?
should I post my user and password here in this topic?