Wp-Insert - Version 1.6.2

Version Description

Download this release

Release Info

Developer namith.jawahar
Plugin Icon 128x128 Wp-Insert
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

includes/ads.php CHANGED
@@ -7,6 +7,7 @@ function smart_add_menu() {
7
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads<br/>(Posts and Sidebars)', 8, __FILE__, 'wp_insert_add_adspage');
8
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads<br/>(Template Tags)', 8, 'Manage Ads Advanced', 'wp_insert_add_advanced_spage');
9
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Privacy Policy', 8, 'Manage Privacy Policy', 'wp_insert_privacy_policy_page');
 
10
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Pages', 8, 'Manage Pages', 'wp_insert_pages_page');
11
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Feeds', 8, 'Manage Feeds', 'smart_add_feedspage');
12
  add_submenu_page(__FILE__, 'wp-insert', 'Tracking Codes', 8, 'Tracking Codes', 'smart_add_analytics');
7
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads<br/>(Posts and Sidebars)', 8, __FILE__, 'wp_insert_add_adspage');
8
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads<br/>(Template Tags)', 8, 'Manage Ads Advanced', 'wp_insert_add_advanced_spage');
9
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Privacy Policy', 8, 'Manage Privacy Policy', 'wp_insert_privacy_policy_page');
10
+ add_submenu_page(__FILE__, 'wp-insert', 'Manage Terms', 8, 'Terms And Conditions', 'wp_insert_terms_conditions_page');
11
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Pages', 8, 'Manage Pages', 'wp_insert_pages_page');
12
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Feeds', 8, 'Manage Feeds', 'smart_add_feedspage');
13
  add_submenu_page(__FILE__, 'wp-insert', 'Tracking Codes', 8, 'Tracking Codes', 'smart_add_analytics');
includes/essentials.php CHANGED
@@ -133,5 +133,6 @@ require_once (dirname(__FILE__) . '/ads.php');
133
  require_once (dirname(__FILE__) . '/adsadvanced.php');
134
  require_once (dirname(__FILE__) . '/pages.php');
135
  require_once (dirname(__FILE__) . '/privacypolicy.php');
 
136
  require_once (dirname(__FILE__) . '/feeds.php');
137
  ?>
133
  require_once (dirname(__FILE__) . '/adsadvanced.php');
134
  require_once (dirname(__FILE__) . '/pages.php');
135
  require_once (dirname(__FILE__) . '/privacypolicy.php');
136
+ require_once (dirname(__FILE__) . '/tandc.php');
137
  require_once (dirname(__FILE__) . '/feeds.php');
138
  ?>
includes/pages.php CHANGED
@@ -13,11 +13,12 @@ function wp_insert_manage_page_order_HTML() { ?>
13
  <ul id="wp_insert_page_list">
14
  <?php
15
  $pages = get_pages('sort_column=menu_order');
16
- foreach($pages as $page) {
17
- if($page->post_parent == 0) { ?>
18
  <li id="wp_insert_listItem_<?php echo $page->ID; ?>">
19
  <img src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/images/move-16x16.png" width="16px" height="16px" alt="move" class="handle" />
20
- <strong><?php echo $page->post_title; ?></strong></a>
 
 
21
  <?php
22
  /*$temp = '';
23
  foreach($pages as $subPage) {
@@ -31,8 +32,7 @@ foreach($pages as $page) {
31
  if($temp != '') { echo '<ul style="margin-left: 25px;">'.$temp.'</ul>'; }*/
32
  ?>
33
  </li>
34
- <?php }
35
- }
36
  ?>
37
  </ul>
38
  <script type="text/javascript">
13
  <ul id="wp_insert_page_list">
14
  <?php
15
  $pages = get_pages('sort_column=menu_order');
16
+ foreach($pages as $page) { ?>
 
17
  <li id="wp_insert_listItem_<?php echo $page->ID; ?>">
18
  <img src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/images/move-16x16.png" width="16px" height="16px" alt="move" class="handle" />
19
+ <strong>
20
+ <?php if($page->post_parent != 0) { echo get_the_title($page->post_parent)."&nbsp;&raquo;&nbsp;".$page->post_title; } else { echo $page->post_title; } ?>
21
+ </strong></a>
22
  <?php
23
  /*$temp = '';
24
  foreach($pages as $subPage) {
32
  if($temp != '') { echo '<ul style="margin-left: 25px;">'.$temp.'</ul>'; }*/
33
  ?>
34
  </li>
35
+ <?php }
 
36
  ?>
37
  </ul>
38
  <script type="text/javascript">
includes/privacypolicy.php CHANGED
@@ -90,7 +90,7 @@ function wp_insert_edit_privacy_policy_HTML() { ?>
90
  <textarea id="wp_insert_privacy_policy_content" name="wp_insert_privacy_policy_content" style="width:100%; height: 400px;">
91
  <?php echo get_option('wp_insert_privacy_policy_content'); ?>
92
  </textarea>
93
- <p><a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy&reset=1"; ?>" class="button-secondary alignright">Reset</a></p><p><small>This is an automatically generated Privacy Policy.</small></p>
94
  <script type="text/javascript">
95
  if(document.getElementById('wp_insert_privacy_policy_content')) {
96
  var wp_insert_fckeditor = new FCKeditor('wp_insert_privacy_policy_content') ;
90
  <textarea id="wp_insert_privacy_policy_content" name="wp_insert_privacy_policy_content" style="width:100%; height: 400px;">
91
  <?php echo get_option('wp_insert_privacy_policy_content'); ?>
92
  </textarea>
93
+ <p><a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Manage Privacy Policy&reset=1"; ?>" class="button-secondary alignright">Reset</a></p><p><small>This is an automatically generated "Privacy Policy".</small></p>
94
  <script type="text/javascript">
95
  if(document.getElementById('wp_insert_privacy_policy_content')) {
96
  var wp_insert_fckeditor = new FCKeditor('wp_insert_privacy_policy_content') ;
includes/tandc.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $Domain = str_replace('', "www.", $_SERVER['HTTP_HOST']);
3
+ $TermsandConditionsText = '<p>Welcome to '.$Domain.'. If you continue to browse and use this website you are agreeing to comply with and be bound by the following terms and conditions of use, which together with our privacy policy govern '.$Domain.'\'s relationship with you in relation to this website.</p>
4
+ <p>The term '.$Domain.' or \'us\' or \'we\' refers to the owner of the website. The term \'you\' refers to the user or viewer of our website.
5
+ The use of this website is subject to the following terms of use:
6
+ <ul>
7
+ <li>The content of the pages of this website is for your general information and use only. It is subject to change without notice.</li>
8
+ <li>Neither we nor any third parties provide any warranty or guarantee as to the accuracy, timeliness, performance, completeness or suitability of the information and materials found or offered on this website for any particular purpose. You acknowledge that such information and materials may contain inaccuracies or errors and we expressly exclude liability for any such inaccuracies or errors to the fullest extent permitted by law.</li>
9
+ <li>Your use of any information or materials on this website is entirely at your own risk, for which we shall not be liable. It shall be your own responsibility to ensure that any products, services or information available through this website meet your specific requirements.</li>
10
+ <li>This website contains material which is owned by or licensed to us. This material includes, but is not limited to, the design, layout, look, appearance and graphics. Reproduction is prohibited other than in accordance with the copyright notice, which forms part of these terms and conditions.</li>
11
+ <li>All trademarks reproduced in this website, which are not the property of, or licensed to the operator, are acknowledged on the website.</li>
12
+ <li>Unauthorised use of this website may give rise to a claim for damages and/or be a criminal offence.</li>
13
+ <li>From time to time this website may also include links to other websites. These links are provided for your convenience to provide further information. They do not signify that we endorse the website(s). We have no responsibility for the content of the linked website(s).</li>
14
+ <li>You may not create a link to this website from another website or document without '.$Domain.'\'s prior written consent.</li></ul></p>';
15
+ if(get_option('wp_insert_terms_conditions_content') == "") { add_option("wp_insert_terms_conditions_content", $TermsandConditionsText, '', 'yes'); }
16
+
17
+ add_shortcode('Terms', 'wp_insert_terms_conditions_shortcode');
18
+
19
+ function wp_insert_terms_conditions_shortcode() {
20
+ return get_option('wp_insert_terms_conditions_content');
21
+ }
22
+
23
+ function wp_insert_terms_conditions_page() {
24
+ if(isset($_GET["assign"])) {
25
+ $my_post = array();
26
+ $my_post['ID'] = $_GET["assign"];
27
+ $my_post['post_content'] = '[Terms]';
28
+ wp_update_post($my_post);
29
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions");
30
+ }
31
+ else if(isset($_GET["create"])) {
32
+ $my_post = array();
33
+ $my_post['post_title'] = 'Terms and Conditions';
34
+ $my_post['post_content'] = '[Terms]';
35
+ $my_post['post_status'] = 'publish';
36
+ $my_post['post_author'] = 1;
37
+ $my_post['post_type'] = 'page';
38
+ wp_insert_post($my_post);
39
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions");
40
+ }
41
+ else if(isset($_GET["reset"])) {
42
+ $Domain = str_replace('', "www.", $_SERVER['HTTP_HOST']);
43
+ $TermsandConditionsText = '<p>Welcome to '.$Domain.'. If you continue to browse and use this website you are agreeing to comply with and be bound by the following terms and conditions of use, which together with our privacy policy govern '.$Domain.'\'s relationship with you in relation to this website.</p>
44
+ <p>The term '.$Domain.' or \'us\' or \'we\' refers to the owner of the website. The term \'you\' refers to the user or viewer of our website.
45
+ The use of this website is subject to the following terms of use:
46
+ <ul>
47
+ <li>The content of the pages of this website is for your general information and use only. It is subject to change without notice.</li>
48
+ <li>Neither we nor any third parties provide any warranty or guarantee as to the accuracy, timeliness, performance, completeness or suitability of the information and materials found or offered on this website for any particular purpose. You acknowledge that such information and materials may contain inaccuracies or errors and we expressly exclude liability for any such inaccuracies or errors to the fullest extent permitted by law.</li>
49
+ <li>Your use of any information or materials on this website is entirely at your own risk, for which we shall not be liable. It shall be your own responsibility to ensure that any products, services or information available through this website meet your specific requirements.</li>
50
+ <li>This website contains material which is owned by or licensed to us. This material includes, but is not limited to, the design, layout, look, appearance and graphics. Reproduction is prohibited other than in accordance with the copyright notice, which forms part of these terms and conditions.</li>
51
+ <li>All trademarks reproduced in this website, which are not the property of, or licensed to the operator, are acknowledged on the website.</li>
52
+ <li>Unauthorised use of this website may give rise to a claim for damages and/or be a criminal offence.</li>
53
+ <li>From time to time this website may also include links to other websites. These links are provided for your convenience to provide further information. They do not signify that we endorse the website(s). We have no responsibility for the content of the linked website(s).</li>
54
+ <li>You may not create a link to this website from another website or document without '.$Domain.'\'s prior written consent.</li></ul></p>';
55
+
56
+ update_option("wp_insert_terms_conditions_content", $TermsandConditionsText);
57
+ header("Location: ".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions");
58
+ }
59
+ global $screen_layout_columns;
60
+
61
+ add_meta_box('wp_insert_edit_terms_conditions', 'Finetune your Terms and Conditions', 'wp_insert_edit_terms_conditions_HTML', 'col_1');
62
+ add_meta_box('wp_insert_edit_assign_terms_conditions_page', 'Assign Page for Terms And Conditions', 'wp_insert_edit_assign_terms_conditions_page_HTML', 'col_1');
63
+
64
+ $parameters = 'wp_insert_terms_conditions_content';
65
+ wp_insert_settings_page_layout($parameters, 'WP-INSERT : Terms And Conditions', 'terms');
66
+ }
67
+
68
+ function wp_insert_edit_assign_terms_conditions_page_HTML() { ?>
69
+ <div>
70
+ <p>Assign
71
+ <select id="wp_insert_select_assign_pages" onchange="UpdateAssignlink()">
72
+ <option value="#" selected="selected">-- Select a Page --</option>
73
+ <?php
74
+ $count = 0;
75
+ $pages = get_pages('sort_column=menu_order');
76
+ foreach($pages as $page) {
77
+ if($count < 100) {
78
+ echo "<option value='".get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions&assign=".$page->ID."'>".$page->post_title."</option>";
79
+ }
80
+ $count++;
81
+ }
82
+ ?>
83
+ </select>
84
+ <script type="text/javascript">
85
+ document.getElementById('wp_insert_select_assign_pages').selectedIndex = 0;
86
+ function UpdateAssignlink() {
87
+ document.getElementById('wp_insert_assign_now_link').href = document.getElementById('wp_insert_select_assign_pages')[document.getElementById('wp_insert_select_assign_pages').selectedIndex].value;
88
+ }
89
+ </script>
90
+ as Terms and Conditions page : <a id="wp_insert_assign_now_link" href="#" class="button-secondary">Assign Now</a></p>
91
+ <p><b>OR</b></p>
92
+ <p>Create Terms and Conditions Page Automatically : <a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions&create=1"; ?>" class="button-secondary">Create Now</a></p>
93
+ </div>
94
+ <?php }
95
+
96
+ function wp_insert_edit_terms_conditions_HTML() { ?>
97
+ <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/fckeditor/fckeditor.js"></script>
98
+ <textarea id="wp_insert_terms_conditions_content" name="wp_insert_terms_conditions_content" style="width:100%; height: 400px;">
99
+ <?php echo get_option('wp_insert_terms_conditions_content'); ?>
100
+ </textarea>
101
+ <p><a href="<?php echo get_bloginfo('url')."/wp-admin/admin.php?page=Terms And Conditions&reset=1"; ?>" class="button-secondary alignright">Reset</a></p><p><small>This is an automatically generated "Terms and Conditions".</small></p>
102
+ <script type="text/javascript">
103
+ if(document.getElementById('wp_insert_terms_conditions_content')) {
104
+ var wp_insert_fckeditor = new FCKeditor('wp_insert_terms_conditions_content') ;
105
+ wp_insert_fckeditor.Height = "400"
106
+ wp_insert_fckeditor.BasePath = '<?php echo WP_PLUGIN_URL; ?>/wp-insert/fckeditor/';
107
+ wp_insert_fckeditor.ReplaceTextarea() ;
108
+ }
109
+ </script>
110
+ <?php }
111
+ ?>
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Wp-Insert ===
2
  Contributors: Namith Jawahar
3
  Donate link:http://www.wp-insert.smartlogix.co.in/
4
- Tags: adsense,google,widget,post,admin,plugin,rss,feedburner,ads,subscribe,fck editor,category description editor,excerpt,WYSIWYG,WYSIWYG editor,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized
5
  Requires at least: 2.7
6
- Tested up to: 2.9
7
- Stable tag: 1.6.1
8
 
9
  Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin which does a lot more than ad management.
10
 
@@ -52,6 +52,13 @@ Manage Ads (Completely Rewritten with a New and Powerful Interface)
52
  * Assign Privacy Policy to an existing page or create one automatically.
53
  * WYSIWYG Editor to finetune the Privacy Policy to your requirements.
54
 
 
 
 
 
 
 
 
55
  **Manage Pages**
56
 
57
  * Reorder Pages using a drag and drop interface.
@@ -102,7 +109,8 @@ Extract the zip file and just drop the contents in the wp-content/plugins/ direc
102
  6. Wp-Insert - Syntax Highlighting.
103
  7. Wp-Insert - Adding an in post Ad.
104
  8. Wp-Insert - Managing Privacy policy.
105
- 9. Wp-Insert - Reordering pages.
 
106
 
107
 
108
  == Frequently Asked Questions ==
1
  === Wp-Insert ===
2
  Contributors: Namith Jawahar
3
  Donate link:http://www.wp-insert.smartlogix.co.in/
4
+ Tags: adsense,google,widget,post,admin,plugin,rss,feedburner,ads,subscribe,fck editor,category description editor,excerpt,WYSIWYG,WYSIWYG editor,in post ads,feed logo,smartlogix,ads in feeds,analytics,google analytics,header,footer,ad management,advertisements,content,ad,advertising,privacy policy,privacy,policy,automatic privacy policy,blog,feed,feeds,formatting,html,javascript,manage,post,posts,seo,sidebar,widget,widgets,wordpress,tracking,syntex highlighter,highlighting,theme tools,plugin tools,developer tools,highlighting,theme editor,plugin editor,middle ad,ad filtration,pagewise ad filtration,template ads,ad tags,adbrite ads,adsense ready,easy adsense,adsense optimized,terms and conditions,terms,conditions,automatic terms and conditions
5
  Requires at least: 2.7
6
+ Tested up to: 2.9.2
7
+ Stable tag: 1.6.2
8
 
9
  Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin which does a lot more than ad management.
10
 
52
  * Assign Privacy Policy to an existing page or create one automatically.
53
  * WYSIWYG Editor to finetune the Privacy Policy to your requirements.
54
 
55
+ **Manage Terms and Conditions**
56
+
57
+ * Readymade general Terms and Conditions for your site.
58
+ * Create a Terms and Conditions page without even typing a Word.
59
+ * Assign Terms and Conditions to an existing page or create one automatically.
60
+ * WYSIWYG Editor to finetune the Terms and Conditions to your requirements.
61
+
62
  **Manage Pages**
63
 
64
  * Reorder Pages using a drag and drop interface.
109
  6. Wp-Insert - Syntax Highlighting.
110
  7. Wp-Insert - Adding an in post Ad.
111
  8. Wp-Insert - Managing Privacy policy.
112
+ 9. Wp-Insert - Managing Terms and Conditions.
113
+ 10. Wp-Insert - Reordering pages.
114
 
115
 
116
  == Frequently Asked Questions ==
screenshot-10.png ADDED
Binary file
screenshot-9.png CHANGED
Binary file
wp-insert.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: wp-insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
- Version: 1.6.1
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
3
  Plugin Name: wp-insert
4
  Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
+ Version: 1.6.2
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin