Contact Form by BestWebSoft - Version 2011.05.26

Version Description

Download this release

Release Info

Developer bestwebsoft
Plugin Icon 128x128 Contact Form by BestWebSoft
Version 2011.05.26
Comparing to
See all releases

Code changes from version 2011.05.27 to 2011.05.26

Files changed (3) hide show
  1. contact_form.php +42 -42
  2. readme.txt +1 -7
  3. screenshot-2.jpg +0 -0
contact_form.php CHANGED
@@ -6,13 +6,13 @@
6
  /*
7
  Plugin Name: Contact Form Plugin
8
  Plugin URI: http://bestwebsoft.com/plugin/
9
- Description: Plugin for portfolio.
10
  Author: BestWebSoft
11
- Version: 1.01
12
  Author URI: http://bestwebsoft.com/
13
  License: GPLv2 or later
14
  */
15
- /* Copyright 2011 BestWebSoft ( plugin@bestwebsoft.com )
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License, version 2, as
@@ -99,12 +99,12 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
99
  <div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
100
  <form method="post" action="options-general.php?page=contact-form-plugin/contact_form.php">
101
  <span style="border-bottom:1px dashed;margin-bottom:15px;">
102
- <p>If you would like to add a Contact Form to your website, just copy and put this shortcode onto your post or page: [contact_form]</p>
103
  If information in the below fields are empty then the message will be send to an address which was specified during registration.
104
  </span>
105
  <table class="form-table">
106
  <tr valign="top">
107
- <th scope="row" style="width:195px;">Use email of wordpress user: </th>
108
  <td>
109
  <input type="radio" name="cntctfrm_select_email" value="user" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'user') echo "checked=\"checked\" "; ?>/>
110
  </td>
@@ -114,7 +114,7 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
114
  </td>
115
  </tr>
116
  <tr valign="top">
117
- <th scope="row" style="width:195px;">Use this email: </th>
118
  <td>
119
  <input type="radio" name="cntctfrm_select_email" value="custom" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'custom') echo "checked=\"checked\" "; ?>/>
120
  </td>
@@ -139,7 +139,6 @@ if( ! function_exists( 'cntctfrm_settings_page' ) ) {
139
  if( ! function_exists( 'cntctfrm_display_form' ) ) {
140
  function cntctfrm_display_form() {
141
  global $error_message;
142
- $content = "";
143
 
144
  $result = "";
145
  // If contact form submited
@@ -154,7 +153,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
154
  }
155
  // If it is good
156
  if( true === $result ) {
157
- $content .= __( "Thank you for contact.", "cmntfrm" );
158
  }
159
  else if( false === $result )
160
  {
@@ -163,57 +162,58 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
163
  }
164
  else {
165
  // Output form
166
- $content .= '<form method="post" id="cntctfrm_contact_form" action="" enctype="multipart/form-data">';
167
- if( isset( $error_message['error_form'] ) ) {
168
- $content .= '<div style="text-align: left; color: red;">'.$error_message['error_form'].'</div>';
169
- }
170
- $content .= '<div style="text-align: left; padding-top: 5px;">
 
171
  <label for="cntctfrm_contact_name">Name:<span class="required"> *</span></label>
172
- </div>';
173
- if( isset( $error_message['error_name'] ) ) {
174
- $content .= '<div style="text-align: left; color: red;">'.$error_message['error_name'].'</div>';
175
- }
176
- $content .= '<div style="text-align: left;">
177
- <input class="text" type="text" size="40" value="'.$name.'" name="cntctfrm_contact_name" id="cntctfrm_contact_name" style="text-align: left; margin: 0;">
178
  </div>
179
 
180
  <div style="text-align: left;">
181
  <label for="cntctfrm_contact_email">E-Mail Address:<span class="required"> *</span></label>
182
- </div>';
183
- if( isset( $error_message['error_email'] ) ) {
184
- $content .= '<div style="text-align: left; color: red;">'.$error_message['error_email'].'</div>';
185
- }
186
- $content .= '<div style="text-align: left;">
187
- <input class="text" type="text" size="40" value="'.$email.'" name="cntctfrm_contact_emai" id="cntctfrm_contact_email" style="text-align: left; margin: 0;">
188
  </div>
189
 
190
  <div style="text-align: left;">
191
  <label for="cntctfrm_contact_subject1">Subject:<span class="required"> *</span></label>
192
- </div>';
193
- if( isset( $error_message['error_subject'] ) ) {
194
- $content .= '<div style="text-align: left; color: red;">'.$error_message['error_subject'].'</div>';
195
- }
196
- $content .= '<div style="text-align: left;">
197
- <input class="text" type="text" size="40" value="'.$subject.'" name="cntctfrm_contact_subject" id="cntctfrm_contact_subject" style="text-align: left; margin: 0;">
198
  </div>
199
 
200
  <div style="text-align: left;">
201
  <label for="cntctfrm_contact_message">Message:<span class="required"> *</span></label>
202
- </div>';
203
- if( isset( $error_message['error_message'] ) ) {
204
- $content .= '<div style="text-align: left; color: red;">'.$error_message['error_message'].'</div>';
205
- }
206
- $content .= '<div style="text-align: left;">
207
- <textarea rows="10" cols="30" name="cntctfrm_contact_message" id="cntctfrm_contact_message1">'.$message.'</textarea>
208
- </div>';
209
- $content .= apply_filters( 'cntctfrm_display_captcha' , $error_message );
210
 
211
- $content .= '<div style="text-align: left; padding-top: 8px;">
212
  <input type="hidden" value="send" name="cntctfrm_contact_action">
213
  <input type="submit" value="Submit" style="cursor: pointer; margin: 0pt; text-align: center;margin-bottom:10px;">
214
  </div>
215
- </form>';
216
- return $content ;
217
  }
218
  }
219
  }
6
  /*
7
  Plugin Name: Contact Form Plugin
8
  Plugin URI: http://bestwebsoft.com/plugin/
9
+ Description: Plugin for Contact Form.
10
  Author: BestWebSoft
11
+ Version: 1.0
12
  Author URI: http://bestwebsoft.com/
13
  License: GPLv2 or later
14
  */
