Contact Bank: WordPress Form Builder for Contact Forms - Version 2.0.3

Version Description

  • Few Bugs Fixed
  • Added New Feature - Form Description
  • Removed Unwanted Files
  • Updated Uninstall Script
Download this release

Release Info

Developer contact-banker
Plugin Icon 128x128 Contact Bank: WordPress Form Builder for Contact Forms
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

contact-bank.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Bank Standard Edition
4
  Plugin URI: http://tech-banker.com
5
  Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It"s Really That Easy.
6
  Author: Tech Banker
7
- Version: 2.0.2
8
  Author URI: http://tech-banker.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
  Plugin URI: http://tech-banker.com
5
  Description: Build Complex, Powerful Contact Forms in Just Seconds. No Programming Knowledge Required! Yeah, It"s Really That Easy.
6
  Author: Tech Banker
7
+ Version: 2.0.3
8
  Author URI: http://tech-banker.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
frontend_views/contact_bank_forms.php CHANGED
@@ -273,16 +273,21 @@ $forms_email_settings = $wpdb->get_row
273
  <strong><?php echo $form_settings_array[$form_id]["success_message"]; ?></strong>
274
  </span>
275
  </div>
 
276
  <div class="widget-layout">
277
  <div class="widget-layout-title">
278
  <h4><?php echo $show_title == "true" ? $form_name : "" ?></h4>
279
  </div>
280
-
 
 
281
  <?php
282
  for($flag=0;$flag<count($form_fields);$flag++)
