Contact Form by BestWebSoft - Version 2011.2.05

Version Description

Download this release

Release Info

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

Code changes from version 2011.2.04 to 2011.2.05

Files changed (2) hide show
  1. contact_form.php +40 -15
  2. readme.txt +7 -1
contact_form.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Contact Form Plugin
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Plugin for portfolio.
6
  Author: BestWebSoft
7
- Version: 2.04
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
@@ -30,11 +30,11 @@ if( ! function_exists( 'bws_plugin_header' ) ) {
30
  global $post_type;
31
  ?>
32
  <style>
33
- #adminmenu #toplevel_page_my_new_menu div.wp-menu-image
34
  {
35
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_16.png") no-repeat scroll center center transparent;
36
  }
37
- #adminmenu #toplevel_page_my_new_menu:hover div.wp-menu-image,#adminmenu #toplevel_page_my_new_menu.wp-has-current-submenu div.wp-menu-image
38
  {
39
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_16_c.png") no-repeat scroll center center transparent;
40
  }
@@ -42,7 +42,7 @@ if( ! function_exists( 'bws_plugin_header' ) ) {
42
  {
43
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_36.png") no-repeat scroll left top transparent;
44
  }
45
- #toplevel_page_my_new_menu .wp-submenu .wp-first-item
46
  {
47
  display:none;
48
  }
@@ -57,19 +57,29 @@ if( ! function_exists( 'bws_add_menu_render' ) ) {
57
  function bws_add_menu_render() {
58
  global $title;
59
  $active_plugins = get_option('active_plugins');
 
 
 
60
  $array_install = array();
61
  $array_recomend = array();
62
- $count_install = $count_recomend = 0;
63
  $array_plugins = array(
64
- array( 'captcha\/captcha.php', 'Captcha', 'http://wordpress.org/extend/plugins/captcha/', 'http://bestwebsoft.com/plugin/captcha-plugin/' ),
65
- array( 'contact-form-plugin\/contact_form.php', 'Contact Form', 'http://wordpress.org/extend/plugins/contact-form-plugin/', 'http://bestwebsoft.com/plugin/contact-form/' ),
66
- array( 'facebook-button-plugin\/facebook-button-plugin.php', 'Facebook Like Button Plugin', 'http://wordpress.org/extend/plugins/facebook-button-plugin/', 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/' ),
67
- array( 'twitter-plugin\/twitter.php', 'Twitter Plugin', 'http://wordpress.org/extend/plugins/twitter-plugin/', 'http://bestwebsoft.com/plugin/twitter-plugin/' ),
68
- array( 'portfolio\/portfolio.php', 'Portfolio', 'http://wordpress.org/extend/plugins/portfolio/', 'http://bestwebsoft.com/plugin/portfolio-plugin/' )
69
  );
70
  foreach($array_plugins as $plugins)
71
  {
72
  if( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) )
 
 
 
 
 
 
 
73
  {
74
  $array_install[$count_install]['title'] = $plugins[1];
75
  $array_install[$count_install]['link'] = $plugins[2];
@@ -81,13 +91,22 @@ if( ! function_exists( 'bws_add_menu_render' ) ) {
81
  $array_recomend[$count_recomend]['title'] = $plugins[1];
82
  $array_recomend[$count_recomend]['link'] = $plugins[2];
83
  $array_recomend[$count_recomend]['href'] = $plugins[3];
 
84
  $count_recomend++;
85
  }
86
- }
87
  ?>
88
  <div class="wrap">
89
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
90
  <h2><?php echo $title;?></h2>
 
 
 
 
 
 
 
 
91
  <?php if($count_install > 0) { ?>
92
  <div>
93
  <h3>Installed plugins</h3>
@@ -100,7 +119,7 @@ if( ! function_exists( 'bws_add_menu_render' ) ) {
100
  <div>
101
  <h3>Recommended plugins</h3>
102
  <?php foreach($array_recomend as $recomend_plugin) { ?>
103
- <div style="float:left; width:200px;"><?php echo $recomend_plugin['title']; ?></div> <p><a href="<?php echo $recomend_plugin['link']; ?>">Read more</a> <a href="<?php echo $recomend_plugin['href']; ?>">Download</a></p>
104
  <?php } ?>
105
  <span style="color: rgb(136, 136, 136); font-size: 10px;">If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
106
  </div>
@@ -113,8 +132,8 @@ if( ! function_exists( 'bws_add_menu_render' ) ) {
113
  // Add option page in admin menu
114
  if( ! function_exists( 'cntctfrm_admin_menu' ) ) {
115
  function cntctfrm_admin_menu() {
116
- add_menu_page(__('BWS Plugins'), __('BWS Plugins'), 'edit_themes', 'my_new_menu', 'bws_add_menu_render', WP_CONTENT_URL."/plugins/contact-form-plugin/images/px.png", 100);
117
- add_submenu_page('my_new_menu', 'Contact Form Options', 'Contact Form', 'edit_themes', "contact_form.php", 'cntctfrm_settings_page');
118
 
119
  //call register settings function
120
  add_action( 'admin_init', 'cntctfrm_settings' );
@@ -238,7 +257,7 @@ if( ! function_exists( 'cntctfrm_display_form' ) ) {
238
  }
239
  // If it is good
240
  if( true === $result ) {
241
- $content .= __( "Thank you for contact.", "cmntfrm" );
242
  }
243
  else if( false === $result )
244
  {
@@ -374,6 +393,12 @@ if( ! function_exists( 'cntctfrm_send_mail' ) ) {
374
  <tr>
375
  <td>Message</td><td>'.$_REQUEST['cntctfrm_contact_message'].'</td>
376
  </tr>
 
 
 
 
 
 
377
  </table>
378
  </body>
379
  </html>
4
  Plugin URI: http://bestwebsoft.com/plugin/
5
  Description: Plugin for portfolio.
6
  Author: BestWebSoft
7
+ Version: 2.05
8
  Author URI: http://bestwebsoft.com/
9
  License: GPLv2 or later
10
  */
30
  global $post_type;
31
  ?>
32
  <style>
33
+ #adminmenu #toplevel_page_bws_plugins div.wp-menu-image
34
  {
35
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_16.png") no-repeat scroll center center transparent;
36
  }
37
+ #adminmenu #toplevel_page_bws_plugins:hover div.wp-menu-image,#adminmenu #toplevel_page_bws_plugins.wp-has-current-submenu div.wp-menu-image
38
  {
39
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_16_c.png") no-repeat scroll center center transparent;
40
  }
42
  {
43
  background: url("<?php echo get_bloginfo('url');?>/wp-content/plugins/contact-form-plugin/images/icon_36.png") no-repeat scroll left top transparent;
44
  }
45
+ #toplevel_page_bws_plugins .wp-submenu .wp-first-item
46
  {
47
  display:none;
48
  }
57
  function bws_add_menu_render() {
58
  global $title;
59
  $active_plugins = get_option('active_plugins');
60
+ $all_plugins = get_plugins();
61
+
62
+ $array_activate = array();
63
  $array_install = array();
64
  $array_recomend = array();
65
+ $count_activate = $count_install = $count_recomend = 0;
66
  $array_plugins = array(
67
+ array( 'captcha\/captcha.php', 'Captcha', 'http://wordpress.org/extend/plugins/captcha/', 'http://bestwebsoft.com/plugin/captcha-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=captcha&_wpnonce=e66502ec9a' ),
68
+ array( 'contact-form-plugin\/contact_form.php', 'Contact Form', 'http://wordpress.org/extend/plugins/contact-form-plugin/', 'http://bestwebsoft.com/plugin/contact-form/', '/wp-admin/update.php?action=install-plugin&plugin=contact-form-plugin&_wpnonce=47757d936f' ),
69
+ array( 'facebook-button-plugin\/facebook-button-plugin.php', 'Facebook Like Button Plugin', 'http://wordpress.org/extend/plugins/facebook-button-plugin/', 'http://bestwebsoft.com/plugin/facebook-like-button-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=facebook-button-plugin&_wpnonce=6eb654de19' ),
70
+ array( 'twitter-plugin\/twitter.php', 'Twitter Plugin', 'http://wordpress.org/extend/plugins/twitter-plugin/', 'http://bestwebsoft.com/plugin/twitter-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=twitter-plugin&_wpnonce=1612c998a5' ),
71
+ array( 'portfolio\/portfolio.php', 'Portfolio', 'http://wordpress.org/extend/plugins/portfolio/', 'http://bestwebsoft.com/plugin/portfolio-plugin/', '/wp-admin/update.php?action=install-plugin&plugin=portfolio&_wpnonce=488af7391d' )
72
  );
73
  foreach($array_plugins as $plugins)
74
  {
75
  if( 0 < count( preg_grep( "/".$plugins[0]."/", $active_plugins ) ) )
76
+ {
77
+ $array_activate[$count_activate]['title'] = $plugins[1];
78
+ $array_activate[$count_activate]['link'] = $plugins[2];
79
+ $array_activate[$count_activate]['href'] = $plugins[3];
80
+ $count_activate++;
81
+ }
82
+ else if( array_key_exists(str_replace("\\", "", $plugins[0]), $all_plugins) )
83
  {
84
  $array_install[$count_install]['title'] = $plugins[1];
85
  $array_install[$count_install]['link'] = $plugins[2];
91
  $array_recomend[$count_recomend]['title'] = $plugins[1];
92
  $array_recomend[$count_recomend]['link'] = $plugins[2];
93
  $array_recomend[$count_recomend]['href'] = $plugins[3];
94
+ $array_recomend[$count_recomend]['slug'] = $plugins[4];
95
  $count_recomend++;
96
  }
97
+ }
98
  ?>
99
  <div class="wrap">
100
  <div class="icon32 icon32-bws" id="icon-options-general"></div>
101
  <h2><?php echo $title;?></h2>
102
+ <?php if($count_activate > 0) { ?>
103
+ <div>
104
+ <h3>Activated plugins</h3>
105
+ <?php foreach($array_activate as $activate_plugin) { ?>
106
+ <div style="float:left; width:200px;"><?php echo $activate_plugin['title']; ?></div> <p><a href="<?php echo $activate_plugin['link']; ?>">Read more</a></p>
107
+ <?php } ?>
108
+ </div>
109
+ <?php } ?>
110
  <?php if($count_install > 0) { ?>
111
  <div>
112
  <h3>Installed plugins</h3>
119
  <div>
120
  <h3>Recommended plugins</h3>
121
  <?php foreach($array_recomend as $recomend_plugin) { ?>
122
+ <div style="float:left; width:200px;"><?php echo $recomend_plugin['title']; ?></div> <p><a href="<?php echo $recomend_plugin['link']; ?>">Read more</a> <a href="<?php echo $recomend_plugin['href']; ?>">Download</a> <a class="install-now" href="<?php echo get_bloginfo("url") . $recomend_plugin['slug']; ?>" title="<?php esc_attr( sprintf( __( 'Install %s' ), $recomend_plugin['title'] ) ) ?>"><?php echo __( 'Install Now' ) ?></a></p>
123
  <?php } ?>
124
  <span style="color: rgb(136, 136, 136); font-size: 10px;">If you have any questions, please contact us via plugin@bestwebsoft.com or fill in our contact form on our site <a href="http://bestwebsoft.com/contact/">http://bestwebsoft.com/contact/</a></span>
125
  </div>
132
  // Add option page in admin menu
133
  if( ! function_exists( 'cntctfrm_admin_menu' ) ) {
134
  function cntctfrm_admin_menu() {
135
+ add_menu_page(__('BWS Plugins'), __('BWS Plugins'), 'edit_themes', 'bws_plugins', 'bws_add_menu_render', WP_CONTENT_URL."/plugins/contact-form-plugin/images/px.png", 101);
136
+ add_submenu_page('bws_plugins', 'Contact Form Options', 'Contact Form', 'edit_themes', "contact_form.php", 'cntctfrm_settings_page');
137
 
138
  //call register settings function
139
  add_action( 'admin_init', 'cntctfrm_settings' );
257
  }
258
  // If it is good
259
  if( true === $result ) {
260
+ $content .= __( "Thank you for contacting us.", "cmntfrm" );
261
  }
262
  else if( false === $result )
263
  {
393
  <tr>
394
  <td>Message</td><td>'.$_REQUEST['cntctfrm_contact_message'].'</td>
395
  </tr>
396
+ <tr>
397
+ <td></td><td></td>
398
+ </tr>
399
+ <tr>
400
+ <td>Site</td><td>'.get_bloginfo("url").'</td>
401
+ </tr>
402
  </table>
403
  </body>
404
  </html>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://bestwebsoft.com/
4
  Tags: Contact Form, text, contact, form, contacts, contakt form, request, contact me, feedback form, feedback, contact button, contact form plugin, contacts form plugin
5
  Requires at least: 2.9
6
  Tested up to: 3.2
7
- Stable tag: 2011.2.04
8
 
9
  Add Contact Form to your WordPress website.
10
 
@@ -46,6 +46,9 @@ Contact Form allows you to add a feedback form easilly and simply to a post or a
46
 
47
  == Changelog ==
48
 
 
 
 
49
  = 2.04 =
50
  *BWS Plugins sections was fixed and right now it is consisted with 2 parts: installed and recommended plugins. Icons displaying is fixed.
51
 
@@ -72,6 +75,9 @@ Contact Form allows you to add a feedback form easilly and simply to a post or a
72
 
73
  == Upgrade Notice ==
74
 
 
 
 
75
  = 2.04 =
76
  BWS Plugins sections was fixed and right now it is consisted with 2 parts: installed and recommended plugins. Icons displaying is fixed.
77
 
4
  Tags: Contact Form, text, contact, form, contacts, contakt form, request, contact me, feedback form, feedback, contact button, contact form plugin, contacts form plugin
5
  Requires at least: 2.9
6
  Tested up to: 3.2
7
+ Stable tag: 2011.2.05
8
 
9
  Add Contact Form to your WordPress website.
10
 
46
 
47
  == Changelog ==
48
 
49
+ = 2.05 =
50
+ *BWS Plugins sections was fixed and right now it is consisted with 3 parts: activated, installed and recommended plugins. The bug of position in the admin menu is fixed. Translation ommissions are corrected. Now there is a link to see the site where the email comes from.
51
+
52
  = 2.04 =
53
  *BWS Plugins sections was fixed and right now it is consisted with 2 parts: installed and recommended plugins. Icons displaying is fixed.
54
 
75
 
76
  == Upgrade Notice ==
77
 
78
+ = 2.05 =
79
+ BWS Plugins sections was fixed and right now it is consisted with 3 parts: activated, installed and recommended plugins. The bug of position in the admin menu is fixed. Translation ommissions are corrected. Now there is a link to see the site where the email comes from.
80
+
81
  = 2.04 =
82
  BWS Plugins sections was fixed and right now it is consisted with 2 parts: installed and recommended plugins. Icons displaying is fixed.
83