15
+ /* Copyright 2011 BestWebSoft ( admin@bestwebsoft.com )
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License, version 2, as
99
  <div class="error" <?php if( "" == $error ) echo "style=\"display:none\""; ?>><p><strong><?php echo $error; ?></strong></p></div>
100
  <form method="post" action="options-general.php?page=contact-form-plugin/contact_form.php">
101
  <span style="border-bottom:1px dashed;margin-bottom:15px;">
102
+ <p>If you would like to add a Contact Form to your website, just copy and put this shortcode onto your post: [contact_form]</p>
103
  If information in the below fields are empty then the message will be send to an address which was specified during registration.
104
  </span>
105
  <table class="form-table">
106
  <tr valign="top">
107
+ <th scope="row" style="width:150px;">Use an email of user: </th>
108
  <td>
109
  <input type="radio" name="cntctfrm_select_email" value="user" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'user') echo "checked=\"checked\" "; ?>/>
110
  </td>
114
  </td>
115
  </tr>
116
  <tr valign="top">
117
+ <th scope="row" style="width:150px;">Use an this email: </th>
118
  <td>
119
  <input type="radio" name="cntctfrm_select_email" value="custom" <?php if($cntctfrm_options['cntctfrm_select_email'] == 'custom') echo "checked=\"checked\" "; ?>/>
120
  </td>
139
  if( ! function_exists( 'cntctfrm_display_form' ) ) {
140
  function cntctfrm_display_form() {
141
  global $error_message;
 
142
 
143
  $result = "";
144
  // If contact form submited
153
  }
154
  // If it is good
155
  if( true === $result ) {
156
+ _e( "Thank you for contact.", "cmntfrm" );
157
  }
158
  else if( false === $result )
159
  {
162
  }
163
  else {
164
  // Output form
165
+ ?>
166
+ <form method="post" id="cntctfrm_contact_form" action="" enctype="multipart/form-data">
167
+ <?php if( isset( $error_message['error_form'] ) ) { ?>
168
+ <div style="text-align: left; color: red;"><?php echo $error_message['error_form']; ?></div>
169
+ <?php } ?>
170
+ <div style="text-align: left; padding-top: 5px;">
171
  <label for="cntctfrm_contact_name">Name:<span class="required"> *</span></label>
172
+ </div>
173
+ <?php if( isset( $error_message['error_name'] ) ) { ?>
174
+ <div style="text-align: left; color: red;"><?php echo $error_message['error_name']; ?></div>
175
+ <?php } ?>
176
+ <div style="text-align: left;">
177
+ <input class="text" type="text" size="40" value="<?php echo $name; ?>" name="cntctfrm_contact_name" id="cntctfrm_contact_name" style="text-align: left; margin: 0;">
178
  </div>
179
 
180
  <div style="text-align: left;">
181
  <label for="cntctfrm_contact_email">E-Mail Address:<span class="required"> *</span></label>
182
+ </div>
183
+ <?php if( isset( $error_message['error_email'] ) ) { ?>
184
+ <div style="text-align: left; color: red;"><?php echo $error_message['error_email']; ?></div>
185
+ <?php } ?>
186
+ <div style="text-align: left;">
187
+ <input class="text" type="text" size="40" value="<?php echo $email; ?>" name="cntctfrm_contact_emai" id="cntctfrm_contact_email" style="text-align: left; margin: 0;">
188
  </div>
189
 
190
  <div style="text-align: left;">
191
  <label for="cntctfrm_contact_subject1">Subject:<span class="required"> *</span></label>
192
+ </div>
193
+ <?php if( isset( $error_message['error_subject'] ) ) { ?>
194
+ <div style="text-align: left; color: red;"><?php echo $error_message['error_subject']; ?></div>
195
+ <?php } ?>
196
+ <div style="text-align: left;">
197
+ <input class="text" type="text" size="40" value="<?php echo $subject; ?>" name="cntctfrm_contact_subject" id="cntctfrm_contact_subject" style="text-align: left; margin: 0;">
198
  </div>
199
 
200
  <div style="text-align: left;">
201
  <label for="cntctfrm_contact_message">Message:<span class="required"> *</span></label>
202
+ </div>
203
+ <?php if( isset( $error_message['error_message'] ) ) { ?>
204
+ <div style="text-align: left; color: red;"><?php echo $error_message['error_message']; ?></div>
205
+ <?php } ?>
206
+ <div style="text-align: left;">
207
+ <textarea rows="10" cols="30" name="cntctfrm_contact_message" id="cntctfrm_contact_message1"><?php echo $message; ?></textarea>
208
+ </div>
209
+ <?php apply_filters( 'cntctfrm_display_captcha' , $error_message ); ?>
210
 
211
+ <div style="text-align: left; padding-top: 8px;">
212
  <input type="hidden" value="send" name="cntctfrm_contact_action">
213
  <input type="submit" value="Submit" style="cursor: pointer; margin: 0pt; text-align: center;margin-bottom:10px;">
214
  </div>
215
+ </form>
216
+ <?php
217
  }
218
  }
219
  }
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: http://bestwebsoft.com/
5
  Tags: Contact Form, text, contact, form
6
  Requires at least: 2.9
7
  Tested up to: 3.1.3
8
- Stable tag: 2011.05.27
9
 
10
  Add Contact Form to your WordPress website.
11
 
@@ -47,16 +47,10 @@ Contact Form allows you to add a feedback form easilly and simply to a post or a
47
 
48
  == Changelog ==
49
 
50
- = 1.01 =
51
- *Contact form position bug is fixed.
52
-
53
  = 1.00 =
54
  *Ability to add Contact Form into a post. Ability to display form via shortcode.
55
 
56
  == Upgrade Notice ==
57
 
58
- = 1.01 =
59
- Contact form position bug is fixed. Upgrade immediately.
60
-
61
  = 1.00 =
62
  Upgrade immediately.
5
  Tags: Contact Form, text, contact, form
6
  Requires at least: 2.9
7
  Tested up to: 3.1.3
8
+ Stable tag: 2011.05.26
9
 
10
  Add Contact Form to your WordPress website.
11
 
47
 
48
  == Changelog ==
49
 
 
 
 
50
  = 1.00 =
51
  *Ability to add Contact Form into a post. Ability to display form via shortcode.
52
 
53
  == Upgrade Notice ==
54
 
 
 
 
55
  = 1.00 =
56
  Upgrade immediately.
screenshot-2.jpg CHANGED
Binary file