283
  {
284
  ?>
 
285
  <div class="widget-layout-body">
 
286
  <div class="layout-control-group">
287
  <label class="label_control layout-control-label">
288
  <?php
273
  <strong><?php echo $form_settings_array[$form_id]["success_message"]; ?></strong>
274
  </span>
275
  </div>
276
+
277
  <div class="widget-layout">
278
  <div class="widget-layout-title">
279
  <h4><?php echo $show_title == "true" ? $form_name : "" ?></h4>
280
  </div>
281
+ <div style="margin-left: 15px;" class="layout-control-group">
282
+ <span><?php echo $form_settings_array[$form_id]["form_description"]; ?></span>
283
+ </div>
284
  <?php
285
  for($flag=0;$flag<count($form_fields);$flag++)
286
  {
287
  ?>
288
+
289
  <div class="widget-layout-body">
290
+
291
  <div class="layout-control-group">
292
  <label class="label_control layout-control-label">
293
  <?php
lib/cb-class-tracking.php DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
-
3
- if ( !class_exists( 'TrackingForContactBank' ) ) {
4
- class TrackingForContactBank {
5
-
6
- /**
7
- * Class constructor
8
- */
9
- function __construct() {
10
- global $blog_id, $wpdb;
11
-
12
- $pts = array();
13
- foreach ( get_post_types( array( 'public' => true ) ) as $pt ) {
14
- $count = wp_count_posts( $pt );
15
- $pts[$pt] = $count->publish;
16
- }
17
-
18
- $comments_count = wp_count_comments();
19
-
20
- // wp_get_theme was introduced in 3.4, for compatibility with older versions, let's do a workaround for now.
21
- if ( function_exists( 'wp_get_theme' ) ) {
22
- $theme_data = wp_get_theme();
23
- $theme = array(
24
- 'name' => $theme_data->display( 'Name', false, false ),
25
- 'theme_uri' => $theme_data->display( 'ThemeURI', false, false ),
26
- 'version' => $theme_data->display( 'Version', false, false ),
27
- 'author' => $theme_data->display( 'Author', false, false ),
28
- 'author_uri' => $theme_data->display( 'AuthorURI', false, false ),
29
- );
30
-
31
- } else {
32
- $theme_data = (object) get_theme_data( get_stylesheet_directory() . '/style.css' );
33
- $theme = array(
34
- 'version' => $theme_data->Version,
35
- 'name' => $theme_data->Name,
36
- 'author' => $theme_data->Author,
37
- 'template' => $theme_data->Template,
38
- );
39
- }
40
- $plugins = array();
41
- foreach ( get_option( 'active_plugins' ) as $plugin_path ) {
42
- if ( !function_exists( 'get_plugin_data' ) )
43
- require_once( ABSPATH . 'wp-admin/includes/admin.php' );
44
-
45
- $plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin_path );
46
-
47
- $slug = str_replace( '/' . basename( $plugin_path ), '', $plugin_path );
48
- $plugins[$slug] = array(
49
- 'version' => $plugin_info['Version'],
50
- 'name' => $plugin_info['Name'],
51
- 'plugin_uri' => $plugin_info['PluginURI'],
52
- 'author' => $plugin_info['AuthorName'],
53
- 'author_uri' => $plugin_info['AuthorURI'],
54
- );
55
- }
56
-
57
- $data = array(
58
- 'site' => array(
59
- 'hash' => site_url(),
60
- 'version' => get_bloginfo( 'version' ),
61
- 'multisite' => is_multisite(),
62
- 'users' => $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->users INNER JOIN $wpdb->usermeta ON ({$wpdb->users}.ID = {$wpdb->usermeta}.user_id) WHERE 1 = 1 AND ( {$wpdb->usermeta}.meta_key = %s )", 'wp_' . $blog_id . '_capabilities' ) ),
63
- 'lang' => get_locale(),
64
- ),
65
- 'theme' => $theme,
66
- 'plugins' => $plugins,
67
- 'email' => get_option( 'admin_email' ),
68
- 'param'=>'class_tracking',
69
- 'action'=>'license_validator'
70
- );
71
- $url = get_option("contact-bank-updation-check-url");
72
- $response = wp_remote_post( $url, array(
73
- 'method' => 'POST',
74
- 'timeout' => 45,
75
- 'redirection' => 5,
76
- 'httpversion' => '1.0',
77
- 'blocking' => true,
78
- 'headers' => array(),
79
- 'body' => $data
80
- )
81
- );
82
- }
83
- }
84
-
85
- $TrackingForContactBank = new TrackingForContactBank;
86
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lib/install-script.php CHANGED
@@ -5,7 +5,6 @@ update_option("contact-bank-updation-check-url","http://tech-banker.com/wp-admin
5
  $version = get_option("contact-bank-version-number");
6
  if($version != "2.0")
7
  {
8
- include_once CONTACT_BK_PLUGIN_DIR ."/lib/cb-class-tracking.php";
9
  if (count($wpdb->get_var('SHOW TABLES LIKE "' . contact_bank_form_settings_Table() . '"')) == 0)
10
  {
11
  create_contact_bank_form_settings();
@@ -90,6 +89,16 @@ if($version != "2.0")
90
  "incorrect_email_message",
91
  "Please enter a valid email address"
92
  )
 
 
 
 
 
 
 
 
 
 
93
  );
94
  }
95
  }
@@ -575,7 +584,7 @@ function create_contact_bank_form_settings()
575
  id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
576
  form_id INTEGER(10) NOT NULL,
577
  form_message_key VARCHAR(200) NOT NULL,
578
- form_message_value VARCHAR(200) NOT NULL,
579
  PRIMARY KEY (id)
580
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci';
581
  dbDelta($sql);
5
  $version = get_option("contact-bank-version-number");
6
  if($version != "2.0")
7
  {
 
8
  if (count($wpdb->get_var('SHOW TABLES LIKE "' . contact_bank_form_settings_Table() . '"')) == 0)
9
  {
10
  create_contact_bank_form_settings();
89
  "incorrect_email_message",
90
  "Please enter a valid email address"
91
  )
92
+ );
93
+ $wpdb->query
94
+ (
95
+ $wpdb->prepare
96
+ (
97
+ "INSERT INTO ". contact_bank_form_settings_Table() ."(form_id,form_message_key,form_message_value)VALUES(%d, %s, %s)",
98
+ $contact_forms[$flag]->form_id,
99
+ "form_description",
100
+ ""
101
+ )
102
  );
103
  }
