• [MOD] Contact Form 5 0 5 1
Currently:  

Author Topic: [MOD] Contact Form  (Read 369011 times)

0 Members and 1 Guest are viewing this topic.

Rembrandt

  • Guest
Re: [MOD] Contact Form
« Reply #255 on: December 30, 2010, 07:42:15 PM »
Could you tell me how can i hide e-mail?
....
only the admin mail:
search:
$select .= "<option value=\"".$row['user_email']."\">&raquo; ".format_text($row['user_name'], 2)." (".$row['user_email'].")</option>\n";

and replace:
$select .= "<option value=\"".$row['user_email']."\">&raquo; ".format_text($row['user_name'], 2)." </option>\n";

Offline milanNN

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • http://www.planesphotos.net
Re: [MOD] Contact Form
« Reply #256 on: December 30, 2010, 08:31:32 PM »
Could you tell me how can i hide e-mail?
....
only the admin mail:
search:
$select .= "<option value=\"".$row['user_email']."\">&raquo; ".format_text($row['user_name'], 2)." (".$row['user_email'].")</option>\n";

and replace:
$select .= "<option value=\"".$row['user_email']."\">&raquo; ".format_text($row['user_name'], 2)." </option>\n";

Thank you!

Offline batu544

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Free Celebrity wallpapers
Re: [MOD] Contact Form
« Reply #257 on: January 30, 2011, 05:17:56 PM »
Hi,
    I have installed this mod recently.. but unable to make it work as expected.. Whenever I am trying to send an email, it's always showing me "Please enter the verification code." error message..

Could anyone please let me know what mistake I have done ?   here is my contact page ==> www.bhwallpapers.com/contact.htm


FYI.. I have installed recaptcha mod of V@no and it works well in my other pages..like www.bhwallpapers.com/top_friends.htm  and register page.

Here is my contact.php code..
Code: [Select]
<?php 
/************************************************************************** 
 *                                                                        * 
 *    4images - A Web Based Image Gallery Management System               * 
 *    ----------------------------------------------------------------    * 
 *                                                                        * 
 *             File: contact.php                                          * 
 *        Copyright: (C) 2002  - 2010 Jan Sorgalla                        * 
 *            Email: jan@4homepages.de                                    * 
 *              Web: http://www.4homepages.de                             * 
 *    Scriptversion: 1.7.7                                                * 
 *                                                                        * 
 *    Never released without support from: Nicky (http://www.nicky.net)   * 
 *                                                                        * 
 ************************************************************************** 
 *                                                                        * 
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       * 
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 * 
 *    ---------------------------------------------------------------     * 
 *    This script is NOT freeware! Please read the Copyright Notice       * 
 *    (Licence.txt) for further information.                              * 
 *                                                                        * 
 *************************************************************************/ 

$main_template "contact"

define('GET_CACHES'1); 
define('ROOT_PATH''./'); 
define('MAIN_SCRIPT'__FILE__);
include(
ROOT_PATH.'global.php'); 
require(
ROOT_PATH.'includes/sessions.php'); 
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php'); 
$txt_clickstream "Contact"