104
  }
584
  id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
585
  form_id INTEGER(10) NOT NULL,
586
  form_message_key VARCHAR(200) NOT NULL,
587
+ form_message_value TEXT NOT NULL,
588
  PRIMARY KEY (id)
589
  ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci';
590
  dbDelta($sql);
lib/uninstall-script.php CHANGED
@@ -23,6 +23,12 @@
23
 
24
  $sql = "DROP TABLE " .contact_bank_layout_settings_Table();
25
  $wpdb->query($sql);
 
 
 
 
 
 
26
 
27
  delete_option("contact-bank-version-number");
28
  ?>
23
 
24
  $sql = "DROP TABLE " .contact_bank_layout_settings_Table();
25
  $wpdb->query($sql);
26
+
27
+ $sql = "DROP TABLE " .contact_bank_licensing();
28
+ $wpdb->query($sql);
29
+
30
+ $sql = "DROP TABLE " .contact_bank_roles_capability();
31
+ $wpdb->query($sql);
32
 
33
  delete_option("contact-bank-version-number");
34
  ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: contact-banker, Gallery-Bank
3
  Tags: admin, advanced form, AJAX, best contact form plugin, buddypress, category, comment, comments, contact, contact bank, contact form, contact form 7, contact form builder, contact form plugin, contact forms, contact me, contact us, contacts, content, easy contact form, easy contact plugin, email, Facebook, feed, feedback, feedback form, form, form builder, forms, gallery, google, image, images, javascript, jquery, link, links, login, media, page, pages, plugin, Post, posts, request, rss, seo, shortcode, sidebar, stats, text, web form, widget, wordpress
4
  Requires at least: 2.9
5
  Tested up to: 3.8.1
6
- Stable tag: 2.0.2
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -130,6 +130,13 @@ Visit [here](http://tech-banker.com/contact-bank) to upgrade to Pro Version now.
130
 
131
  == Changelog ==
132
 
 
 
 
 
 
 
 
133
  = 2.0.2 =
134
 
135
  * Few Bugs Fixed
3
  Tags: admin, advanced form, AJAX, best contact form plugin, buddypress, category, comment, comments, contact, contact bank, contact form, contact form 7, contact form builder, contact form plugin, contact forms, contact me, contact us, contacts, content, easy contact form, easy contact plugin, email, Facebook, feed, feedback, feedback form, form, form builder, forms, gallery, google, image, images, javascript, jquery, link, links, login, media, page, pages, plugin, Post, posts, request, rss, seo, shortcode, sidebar, stats, text, web form, widget, wordpress
4
  Requires at least: 2.9
5
  Tested up to: 3.8.1
6
+ Stable tag: 2.0.3
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
130
 
131
  == Changelog ==
132
 
133
+ = 2.0.3 =
134
+
135
+ * Few Bugs Fixed
136
+ * Added New Feature - Form Description
137
+ * Removed Unwanted Files
138
+ * Updated Uninstall Script
139
+
140
  = 2.0.2 =
141
 
142
  * Few Bugs Fixed
views/contact_bank_form_preview.php CHANGED
@@ -287,7 +287,9 @@ $forms_email_settings = $wpdb->get_row
287
  <div class="widget-layout-title">
288
  <h4><?php echo $form_name ;?></h4>
289
  </div>
290
-
 
 
291
  <?php
292
  for($flag=0;$flag<count($form_fields);$flag++)
293
  {
287
  <div class="widget-layout-title">
288
  <h4><?php echo $form_name ;?></h4>
289
  </div>
290
+ <div style="margin-left: 15px;" class="layout-control-group">
291
+ <span><?php echo $form_settings_array[$form_id]["form_description"]; ?></span>
292
+ </div>
293
  <?php
294
  for($flag=0;$flag<count($form_fields);$flag++)
295
  {
views/contact_view.php CHANGED
@@ -72,6 +72,16 @@
72
  "Please enter a valid e-mail address"
73
  )
74
  );
 
 
 
 
 
 
 
 
 
 
75
  $settings = array();
76
  $settings["label_setting_font_family"] = "inherit";
77
  $settings["label_setting_font_color"] = "#000000";
@@ -228,6 +238,12 @@
228
  placeholder="<?php _e("Enter Form Name", contact_bank); ?>"/>
229
  </div>
230
  </div>
 
 
 
 
 
 
231
  <div class="layout-control-group div_border">
232
  <label class="layout-control-label"><?php _e("Blank Field Message:", contact_bank); ?>
233
  <span class="error">*</span>
@@ -506,6 +522,7 @@ jQuery("#ux_dynamic_form_submit").validate
506
  array_new_form_settings.push({"blank_field_message" : jQuery("#ux_txt_blank_message").val()});
507
  array_new_form_settings.push({"incorrect_email_message" : jQuery("#ux_txt_incorrect_email_message").val()});
508
  array_new_form_settings.push({"success_message" : jQuery("#ux_txt_success_message").val()});
 
509
  jQuery("#ux_rdl_page").prop("checked")== true ? array_new_form_settings.push({"redirect" : "0"}) :array_new_form_settings.push({"redirect" : "1"});
510
 
511
  if(jQuery("#ux_rdl_page").prop("checked")== true)
@@ -517,7 +534,6 @@ jQuery("#ux_dynamic_form_submit").validate
517
  array_new_form_settings.push({"redirect_url" : encodeURIComponent(jQuery("#ux_txt_redirect_url").val())});
518
  }
519
  array_new_form_settings.push({"form_name" : form_name});
520
-
521
  jQuery.ajax
522
  ({
523
  type: "POST",
72
  "Please enter a valid e-mail address"
73
  )
74
  );
75
+ $wpdb->query
76
+ (
77
+ $wpdb->prepare
78
+ (
79
+ "INSERT INTO ". contact_bank_form_settings_Table() ."(form_id,form_message_key,form_message_value)VALUES(%d, %s, %s)",
80
+ $form_id,
81
+ "form_description",
82
+ ""
83
+ )
84
+ );
85
  $settings = array();
86
  $settings["label_setting_font_family"] = "inherit";
87
  $settings["label_setting_font_color"] = "#000000";
238
  placeholder="<?php _e("Enter Form Name", contact_bank); ?>"/>
239
  </div>
240
  </div>
241
+ <div class="layout-control-group div_border">
242
+ <label class="layout-control-label"><?php _e("Form Description :", contact_bank); ?></label>
243
+ <div class="layout-controls">
244
+ <textarea type="textarea" rows="5" name="ux_txt_form_description" class="layout-span7" id="ux_txt_form_description" placeholder="<?php _e("Enter Form Description", contact_bank); ?>"><?php echo isset($form_settings[$form_id]["form_description"]) ? $form_settings[$form_id]["form_description"] : "" ;?></textarea>
245
+ </div>
246
+ </div>
247
  <div class="layout-control-group div_border">
248
  <label class="layout-control-label"><?php _e("Blank Field Message:", contact_bank); ?>
249
  <span class="error">*</span>
522
  array_new_form_settings.push({"blank_field_message" : jQuery("#ux_txt_blank_message").val()});
523
  array_new_form_settings.push({"incorrect_email_message" : jQuery("#ux_txt_incorrect_email_message").val()});
524
  array_new_form_settings.push({"success_message" : jQuery("#ux_txt_success_message").val()});
525
+ array_new_form_settings.push({"form_description" : jQuery("#ux_txt_form_description").val()});
526
  jQuery("#ux_rdl_page").prop("checked")== true ? array_new_form_settings.push({"redirect" : "0"}) :array_new_form_settings.push({"redirect" : "1"});
527
 
528
  if(jQuery("#ux_rdl_page").prop("checked")== true)
534
  array_new_form_settings.push({"redirect_url" : encodeURIComponent(jQuery("#ux_txt_redirect_url").val())});
535
  }
536
  array_new_form_settings.push({"form_name" : form_name});
 
537
  jQuery.ajax
538
  ({
539
  type: "POST",