if (
$action == "") { 
  
$action "mailform"



$content ""

$sendprocess 0

if (
$action == "emailSiteOwner") { 
 
  
$error 0
  
  
$mail_to = (isset($_POST['emails'])) ? $_POST['emails'] : $config['site_email'];
  
$sender_name stripslashes(trim($_POST['sender_name'])); 
  
$sender_email stripslashes(trim($_POST['sender_email'])); 

  
$subject un_htmlspecialchars(trim($HTTP_POST_VARS['subject'])); 
  
$message un_htmlspecialchars(trim($HTTP_POST_VARS['message'])); 
  
  
$captcha = (isset($HTTP_POST_VARS['captcha'])) ? un_htmlspecialchars(trim($HTTP_POST_VARS['captcha'])) : "";


if (
$sender_name == "" || $sender_email == "" || $subject == "" || $message == "") { 
    
$msg $lang['lostfield_error']; 
    
$sendprocess 1
    
$error 1
  } 
  
 
$check "/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,4})$/";

if(!isset(
$sender_email) OR $sender_email == "" OR !preg_match($check,$sender_email))
   {
   
$msg .= (($msg != "") ? "<br />" "").$lang['invalid_email_format']; 
    
$sendprocess 1
    
$error 1
   }
  
if (
$captcha_enable_contact && !captcha_validate($captcha)) {
      
$msg .= (($msg != "") ? "<br />" "").$lang['captcha_required'];
      
$error 1;
    }

if (!
$error) { 
    
$sender_user_name $sender_name
    
$sender_user_email $sender_email

    
// Start Emailer 
    
include(ROOT_PATH.'includes/email.php'); 
    
$site_email = new Email(); 
    
$site_email->set_from($sender_user_email$sender_user_name); 
    
$site_email->set_to($mail_to); 
    
$site_email->set_subject($subject);
    
$site_email->register_vars(array( 
    
"sender_user_name" => $sender_user_name
    
"sender_user_email" => $sender_user_email
    
"message" => $message
    
"site_name" => $config['site_name'
    )); 
    
    
$site_email->set_body("mailform_message"$config['language_dir']); 
    
$site_email->send_email(); 
    
$msg 'Email has been sent. I will contact you as soon as possible. Thank you !!' 

  } 
  else { 
    
$action "mailform"
  } 


if (
$action == "mailform") { 
 
  if (!
$sendprocess) { 
    
$subject ""
    
$message ""
  } 
  
  
$sender_name = ($user_info['user_level'] != GUEST) ? $user_info['user_name'] : ""
  
$sender_email = ($user_info['user_level'] != GUEST) ? $user_info['user_email'] : ""
  
    
$site_template->register_vars(array( 
      
"sender_name" => $sender_name
      
"sender_email" => $sender_email,
      
"url_form" => $site_sess->url(ROOT_PATH."contact.htm"),
      
"subject" => htmlspecialchars($subject), 
      
"message" => htmlspecialchars($message), 
      
"captcha_contact" => (bool)$captcha_enable_contact,
      
"lang_captcha" => $lang['captcha'],
      
"lang_captcha_desc" => $lang['captcha_desc'],
      
"lang_mail_to" => $lang['mail_to'],
      
"lang_your_name" => 'Name:'
      
"lang_your_mail" => 'Email:'
      
"lang_subject" => 'Subject:'
      
"lang_message" => 'Message:'
      
"lang_submit" => $lang['submit'], 
      
"lang_reset" => $lang['reset'],
    )); 
    
$content $site_template->parse_template("contact_mailform"); 


//----------------------------------------------------- 
//--- Clickstream ------------------------------------- 
//----------------------------------------------------- 
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'].$txt_clickstream."</span>"


//----------------------------------------------------- 
//--- Print Out --------------------------------------- 
//----------------------------------------------------- 
$site_template->register_vars(array( 
  
"content" => $content
  
"msg" => $msg
  
"clickstream" => $clickstream
)); 
$site_template->print_template($site_template->parse_template($main_template)); 
include(
ROOT_PATH.'includes/page_footer.php'); 
?>



Here is my contactmailform.html
Code: [Select]
<table width="100%" class="row2" border="0" cellpadding="4" cellspacing="0">
  <form name="contactform" action="{url_form}" method="post" onsubmit="postbutton.disabled=true;">
<input type="hidden" name="action" value="emailSiteOwner">
<input type="hidden" name="user_id" value="{user_id}">
    <tr>
      <td align="right" valign="middle"><b>{lang_your_name}</b></td>
      <td align="left"><input class="input" name="sender_name" type="text"  tabindex="1" value="{sender_name}" size="40" maxlength="50">
      </td>
    </tr>
    <tr>
      <td align="right" valign="middle"><b>{lang_your_mail}</b></td>
      <td align="left"><input  class="input" name="sender_email" type="text"  tabindex="2" value="{sender_email}" size="40" maxlength="50">
      </td>
    </tr>
    <tr>
      <td align="right" valign="middle"><b>{lang_subject}</b></td>
      <td align="left"><input  class="input" name="subject" type="text"  tabindex="3" value="{subject}" size="40" maxlength="50"></td>
    </tr>
    <tr>
      <td align="right" valign="top"><b>{lang_message}</b></td>
      <td align="left" valign="top"><textarea name="message" cols="50" rows="10" wrap="VIRTUAL"  tabindex="4">{message}</textarea> </td>
    </tr>
    {if captcha_contact}
<tr>
        <td width="80" valign="top"><b>{lang_captcha}</b></td>
         <td>{recaptcha}</td>
    </tr>
   {endif captcha_contact}
    <tr>
      <td align="right" valign="middle">&nbsp;</td>
      <td align="left">
        <input type="submit" name="postbutton" value="{lang_submit}" class="button" style="margin-right:13px; " />
        <input tabindex="6" type="reset" name="reset" value="{lang_reset}" class="button" />
      </td>
    </tr>
</form>
</table>



Any clue or help will be greatly appreciated.. :)

Thank you
batu544

Rembrandt

  • Guest
Re: [MOD] Contact Form
« Reply #258 on: January 30, 2011, 05:42:10 PM »
... I have installed this mod recently.. but unable to make it work as expected.. Whenever I am trying to send an email, it's always showing me "Please enter the verification code." error message..

....

have you the mod from here?
http://www.4homepages.de/forum/index.php?topic=8987.msg144481#msg144481
maybe remove step 8. )

Offline wassimo

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Contact Form
« Reply #259 on: January 31, 2011, 09:17:10 PM »
thanks alot < nice mood  :D

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [MOD] Contact Form
« Reply #260 on: March 16, 2011, 09:29:25 PM »
In dem Abschnitt "10.4.1" sind die tags [*php] und [/*php] in den Code gerutscht! ;)

Offline MrAndrew

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
    • Aviation PhotoBase
Re: [MOD] Contact Form
« Reply #261 on: February 11, 2012, 09:55:36 AM »
How to get a dropdown list for GUESTs too?

If guest send message, it doesn`t work! Dropdown list with "send to" user name and e-mail not shown!

For login user, work`s fine!

Offline jimraynor

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: [MOD] Contact Form
« Reply #262 on: April 28, 2012, 05:45:53 PM »
i installed but doesnt work.


DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name, u.user_name FROM 4images_images i, 4images_categories c LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id IN (0, 71, 13, 375, 233, 208, 121, 98, 405, 156, 255, 118, 173, 132, 367, 198, 238, 348, 170, 207, 135, 272, 137, 271, 381, 206, 12, 120, 406, 366, 117, 254, 7, 171, 196, 232, 133, 149, 99, 354, 136, 172, 380, 195, 365, 230, 42, 270, 417, 97, 146, 131, 205, 353, 407, 119, 253, 116, 379, 165, 115, 483, 408, 158, 204, 194, 349, 269, 252, 134, 364, 229, 378, 166, 251, 130, 409, 228, 334, 482, 203, 193, 151, 268, 114, 377, 481, 153, 410, 333, 250, 267, 21, 227, 11, 202, 192, 113, 455, 382, 191, 411, 352, 226, 201, 157, 112, 78, 249, 266, 77, 14, 383, 355, 111, 412, 248, 225, 190, 265, 479, 200, 62, 145, 413, 199, 189, 384, 76, 110, 264, 224, 50, 478, 357, 247, 160, 3, 223, 169, 414, 385, 159, 246, 188, 477, 263, 75, 44, 361, 109, 123, 222, 262, 155, 80, 73, 415, 386, 187, 245, 104, 476, 358, 140, 125, 221, 261, 72, 416, 387, 244, 347, 474, 186, 143, 105, 152, 185, 260, 388, 106, 142, 359, 472, 150, 220, 49, 243, 184, 92, 471, 389, 107, 351, 259, 138, 148, 242, 219, 469, 108, 350, 90, 258, 390, 183, 241, 167, 147, 218, 154, 217, 53, 257, 391, 139, 240, 84, 468, 182, 141, 35, 216, 102, 178, 335, 124, 467, 392, 239, 101, 33, 360, 126, 89, 393, 466, 179, 215, 180, 356, 100, 394, 168, 127, 214, 465, 464, 181, 128, 213, 395, 9, 93, 212, 5, 4, 463, 129, 396, 22, 177, 462, 211, 37, 122, 397, 2, 18, 210, 87, 68, 461, 398, 57, 16, 24, 209, 460, 79, 399, 164, 459, 81, 400, 457, 94, 401, 458, 402, 403, 456, 440, 441, 443, 442, 453, 452, 451, 450, 449, 448, 439, 362, 25, 30, 20, 447, 51, 404, 445, 444, 446, 438, 437, 436, 435, 434, 433, 432, 431, 430, 429, 428, 427, 426, 425, 424, 423, 422, 421, 420, 419, 418, 376, 374, 373, 372, 371, 370, 369, 368, 363, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 332, 331, 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 281, 256, 237, 236, 235, 103, 176, 175, 174, 1, 144, 163, 162, 161, 65, 17, 19, 96, 95, 91, 88, 86, 85, 83, 82, 74, 70, 69, 67, 66, 64, 63, 61, 60, 59, 58, 56, 55, 54, 52, 48, 47, 46, 45, 43, 41, 40, 39, 38, 36, 34, 32, 31, 29, 28, 27, 26, 23, 6, 8, 234, 10, 15, 454) AND i.image_date >= 1335282291 ORDER BY RAND() LIMIT 3
Unknown column 'i.user_id' in 'on clause'

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/server/public_html/includes/db_mysql.php on line 116

Rembrandt

  • Guest
Re: [MOD] Contact Form
« Reply #263 on: April 28, 2012, 05:50:37 PM »
...Unknown column 'i.user_id' in 'on clause'
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/server/public_html/includes/db_mysql.php on line 116

Please use the Search:
http://www.4homepages.de/forum/index.php?topic=22668.0

Offline Honse

  • Newbie
  • *
  • Posts: 39
  • Fahre nie schneller, wie Dein Schutzengel fliegt
    • View Profile
    • Pe-Ch's Galerie
Re: [MOD] Contact Form
« Reply #264 on: May 08, 2012, 06:55:13 PM »
Hallo,
ich habe lange probiert, gelesen und geschaut.
Das captcha in dem Kontaktformular funktioniert bei mir nicht.
Entweder er wird angezeigt und funktioniert nicht oder es wird nicht angezeigt.
Code: [Select]

    {if captcha_trouble_ticket}
          <tr>
            <td class="row2" valign="top"><b>{lang_captcha}</b></td>
            <td class="row2">
  <a href="javascript:new_captcha_image();"><img src="{url_captcha_image}" border="0" id="captcha_image" /></a> <br />
             <input class="input" id="captcha_input" type="text" name="captcha" tabindex="5">{if captcha_calculation} = <input class="input_res" name="result" type="text" >{endif captcha_calculation}

              <br />
              {lang_captcha_desc}
</td>
          </tr>
          {endif captcha_trouble_ticket}
dies ist der Ausschnitt vom contact_mailform.html - wo der captcha angezeigt wird, aber nicht funktioniert.
Code: [Select]
{if captcha_contact}
          <tr>
            <td class="row2" valign="top"><b>{lang_captcha}</b></td>
            <td class="row2">
  <a href="javascript:new_captcha_image();"><img src="{url_captcha_image}" border="0" id="captcha_image" /></a> <br />
             <input class="input" id="captcha_input" type="text" name="captcha" tabindex="5">{if captcha_calculation} = <input class="input_res" name="result" type="text" >{endif captcha_calculation}

              <br />
              {lang_captcha_desc}
</td>
          </tr>
          {endif captcha_contact}
und copiere ich diesen Code ein, wird das captcha - Bild nicht angezeigt. Dies ist aber der Abschnitt, der richtig sein müßte.

Wer kann mir helfen. Ich bekomme sehr viele Spameinträge im Momoment.

Liebe Grüße
Honse
Ich weiß, das ich nichts weis  ---- Sogrates ----

Rembrandt

  • Guest
Re: [MOD] Contact Form
« Reply #265 on: May 08, 2012, 07:11:06 PM »
Hi!

der zweite code den du gepostet hast funktioniert definitiv, habe ich soeben ausprobiert.
der fehler muß wo anders liegen.

mfg Andi

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: [MOD] Contact Form
« Reply #266 on: May 08, 2012, 07:19:57 PM »
@honse
ich habe nun 5 Minuten rumprobiert.
Es funktioniert doch  :wink:

nobby

Offline Honse

  • Newbie
  • *
  • Posts: 39
  • Fahre nie schneller, wie Dein Schutzengel fliegt
    • View Profile
    • Pe-Ch's Galerie
Re: [MOD] Contact Form
« Reply #267 on: May 08, 2012, 07:27:04 PM »
Hallo @nobby,

hast du auf meiner Seite ausprobiert? Ich habe auch ausgeloggt das Kontaktformular ausprobiert und ich konnte es auch ohne captchaeingabe abschicken.
Ich hatte mir ein Gästebuch installiert, das vollgespamt wurde. Jetzt habe ich es abgeschaltet und nun kommen die Spams bei mir im Postfach an.

Ich freue mich über Sie schnellen Antworten von Euch, danke.

Liebe Grüße
Honse

Ich weiß, das ich nichts weis  ---- Sogrates ----

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: [MOD] Contact Form
« Reply #268 on: May 08, 2012, 07:29:46 PM »
hast du auf meiner Seite ausprobiert?

Ja, ich habe es auf Deiner Seite mehrfach ausprobiert. Siehe Screen.
Es wird auch jedesmal ein anderes Captcha-Bild gezeigt.

Und ein Test habe ich auch gesendet  :)

Offline Honse

  • Newbie
  • *
  • Posts: 39
  • Fahre nie schneller, wie Dein Schutzengel fliegt
    • View Profile
    • Pe-Ch's Galerie
Re: [MOD] Contact Form
« Reply #269 on: May 08, 2012, 07:37:03 PM »
@nobby
danke, dein Test ist angekommen. Jetzt muß ich sehen, wo die Spams herkommen.

Vielen Danke
Falls ihr eine Idee habt, lasst es mich bitte wissen.

Lieben Gruß
Honse
Ich weiß, das ich nichts weis  ---- Sogrates ----