Wp-Insert - Version 1.5.0

Version Description

Download this release

Release Info

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

Code changes from version 1.4 to 1.5.0

css/IE6adminStyle.css ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ /*Begin Make default admin menu wider*/
2
+ #adminmenu {
3
+ width:145px;
4
+ }
5
+
6
+ #wpbody {
7
+ margin-left:175px;
8
+ }
9
+ /*End Make default admin menu wider*/
css/adminStyle.css ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*Begin Make default admin menu wider*/
2
+ #adminmenu {
3
+ width:175px;
4
+ margin:15px 5px 15px -190px;
5
+ }
6
+
7
+ #wpbody {
8
+ margin-left:205px;
9
+ }
10
+
11
+ .GreyOutLayer
12
+ {
13
+ position: absolute;
14
+ top: 0px;
15
+ left: 0px;
16
+ width: 100%;
17
+ height: 100%;
18
+ bottom: 0px;
19
+ background-color: #666;
20
+ z-index: 100;
21
+ filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 30);
22
+ opacity: 0.30;
23
+ }
24
+
25
+ #popUpMaster{position:relative;padding:10px 0 0 10px;display:none}
26
+ #popUpTopLft{position:absolute;left:0px;top:0}
27
+ #popUpTop{position:absolute;left:10px;top:0;height:36px;z-index:9}
28
+ #popUpTopRgt{position:absolute;right:0px;top:0;z-index:9}
29
+ #popUpLft{position:absolute;left:0px;top:30px;width:17px;}
30
+ #popUpRgt{position:absolute;right:0px;top:36px;width:26px;}
31
+ #popUpBtmLft{position:absolute;left:0px;bottom:0px;}
32
+ #popUpBtm{position:absolute;left:17px;bottom:0px;height:20px}
33
+ #popUpBtmRgt{position:absolute;right:0px;bottom:0px;}
34
+ #popUpMaster #content{background:#F2F2F2;height:520px;width:725px;margin:0px;z-index:100;position:absolute;top:26px;right:15px;}
35
+ .closePopUp{display:block;position:absolute;right:10px;top:4px;width:20px;height:18px;z-index:10;text-decoration:none;background:none}
36
+ #popUpMaster h4{position:absolute;top:0;left:0;z-index:10;padding:0;margin:6px 0 0 10px;color:#333333;text-shadow:0 1px 0 #FFFFFF;
37
+ font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:15px;cursor:move;background:nonImage.gif;
38
+ width:100%}
39
+ /*End Make default admin menu wider*/
feeds/insert-feeds.php CHANGED
@@ -165,7 +165,7 @@ function smart_add_feedspage() { ?>
165
  </p>
166
  </form>
167
  <p>
168
- <a href="http://www.smartlogix.co.in/"><img src="http://www.smartlogix.co.in/ads/random/rotate.php" border="0" /></a>
169
  </p>
170
  </div>
171
  <?php } ?>
165
  </p>
166
  </form>
167
  <p>
168
+ <script type="text/javascript" src="http://www.wp-insert.smartlogix.co.in/wp-content/plugins/wp-adnetwork/wp-adnetwork.php?showad=1"></script>
169
  </p>
170
  </div>
171
  <?php } ?>
highlighter/syntax.php CHANGED
@@ -57,7 +57,7 @@ function smart_add_syntaxhighlighting_pages() { ?>
57
  <table class="form-table">
58
  <tr valign="top">
59
  <th scope="row"></th>
60
- <td><b style="color:red;">This section is irrelavent from wordpress 2.8</b></td>
61
  </tr>
62
  <tr valign="top">
63
  <th scope="row"><input id="smart_enable_sh" name="smart_enable_sh" type="checkbox" value="1"<?php if(get_option('smart_enable_sh')) echo ' checked="checked"'; ?>/> <b>Plugin/Theme Editor</b></th>
@@ -81,7 +81,7 @@ Syntax highlighting by codepress</td>
81
  </p>
82
  </form>
83
  <p>
84
- <a href="http://www.smartlogix.co.in/"><img src="http://www.smartlogix.co.in/ads/random/rotate.php" border="0" /></a>
85
  </p>
86
  </div>
87
  <?php } ?>
57
  <table class="form-table">
58
  <tr valign="top">
59
  <th scope="row"></th>
60
+ <td></td>
61
  </tr>
62
  <tr valign="top">
63
  <th scope="row"><input id="smart_enable_sh" name="smart_enable_sh" type="checkbox" value="1"<?php if(get_option('smart_enable_sh')) echo ' checked="checked"'; ?>/> <b>Plugin/Theme Editor</b></th>
81
  </p>
82
  </form>
83
  <p>
84
+ <script type="text/javascript" src="http://www.wp-insert.smartlogix.co.in/wp-content/plugins/wp-adnetwork/wp-adnetwork.php?showad=1"></script>
85
  </p>
86
  </div>
87
  <?php } ?>
includes/ads.php CHANGED
@@ -4,7 +4,8 @@ require_once (dirname(__FILE__) . '/inpostads.php');
4
  // action function for above hook
5
  function smart_add_menu() {
6
  add_menu_page('Wp-Insert', 'Wp-Insert', 8, __FILE__);
7
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads', 8, __FILE__, 'wp_insert_add_adspage');
 
8
  add_submenu_page(__FILE__, 'wp-insert', 'Manage Feeds', 8, 'Manage Feeds', 'smart_add_feedspage');
9
  add_submenu_page(__FILE__, 'wp-insert', 'Tracking Codes', 8, 'Tracking Codes', 'smart_add_analytics');
10
  add_submenu_page(__FILE__, 'wp-insert', 'WYSIWYG Editor', 8, 'WYSIWYG Editor', 'smart_add_wysiwyg_pages');
@@ -20,32 +21,32 @@ wp_enqueue_script('postbox');
20
  function wp_insert_add_adspage() {
21
  global $screen_layout_columns;
22
 
23
- add_meta_box('wp_insert_ad_widget_1', 'Ad Widget : 1', 'wp_insert_ad_widget_1_HTML', 'adWidgets');
24
- add_meta_box('wp_insert_ad_widget_2', 'Ad Widget : 2', 'wp_insert_ad_widget_2_HTML', 'adWidgets');
25
- add_meta_box('wp_insert_ad_widget_3', 'Ad Widget : 3', 'wp_insert_ad_widget_3_HTML', 'adWidgets');
26
- add_meta_box('wp_insert_ad_widget_4', 'Ad Widget : 4', 'wp_insert_ad_widget_4_HTML', 'adWidgets');
27
- add_meta_box('wp_insert_ad_widget_5', 'Ad Widget : 5', 'wp_insert_ad_widget_5_HTML', 'adWidgets');
28
- add_meta_box('wp_insert_ad_widget_6', 'Ad Widget : 6', 'wp_insert_ad_widget_6_HTML', 'adWidgets');
29
- add_meta_box('wp_insert_ad_widget_7', 'Ad Widget : 7', 'wp_insert_ad_widget_7_HTML', 'adWidgets');
30
- add_meta_box('wp_insert_ad_widget_8', 'Ad Widget : 8', 'wp_insert_ad_widget_8_HTML', 'adWidgets');
31
- add_meta_box('wp_insert_ad_widget_9', 'Ad Widget : 9', 'wp_insert_ad_widget_9_HTML', 'adWidgets');
32
- add_meta_box('wp_insert_ad_widget_10', 'Ad Widget : 10', 'wp_insert_ad_widget_10_HTML', 'adWidgets');
33
-
34
- add_meta_box('wp_insert_multiple_ad_network', 'Multiple Ad Networks', 'wp_insert_multiple_ad_network_HTML', 'inPostAds');
35
- add_meta_box('wp_insert_in_post_ad_top_1', 'Ad - Above Post Content', 'wp_insert_in_post_ad_top_1_HTML', 'inPostAds');
36
- //add_meta_box('wp_insert_in_post_ad_top_2', 'Ad - Above Post Content : 2', 'wp_insert_in_post_ad_top_2_HTML', 'inPostAds');
37
- add_meta_box('wp_insert_in_post_ad_bottom_1', 'Ad - Below Post Content', 'wp_insert_in_post_ad_bottom_1_HTML', 'inPostAds');
38
- //add_meta_box('wp_insert_in_post_ad_bottom_2', 'Ad - Below Post Content : 2', 'wp_insert_in_post_ad_bottom_2_HTML', 'inPostAds');
39
- add_meta_box('wp_insert_in_post_ad_left_1', 'Ad - Left of Post Content', 'wp_insert_in_post_ad_left_1_HTML', 'inPostAds');
40
- //add_meta_box('wp_insert_in_post_ad_left_2', 'Ad - Left of Post Content : 2', 'wp_insert_in_post_ad_left_2_HTML', 'inPostAds');
41
- add_meta_box('wp_insert_in_post_ad_right_1', 'Ad - Right of Post Content', 'wp_insert_in_post_ad_right_1_HTML', 'inPostAds');
42
- //add_meta_box('wp_insert_in_post_ad_right_2', 'Ad - Right of Post Content : 2', 'wp_insert_in_post_ad_right_2_HTML', 'inPostAds');
43
- add_meta_box('wp_insert_in_post_ad_middle_1', 'Ad - Middle of Post Content', 'wp_insert_in_post_ad_middle_1_HTML', 'inPostAds');
44
- //add_meta_box('wp_insert_in_post_ad_middle_2', 'Ad - Middle of Post Content : 2', 'wp_insert_in_post_ad_middle_2_HTML', 'inPostAds');
45
- ?>
46
  <div id="post_ads_container" class="wrap">
47
  <?php screen_icon('options-general'); ?>
48
- <h2>WP-INSERT : Manage Ads</h2>
49
  <div class="updated fade below-h2" id="message" style="opacity:0;display:none;"><p>Changes have been made to this page. Please click <b>Save Changes</b> to make them permanent</p></div>
50
  <?php show_support_options(); ?>
51
  <form method="post" action="options.php">
@@ -60,51 +61,20 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
60
  <?php require_once (dirname(__FILE__) . '/postpicker.php'); ?>
61
 
62
  <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/js/common.js"></script>
63
- <style type="text/css">
64
- .GreyOutLayer
65
- {
66
- position: absolute;
67
- top: 0px;
68
- left: 0px;
69
- width: 100%;
70
- height: 100%;
71
- bottom: 0px;
72
- background-color: #666;
73
- z-index: 100;
74
- filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 30);
75
- opacity: 0.30;
76
- }
77
-
78
- #popUpMaster{position:relative;padding:10px 0 0 10px;display:none}
79
- #popUpTopLft{position:absolute;left:0px;top:0}
80
- #popUpTop{position:absolute;left:10px;top:0;height:36px;z-index:9}
81
- #popUpTopRgt{position:absolute;right:0px;top:0;z-index:9}
82
- #popUpLft{position:absolute;left:0px;top:30px;width:17px;}
83
- #popUpRgt{position:absolute;right:0px;top:36px;width:26px;}
84
- #popUpBtmLft{position:absolute;left:0px;bottom:0px;}
85
- #popUpBtm{position:absolute;left:17px;bottom:0px;height:20px}
86
- #popUpBtmRgt{position:absolute;right:0px;bottom:0px;}
87
- #content{background:#F2F2F2;height:520px;width:725px;margin:0px;z-index:100;position:absolute;top:26px;right:15px;}
88
- .closePopUp{display:block;position:absolute;right:10px;top:4px;width:20px;height:18px;z-index:10;text-decoration:none;background:none}
89
- #popUpMaster h4{position:absolute;top:0;left:0;z-index:10;padding:0;margin:6px 0 0 10px;color:#333333;text-shadow:0 1px 0 #FFFFFF;
90
- font-family:Arial, Helvetica, sans-serif;font-size:12px;line-height:15px;cursor:move;background:nonImage.gif;
91
- width:100%}
92
- </style>
93
-
94
  <div id="poststuff" class="metabox-holder has-right-sidebar">
95
  <div id="side-info-column" class="inner-sidebar">
96
- <?php do_meta_boxes('adWidgets','advanced',null); ?>
97
  </div>
98
  <div id="post-body" class="has-sidebar">
99
  <div id="post-body-content" class="has-sidebar-content">
100
- <?php do_meta_boxes('inPostAds','advanced',null); ?>
101
  <input type="hidden" name="action" value="update" />
102
- <input type="hidden" name="page_options" value="wp_insert_multiple_ad_network_type,<?php wp_insert_in_post_ad_parameters('middle_1'); wp_insert_in_post_ad_parameters('right_1'); wp_insert_in_post_ad_parameters('left_1'); wp_insert_in_post_ad_parameters('bottom_1'); wp_insert_in_post_ad_parameters('top_1'); wp_insert_ad_widget_parameters(1); wp_insert_ad_widget_parameters(2); wp_insert_ad_widget_parameters(3); wp_insert_ad_widget_parameters(4); wp_insert_ad_widget_parameters(5); wp_insert_ad_widget_parameters(6); wp_insert_ad_widget_parameters(7); wp_insert_ad_widget_parameters(8); wp_insert_ad_widget_parameters(9); wp_insert_ad_widget_parameters(10); ?>" />
103
  <p class="submit">
104
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
105
  </p>
106
  <p>
107
- <a href="http://www.smartlogix.co.in/"><img src="http://www.smartlogix.co.in/ads/random/rotate.php" border="0" /></a>
108
  </p>
109
  </div>
110
  </div>
@@ -124,8 +94,26 @@ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
124
  //]]>
125
  </script>
126
  </div>
127
- <?php
128
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
  function wp_insert_multiple_ad_network_HTML() {
131
  if(!get_option('wp_insert_multiple_ad_network_type')) { add_option("wp_insert_multiple_ad_network_type", 'Primary Ad Network Only', '', 'yes'); }
@@ -144,106 +132,69 @@ Select the Multiple Ad Network Setup that best suits you : <select name="wp_inse
144
  ?>
145
  </select>
146
  <p>
147
- <small>Multiple Ad Networks can be setup to display ads from different networks without infringing the terms of any network.<br/>At a time only ads from one network (Randomly Choosen) will be shown.<br/>This feature can also be used to randomly display different sized Ads from the same network.</small>
148
  </p>
149
  </div>
150
  <?php }
151
 
152
- function wp_insert_in_post_ad_parameters($in_post_adID) {
153
- echo 'wp_insert_in_post_ad_'.$in_post_adID.'_enable,wp_insert_in_post_ad_'.$in_post_adID.'_content,wp_insert_in_post_ad_'.$in_post_adID.'_content_1,wp_insert_in_post_ad_'.$in_post_adID.'_content_2,wp_insert_in_post_ad_'.$in_post_adID.'_exclude_ids,wp_insert_in_post_ad_'.$in_post_adID.'_exclude_home,wp_insert_in_post_ad_'.$in_post_adID.'_exclude_archives,wp_insert_in_post_ad_'.$in_post_adID.'_style,';
 
 
 
154
  }
155
 
156
- function wp_insert_in_post_ad_HTML($in_post_adID) { ?>
157
  <div>
158
- <?php if(get_option('wp_insert_in_post_ad_'.$in_post_adID.'_enable')) { ?><input type="button" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable_button', '#wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable')"/>
159
- <?php } else { ?><input type="button" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable_button', '#wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable')"/><?php } ?>
160
- <input style="display:none;" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_in_post_ad_'.$in_post_adID.'_enable')) echo ' checked="checked"'; ?> />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
 
162
  <div style="margin:10px 6px;">
163
- <?php if((get_option('wp_insert_multiple_ad_network_type') == "Primary and Alternate Ad Network 1") || (get_option('wp_insert_multiple_ad_network_type') == "All Ad Networks")) { ?><input type="button" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_button" value="Primary Ad Code" class="button" style="color:#2f9303;" onclick="SwitchAds('wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content','wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_1','wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_2')"/> <?php } else {?><label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content">Primary Ad Code:</label><?php } ?>
164
- <?php if((get_option('wp_insert_multiple_ad_network_type') == "Primary and Alternate Ad Network 1") || (get_option('wp_insert_multiple_ad_network_type') == "All Ad Networks")) { ?><input type="button" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_1_button" value="Alternative Ad Code : 1" class="button" style="color:red;" onclick="SwitchAds('wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_1','wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content','wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_2')"/> <?php } ?>
165
- <?php if(get_option('wp_insert_multiple_ad_network_type') == "All Ad Networks") { ?><input type="button" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_2_button" value="Alternative Ad Code : 2" class="button" style="color:red;" onclick="SwitchAds('wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_2','wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_1','wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content')"/> <?php } ?>
166
- <textarea style="display:block;height:315px;" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content" class="widefat" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content" cols="20" rows="16"><?php echo get_option('wp_insert_in_post_ad_'.$in_post_adID.'_content'); ?></textarea>
167
- <textarea style="display:none;height:0px;" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_1" class="widefat" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_1" cols="20" rows="16"><?php echo get_option('wp_insert_in_post_ad_'.$in_post_adID.'_content_1'); ?></textarea>
168
- <textarea style="display:none;height:0px;" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_2" class="widefat" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content_2" cols="20" rows="16"><?php echo get_option('wp_insert_in_post_ad_'.$in_post_adID.'_content_2'); ?></textarea>
169
  </div>
170
 
171
  <div style="margin:6px;">
172
- <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_ids">Exclude On Posts/Pages:</label><div class="clear"></div>
173
- <input style="margin: 10px 6px 0pt; float: left; width: 60%;" class="widefat" type="text" value="<?php echo get_option('wp_insert_in_post_ad_'.$in_post_adID.'_exclude_ids'); ?>" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_ids" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_ids" />
174
- <img style="float:left; margin-top:14px; cursor: pointer;" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/images/search-16x16.png" width="16px" height="16px" onclick="ShowPostPicker('wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_ids')" />
175
  <div class="clear"></div>
176
  </div>
177
  <p>
178
- <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_home">Exclude On Home Page:</label>
179
- <input id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_home" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_home" type="checkbox" value="1"<?php if(get_option('wp_insert_in_post_ad_'.$in_post_adID.'_exclude_home')) echo ' checked="checked"'; ?> />
180
  </p>
181
  <p>
182
- <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_archives">Exclude On Archives Pages:</label>
183
- <input id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_archives" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_archives" type="checkbox" value="1"<?php if(get_option('wp_insert_in_post_ad_'.$in_post_adID.'_exclude_archives')) echo ' checked="checked"'; ?> />
184
  </p>
 
185
  <div style="margin:6px;padding: 6px;border: 1px solid #DDDDDD;">
186
- <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_style">Ad Box CSS Styler (Advanced Users Only)</label><div class="clear"></div>
187
- <input style="float:left; width:60%; margin: 10px 6px 0pt;background: #FFEEEE;" class="widefat" type="text" value="<?php if(get_option('wp_insert_in_post_ad_'.$in_post_adID.'_style') != '') { echo get_option('wp_insert_in_post_ad_'.$in_post_adID.'_style'); } else { echo 'margin: 5px;padding: 0px;'; } ?>" name="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_style" id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_style" />
188
- <img style="float:left; margin-top:14px; cursor: pointer;" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/images/style-16x16.png" width="0px" height="0px" onclick="ShowStyler('wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_style')" />
189
  <div class="clear"></div>
190
  </div>
191
- </div>
192
- <?php }
193
 
194
- function wp_insert_in_post_ad_top_1_HTML() { wp_insert_in_post_ad_HTML("top_1"); }
195
- //function wp_insert_in_post_ad_top_2_HTML() { wp_insert_in_post_ad_HTML("top_2"); }
196
- function wp_insert_in_post_ad_bottom_1_HTML() { wp_insert_in_post_ad_HTML("bottom_1"); }
197
- //function wp_insert_in_post_ad_bottom_2_HTML() { wp_insert_in_post_ad_HTML("bottom_2"); }
198
- function wp_insert_in_post_ad_left_1_HTML() { wp_insert_in_post_ad_HTML("left_1"); }
199
- //function wp_insert_in_post_ad_left_2_HTML() { wp_insert_in_post_ad_HTML("left_2"); }
200
- function wp_insert_in_post_ad_right_1_HTML() { wp_insert_in_post_ad_HTML("right_1"); }
201
- //function wp_insert_in_post_ad_right_2_HTML() { wp_insert_in_post_ad_HTML("right_2"); }
202
- function wp_insert_in_post_ad_middle_1_HTML() { wp_insert_in_post_ad_HTML("middle_1"); }
203
- //function wp_insert_in_post_ad_middle_2_HTML() { wp_insert_in_post_ad_HTML("middle_2"); }
204
-
205
- function wp_insert_ad_widget_parameters($widgetID) {
206
- echo 'wp_insert_ad_widget_'.$widgetID.'_enable,wp_insert_ad_widget_'.$widgetID.'_title,wp_insert_ad_widget_'.$widgetID.'_content,wp_insert_ad_widget_'.$widgetID.'_exclude_ids,wp_insert_ad_widget_'.$widgetID.'_exclude_home,wp_insert_ad_widget_'.$widgetID.'_exclude_archives,';
207
- }
208
-
209
- function ad_widget_HTML($widgetID) { ?>
210
- <div>
211
- <?php if(get_option('wp_insert_ad_widget_'.$widgetID.'_enable')) { ?><input type="button" id="wp_insert_ad_widget_<?php echo $widgetID; ?>_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_ad_widget_<?php echo $widgetID; ?>_enable_button', '#wp_insert_ad_widget_<?php echo $widgetID; ?>_enable')"/>
212
- <?php } else { ?><input type="button" id="wp_insert_ad_widget_<?php echo $widgetID; ?>_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_ad_widget_<?php echo $widgetID; ?>_enable_button', '#wp_insert_ad_widget_<?php echo $widgetID; ?>_enable')"/><?php } ?>
213
- <input style="display:none;" id="wp_insert_ad_widget_<?php echo $widgetID; ?>_enable" name="wp_insert_ad_widget_<?php echo $widgetID; ?>_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_ad_widget_'.$widgetID.'_enable')) echo ' checked="checked"'; ?> />
214
- <p>
215
- <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_title">Title:</label>
216
- <input id="wp_insert_ad_widget_<?php echo $widgetID; ?>_title" class="widefat" type="text" value="<?php echo get_option('wp_insert_ad_widget_'.$widgetID.'_title'); ?>" name="wp_insert_ad_widget_<?php echo $widgetID; ?>_title"/>
217
- </p>
218
- <p>
219
- <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_content">Ad Code:</label>
220
- <textarea id="wp_insert_ad_widget_<?php echo $widgetID; ?>_content" class="widefat" name="wp_insert_ad_widget_<?php echo $widgetID; ?>_content" cols="20" rows="16"><?php echo get_option('wp_insert_ad_widget_'.$widgetID.'_content'); ?></textarea>
221
- </p>
222
- <p>
223
- <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_ids">Exclude On Posts/Pages:</label><div class="clear"></div>
224
- <input style="float:left; width:60%; margin: 0 6px;" class="widefat" type="text" value="<?php echo get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_ids'); ?>" name="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_ids" id="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_ids" />
225
- <img style="float:left; margin-top:4px; cursor: pointer;" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/images/search-16x16.png" width="16px" height="16px" onclick="ShowPostPicker('wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_ids')" />
226
- <div class="clear"></div>
227
- </p>
228
- <p>
229
- <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_home">Exclude On Home Page:</label>
230
- <input id="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_home" name="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_home" type="checkbox" value="1"<?php if(get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_home')) echo ' checked="checked"'; ?> />
231
- </p>
232
- <p>
233
- <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_archives">Exclude On Archives Pages:</label>
234
- <input id="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_archives" name="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_archives" type="checkbox" value="1"<?php if(get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_archives')) echo ' checked="checked"'; ?> />
235
- </p>
236
  </div>
237
- <?php }
238
-
239
- function wp_insert_ad_widget_1_HTML() { ad_widget_HTML(1); }
240
- function wp_insert_ad_widget_2_HTML() { ad_widget_HTML(2); }
241
- function wp_insert_ad_widget_3_HTML() { ad_widget_HTML(3); }
242
- function wp_insert_ad_widget_4_HTML() { ad_widget_HTML(4); }
243
- function wp_insert_ad_widget_5_HTML() { ad_widget_HTML(5); }
244
- function wp_insert_ad_widget_6_HTML() { ad_widget_HTML(6); }
245
- function wp_insert_ad_widget_7_HTML() { ad_widget_HTML(7); }
246
- function wp_insert_ad_widget_8_HTML() { ad_widget_HTML(8); }
247
- function wp_insert_ad_widget_9_HTML() { ad_widget_HTML(9); }
248
- function wp_insert_ad_widget_10_HTML() { ad_widget_HTML(10); }
249
- ?>
4
  // action function for above hook
5
  function smart_add_menu() {
6
  add_menu_page('Wp-Insert', 'Wp-Insert', 8, __FILE__);
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 Feeds', 8, 'Manage Feeds', 'smart_add_feedspage');
10
  add_submenu_page(__FILE__, 'wp-insert', 'Tracking Codes', 8, 'Tracking Codes', 'smart_add_analytics');
11
  add_submenu_page(__FILE__, 'wp-insert', 'WYSIWYG Editor', 8, 'WYSIWYG Editor', 'smart_add_wysiwyg_pages');
21
  function wp_insert_add_adspage() {
22
  global $screen_layout_columns;
23
 
24
+ add_meta_box('wp_insert_ad_widget_1', 'Ad Widget : 1', 'wp_insert_ad_widget_1_HTML', 'col_2');
25
+ add_meta_box('wp_insert_ad_widget_2', 'Ad Widget : 2', 'wp_insert_ad_widget_2_HTML', 'col_2');
26
+ add_meta_box('wp_insert_ad_widget_3', 'Ad Widget : 3', 'wp_insert_ad_widget_3_HTML', 'col_2');
27
+ add_meta_box('wp_insert_ad_widget_4', 'Ad Widget : 4', 'wp_insert_ad_widget_4_HTML', 'col_2');
28
+ add_meta_box('wp_insert_ad_widget_5', 'Ad Widget : 5', 'wp_insert_ad_widget_5_HTML', 'col_2');
29
+ add_meta_box('wp_insert_ad_widget_6', 'Ad Widget : 6', 'wp_insert_ad_widget_6_HTML', 'col_2');
30
+ add_meta_box('wp_insert_ad_widget_7', 'Ad Widget : 7', 'wp_insert_ad_widget_7_HTML', 'col_2');
31
+ add_meta_box('wp_insert_ad_widget_8', 'Ad Widget : 8', 'wp_insert_ad_widget_8_HTML', 'col_2');
32
+ add_meta_box('wp_insert_ad_widget_9', 'Ad Widget : 9', 'wp_insert_ad_widget_9_HTML', 'col_2');
33
+ add_meta_box('wp_insert_ad_widget_10', 'Ad Widget : 10', 'wp_insert_ad_widget_10_HTML', 'col_2');
34
+
35
+ add_meta_box('wp_insert_multiple_ad_network', 'Multiple Ad Networks', 'wp_insert_multiple_ad_network_HTML', 'col_1');
36
+ add_meta_box('wp_insert_in_post_ad_top_1', 'Ad - Above Post Content', 'wp_insert_in_post_ad_top_1_HTML', 'col_1');
37
+ add_meta_box('wp_insert_in_post_ad_bottom_1', 'Ad - Below Post Content', 'wp_insert_in_post_ad_bottom_1_HTML', 'col_1');
38
+ add_meta_box('wp_insert_in_post_ad_left_1', 'Ad - Left of Post Content', 'wp_insert_in_post_ad_left_1_HTML', 'col_1');
39
+ add_meta_box('wp_insert_in_post_ad_right_1', 'Ad - Right of Post Content', 'wp_insert_in_post_ad_right_1_HTML', 'col_1');
40
+ add_meta_box('wp_insert_in_post_ad_middle_1', 'Ad - Middle of Post Content', 'wp_insert_in_post_ad_middle_1_HTML', 'col_1');
41
+
42
+ $parameters = 'wp_insert_multiple_ad_network_type,'.wp_insert_in_post_ad_parameters('middle_1').','.wp_insert_in_post_ad_parameters('right_1').','.wp_insert_in_post_ad_parameters('left_1').','.wp_insert_in_post_ad_parameters('bottom_1').','.wp_insert_in_post_ad_parameters('top_1').','.wp_insert_ad_widget_parameters(1).','.wp_insert_ad_widget_parameters(2).','.wp_insert_ad_widget_parameters(3).','.wp_insert_ad_widget_parameters(4).','.wp_insert_ad_widget_parameters(5).','.wp_insert_ad_widget_parameters(6).','.wp_insert_ad_widget_parameters(7).','.wp_insert_ad_widget_parameters(8).','.wp_insert_ad_widget_parameters(9).','.wp_insert_ad_widget_parameters(10);
43
+ wp_insert_settings_page_layout($parameters);
44
+ }
45
+
46
+ function wp_insert_settings_page_layout($page_parameters) { ?>
47
  <div id="post_ads_container" class="wrap">
48
  <?php screen_icon('options-general'); ?>
49
+ <h2>WP-INSERT : Manage Ads (Posts and Sidebars)</h2>
50
  <div class="updated fade below-h2" id="message" style="opacity:0;display:none;"><p>Changes have been made to this page. Please click <b>Save Changes</b> to make them permanent</p></div>
51
  <?php show_support_options(); ?>
52
  <form method="post" action="options.php">
61
  <?php require_once (dirname(__FILE__) . '/postpicker.php'); ?>
62
 
63
  <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/js/common.js"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  <div id="poststuff" class="metabox-holder has-right-sidebar">
65
  <div id="side-info-column" class="inner-sidebar">
66
+ <?php do_meta_boxes('col_2','advanced',null); ?>
67
  </div>
68
  <div id="post-body" class="has-sidebar">
69
  <div id="post-body-content" class="has-sidebar-content">
70
+ <?php do_meta_boxes('col_1','advanced',null); ?>
71
  <input type="hidden" name="action" value="update" />
72
+ <input type="hidden" name="page_options" value="<?php echo $page_parameters; ?>" />
73
  <p class="submit">
74
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
75
  </p>
76
  <p>
77
+ <script type="text/javascript" src="http://www.wp-insert.smartlogix.co.in/wp-content/plugins/wp-adnetwork/wp-adnetwork.php?showad=1"></script>
78
  </p>
79
  </div>
80
  </div>
94
  //]]>
95
  </script>
96
  </div>
97
+ <?php }
98
+
99
+ function wp_insert_in_post_ad_parameters($in_post_adID) { return wp_insert_ad_parameters($in_post_adID, 'in_post_ad'); }
100
+ function wp_insert_in_post_ad_top_1_HTML() { wp_insert_ad_HTML('top_1', 'in_post_ad'); }
101
+ function wp_insert_in_post_ad_bottom_1_HTML() { wp_insert_ad_HTML('bottom_1', 'in_post_ad'); }
102
+ function wp_insert_in_post_ad_left_1_HTML() { wp_insert_ad_HTML('left_1', 'in_post_ad'); }
103
+ function wp_insert_in_post_ad_right_1_HTML() { wp_insert_ad_HTML('right_1', 'in_post_ad'); }
104
+ function wp_insert_in_post_ad_middle_1_HTML() { wp_insert_ad_HTML('middle_1', 'in_post_ad'); }
105
+
106
+ function wp_insert_ad_widget_parameters($widgetID) { return wp_insert_ad_parameters($widgetID, 'ad_widget'); }
107
+ function wp_insert_ad_widget_1_HTML() { wp_insert_ad_HTML(1, 'ad_widget'); }
108
+ function wp_insert_ad_widget_2_HTML() { wp_insert_ad_HTML(2, 'ad_widget'); }
109
+ function wp_insert_ad_widget_3_HTML() { wp_insert_ad_HTML(3, 'ad_widget'); }
110
+ function wp_insert_ad_widget_4_HTML() { wp_insert_ad_HTML(4, 'ad_widget'); }
111
+ function wp_insert_ad_widget_5_HTML() { wp_insert_ad_HTML(5, 'ad_widget'); }
112
+ function wp_insert_ad_widget_6_HTML() { wp_insert_ad_HTML(6, 'ad_widget'); }
113
+ function wp_insert_ad_widget_7_HTML() { wp_insert_ad_HTML(7, 'ad_widget'); }
114
+ function wp_insert_ad_widget_8_HTML() { wp_insert_ad_HTML(8, 'ad_widget'); }
115
+ function wp_insert_ad_widget_9_HTML() { wp_insert_ad_HTML(9, 'ad_widget'); }
116
+ function wp_insert_ad_widget_10_HTML() { wp_insert_ad_HTML(10, 'ad_widget'); }
117
 
118
  function wp_insert_multiple_ad_network_HTML() {
119
  if(!get_option('wp_insert_multiple_ad_network_type')) { add_option("wp_insert_multiple_ad_network_type", 'Primary Ad Network Only', '', 'yes'); }
132
  ?>
133
  </select>
134
  <p>
135
+ <small>Multiple Ad Networks can be setup to display ads from different networks without infringing the terms of any network.<br/>At a time only ads from one network (Randomly Choosen) will be shown.<br/>This feature can also be used to randomly display different sized Ads from the same network.<br/>Please note that this option is global and applied to Template Ads, In Post Ads as well as Ad Widgets.</small>
136
  </p>
137
  </div>
138
  <?php }
139
 
140
+ function wp_insert_ad_parameters($adID, $ad_type) {
141
+ $output = '';
142
+ if($ad_type == 'ad_widget') { $output .= 'wp_insert_'.$ad_type.'_'.$adID.'_title,'; }
143
+ $output .= 'wp_insert_'.$ad_type.'_'.$adID.'_enable,wp_insert_'.$ad_type.'_'.$adID.'_content,wp_insert_'.$ad_type.'_'.$adID.'_content_1,wp_insert_'.$ad_type.'_'.$adID.'_content_2,wp_insert_'.$ad_type.'_'.$adID.'_exclude_ids,wp_insert_'.$ad_type.'_'.$adID.'_exclude_home,wp_insert_'.$ad_type.'_'.$adID.'_exclude_archives,wp_insert_'.$ad_type.'_'.$adID.'_style';
144
+ return $output;
145
  }
146
 
147
+ function wp_insert_ad_HTML($adID, $ad_type) { ?>
148
  <div>
149
+ <?php if(get_option('wp_insert_'.$ad_type.'_'.$adID.'_enable')) { ?><input type="button" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable_button', '#wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable')"/>
150
+ <?php } else { ?><input type="button" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable_button', '#wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable')"/><?php } ?>
151
+ <input style="display:none;" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_'.$ad_type.'_'.$adID.'_enable')) echo ' checked="checked"'; ?> />
152
+
153
+ <?php if($ad_type == 'template_ad') { ?>
154
+ <p>
155
+ <label for="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_insertion_code">Code to add in your theme:</label>
156
+ <input id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_insertion_code" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_insertion_code" type="text" style="border: medium none ; padding: 3px; font-size: 11px; width: 100%; display: inline;" class="widefat" readonly="true" value="&lt;?php if(function_exists('wp_template_ad')) { wp_template_ad('<?php echo $adID; ?>'); } ?&gt;"/>
157
+ </p>
158
+ <?php } ?>
159
+
160
+ <?php if($ad_type == 'ad_widget') { ?>
161
+ <p>
162
+ <label for="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_title">Title:</label>
163
+ <input id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_title" class="widefat" type="text" value="<?php echo get_option('wp_insert_'.$ad_type.'_'.$adID.'_title'); ?>" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_title"/>
164
+ </p>
165
+ <?php } ?>
166
 
167
  <div style="margin:10px 6px;">
168
+ <?php if((get_option('wp_insert_multiple_ad_network_type') == "Primary and Alternate Ad Network 1") || (get_option('wp_insert_multiple_ad_network_type') == "All Ad Networks")) { ?><input type="button" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_button" value="Primary Ad Code" class="button" style="color:#2f9303;" onclick="SwitchAds('wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content','wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_1','wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_2')"/> <?php } else {?><label for="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content">Primary Ad Code:</label><?php } ?>
169
+ <?php if((get_option('wp_insert_multiple_ad_network_type') == "Primary and Alternate Ad Network 1") || (get_option('wp_insert_multiple_ad_network_type') == "All Ad Networks")) { ?><input type="button" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_1_button" value="Alternative Ad Code : 1" class="button" style="color:red;" onclick="SwitchAds('wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_1','wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content','wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_2')"/> <?php } ?>
170
+ <?php if(get_option('wp_insert_multiple_ad_network_type') == "All Ad Networks") { ?><input type="button" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_2_button" value="Alternative Ad Code : 2" class="button" style="color:red;" onclick="SwitchAds('wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_2','wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_1','wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content')"/> <?php } ?>
171
+ <textarea style="display:block;height:200px;" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content" class="widefat" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content" cols="20" rows="16"><?php echo get_option('wp_insert_'.$ad_type.'_'.$adID.'_content'); ?></textarea>
172
+ <textarea style="display:none;height:0px;" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_1" class="widefat" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_1" cols="20" rows="16"><?php echo get_option('wp_insert_'.$ad_type.'_'.$adID.'_content_1'); ?></textarea>
173
+ <textarea style="display:none;height:0px;" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_2" class="widefat" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_content_2" cols="20" rows="16"><?php echo get_option('wp_insert_'.$ad_type.'_'.$adID.'_content_2'); ?></textarea>
174
  </div>
175
 
176
  <div style="margin:6px;">
177
+ <label for="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_ids">Exclude On Posts/Pages:</label><div class="clear"></div>
178
+ <input style="margin: 10px 6px 0pt; float: left; width: 60%;" class="widefat" type="text" value="<?php echo get_option('wp_insert_'.$ad_type.'_'.$adID.'_exclude_ids'); ?>" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_ids" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_ids" />
179
+ <img style="float:left; margin-top:14px; cursor: pointer;" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/images/search-16x16.png" width="16px" height="16px" onclick="ShowPostPicker('wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_ids')" />
180
  <div class="clear"></div>
181
  </div>
182
  <p>
183
+ <label for="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_home">Exclude On Home Page:</label>
184
+ <input id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_home" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_home" type="checkbox" value="1"<?php if(get_option('wp_insert_'.$ad_type.'_'.$adID.'_exclude_home')) echo ' checked="checked"'; ?> />
185
  </p>
186
  <p>
187
+ <label for="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_archives">Exclude On Archives Pages:</label>
188
+ <input id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_archives" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_exclude_archives" type="checkbox" value="1"<?php if(get_option('wp_insert_'.$ad_type.'_'.$adID.'_exclude_archives')) echo ' checked="checked"'; ?> />
189
  </p>
190
+
191
  <div style="margin:6px;padding: 6px;border: 1px solid #DDDDDD;">
192
+ <label for="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_style">Ad Box CSS Styler</label><div class="clear"></div>
193
+ <input style="float:left; width:60%; margin: 10px 6px 0pt;background: #FFEEEE;" class="widefat" type="text" value="<?php if(get_option('wp_insert_'.$ad_type.'_'.$adID.'_style') != '') { echo get_option('wp_insert_'.$ad_type.'_'.$adID.'_style'); } else { echo 'margin: 5px;padding: 0px;'; } ?>" name="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_style" id="wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_style" />
194
+ <img style="float:left; margin-top:14px; cursor: pointer;" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/images/style-16x16.png" width="0px" height="0px" onclick="ShowStyler('wp_insert_<?php echo $ad_type; ?>_<?php echo $adID; ?>_style')" />
195
  <div class="clear"></div>
196
  </div>
 
 
197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
  </div>
199
+ <?php
200
+ } ?>
 
 
 
 
 
 
 
 
 
 
 
includes/adsadvanced.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once (dirname(__FILE__) . '/templateads.php');
3
+
4
+ function wp_insert_add_advanced_spage() {
5
+ global $screen_layout_columns;
6
+
7
+ add_meta_box('wp_insert_ad_template_11', 'Template Ad : 11', 'wp_insert_ad_template_11_HTML', 'col_2');
8
+ add_meta_box('wp_insert_ad_template_12', 'Template Ad : 12', 'wp_insert_ad_template_12_HTML', 'col_2');
9
+ add_meta_box('wp_insert_ad_template_13', 'Template Ad : 13', 'wp_insert_ad_template_13_HTML', 'col_2');
10
+ add_meta_box('wp_insert_ad_template_14', 'Template Ad : 14', 'wp_insert_ad_template_14_HTML', 'col_2');
11
+ add_meta_box('wp_insert_ad_template_15', 'Template Ad : 15', 'wp_insert_ad_template_15_HTML', 'col_2');
12
+ add_meta_box('wp_insert_ad_template_16', 'Template Ad : 16', 'wp_insert_ad_template_16_HTML', 'col_2');
13
+ add_meta_box('wp_insert_ad_template_17', 'Template Ad : 17', 'wp_insert_ad_template_17_HTML', 'col_2');
14
+ add_meta_box('wp_insert_ad_template_18', 'Template Ad : 18', 'wp_insert_ad_template_18_HTML', 'col_2');
15
+ add_meta_box('wp_insert_ad_template_19', 'Template Ad : 19', 'wp_insert_ad_template_19_HTML', 'col_2');
16
+ add_meta_box('wp_insert_ad_template_20', 'Template Ad : 20', 'wp_insert_ad_template_20_HTML', 'col_2');
17
+
18
+ add_meta_box('wp_insert_multiple_ad_network', 'Multiple Ad Networks', 'wp_insert_multiple_ad_network_HTML', 'col_1');
19
+ add_meta_box('wp_insert_ad_template_1', 'Template Ad : 1', 'wp_insert_ad_template_1_HTML', 'col_1');
20
+ add_meta_box('wp_insert_ad_template_2', 'Template Ad : 2', 'wp_insert_ad_template_2_HTML', 'col_1');
21
+ add_meta_box('wp_insert_ad_template_3', 'Template Ad : 3', 'wp_insert_ad_template_3_HTML', 'col_1');
22
+ add_meta_box('wp_insert_ad_template_4', 'Template Ad : 4', 'wp_insert_ad_template_4_HTML', 'col_1');
23
+ add_meta_box('wp_insert_ad_template_5', 'Template Ad : 5', 'wp_insert_ad_template_5_HTML', 'col_1');
24
+ add_meta_box('wp_insert_ad_template_6', 'Template Ad : 6', 'wp_insert_ad_template_6_HTML', 'col_1');
25
+ add_meta_box('wp_insert_ad_template_7', 'Template Ad : 7', 'wp_insert_ad_template_7_HTML', 'col_1');
26
+ add_meta_box('wp_insert_ad_template_8', 'Template Ad : 8', 'wp_insert_ad_template_8_HTML', 'col_1');
27
+ add_meta_box('wp_insert_ad_template_9', 'Template Ad : 9', 'wp_insert_ad_template_9_HTML', 'col_1');
28
+ add_meta_box('wp_insert_ad_template_10', 'Template Ad : 10', 'wp_insert_ad_template_10_HTML', 'col_1');
29
+
30
+ $parameters = 'wp_insert_multiple_ad_network_type,'.wp_insert_ad_template_parameters('1').','.wp_insert_ad_template_parameters('2').','.wp_insert_ad_template_parameters('3').','.wp_insert_ad_template_parameters('4').','.wp_insert_ad_template_parameters('5').','.wp_insert_ad_template_parameters('6').','.wp_insert_ad_template_parameters('7').','.wp_insert_ad_template_parameters('8').','.wp_insert_ad_template_parameters('9').','.wp_insert_ad_template_parameters('10').','.wp_insert_ad_template_parameters('11').','.wp_insert_ad_template_parameters('12').','.wp_insert_ad_template_parameters('13').','.wp_insert_ad_template_parameters('14').','.wp_insert_ad_template_parameters('15').','.wp_insert_ad_template_parameters('16').','.wp_insert_ad_template_parameters('17').','.wp_insert_ad_template_parameters('18').','.wp_insert_ad_template_parameters('19').','.wp_insert_ad_template_parameters('20');
31
+ wp_insert_settings_page_layout($parameters);
32
+ }
33
+
34
+ function wp_insert_ad_template_parameters($template_adID) { return wp_insert_ad_parameters($template_adID, 'template_ad'); }
35
+ function wp_insert_ad_template_1_HTML() { wp_insert_ad_HTML('1', 'template_ad'); }
36
+ function wp_insert_ad_template_2_HTML() { wp_insert_ad_HTML('2', 'template_ad'); }
37
+ function wp_insert_ad_template_3_HTML() { wp_insert_ad_HTML('3', 'template_ad'); }
38
+ function wp_insert_ad_template_4_HTML() { wp_insert_ad_HTML('4', 'template_ad'); }
39
+ function wp_insert_ad_template_5_HTML() { wp_insert_ad_HTML('5', 'template_ad'); }
40
+ function wp_insert_ad_template_6_HTML() { wp_insert_ad_HTML('6', 'template_ad'); }
41
+ function wp_insert_ad_template_7_HTML() { wp_insert_ad_HTML('7', 'template_ad'); }
42
+ function wp_insert_ad_template_8_HTML() { wp_insert_ad_HTML('8', 'template_ad'); }
43
+ function wp_insert_ad_template_9_HTML() { wp_insert_ad_HTML('9', 'template_ad'); }
44
+ function wp_insert_ad_template_10_HTML() { wp_insert_ad_HTML('10', 'template_ad'); }
45
+ function wp_insert_ad_template_11_HTML() { wp_insert_ad_HTML('11', 'template_ad'); }
46
+ function wp_insert_ad_template_12_HTML() { wp_insert_ad_HTML('12', 'template_ad'); }
47
+ function wp_insert_ad_template_13_HTML() { wp_insert_ad_HTML('13', 'template_ad'); }
48
+ function wp_insert_ad_template_14_HTML() { wp_insert_ad_HTML('14', 'template_ad'); }
49
+ function wp_insert_ad_template_15_HTML() { wp_insert_ad_HTML('15', 'template_ad'); }
50
+ function wp_insert_ad_template_16_HTML() { wp_insert_ad_HTML('16', 'template_ad'); }
51
+ function wp_insert_ad_template_17_HTML() { wp_insert_ad_HTML('17', 'template_ad'); }
52
+ function wp_insert_ad_template_18_HTML() { wp_insert_ad_HTML('18', 'template_ad'); }
53
+ function wp_insert_ad_template_19_HTML() { wp_insert_ad_HTML('19', 'template_ad'); }
54
+ function wp_insert_ad_template_20_HTML() { wp_insert_ad_HTML('20', 'template_ad'); }
55
+ ?>
includes/adwidgets.php CHANGED
@@ -1,19 +1,57 @@
1
  <?php
2
  function wp_insert_ad_widget_create($widgetID, $args) {
3
  extract($args);
 
 
4
  $page_details = wp_insert_get_current_page_details();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  if(!get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_home') && ($page_details == 'HOME')) {
6
  $title = get_option('wp_insert_ad_widget_'.$widgetID.'_title');
7
  echo $before_widget;
8
  if($title != "") { echo $before_title.$title.$after_title; }
9
- echo get_option('wp_insert_ad_widget_'.$widgetID.'_content');
 
 
 
 
 
 
 
 
 
 
10
  echo $after_widget;
11
  }
12
  else if(!get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
13
  $title = get_option('wp_insert_ad_widget_'.$widgetID.'_title');
14
  echo $before_widget;
15
  if($title != "") { echo $before_title.$title.$after_title; }
16
- echo get_option('wp_insert_ad_widget_'.$widgetID.'_content');
 
 
 
 
 
 
 
 
 
 
17
  echo $after_widget;
18
  }
19
  else {
@@ -23,7 +61,17 @@ function wp_insert_ad_widget_create($widgetID, $args) {
23
  $title = get_option('wp_insert_ad_widget_'.$widgetID.'_title');
24
  echo $before_widget;
25
  if($title != "") { echo $before_title.$title.$after_title; }
26
- echo get_option('wp_insert_ad_widget_'.$widgetID.'_content');
 
 
 
 
 
 
 
 
 
 
27
  echo $after_widget;
28
  }
29
  }
1
  <?php
2
  function wp_insert_ad_widget_create($widgetID, $args) {
3
  extract($args);
4
+
5
+ global $random;
6
  $page_details = wp_insert_get_current_page_details();
7
+
8
+ switch($random) {
9
+ case 0:
10
+ if(get_option('wp_insert_ad_widget_'.$widgetID.'_content') == '' ) { return ''; }
11
+ break;
12
+ case 1:
13
+ if(get_option('wp_insert_ad_widget_'.$widgetID.'_content_1') == '' ) { return ''; }
14
+ break;
15
+ case 2:
16
+ if(get_option('wp_insert_ad_widget_'.$widgetID.'_content_2') == '' ) { return ''; }
17
+ break;
18
+ }
19
+
20
+ $ad_style = get_option('wp_insert_ad_widget_'.$widgetID.'_style');
21
+ if($ad_style == '') { $ad_style = 'margin: 5px; padding: 0px;'; }
22
+
23
  if(!get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_home') && ($page_details == 'HOME')) {
24
  $title = get_option('wp_insert_ad_widget_'.$widgetID.'_title');
25
  echo $before_widget;
26
  if($title != "") { echo $before_title.$title.$after_title; }
27
+ switch($random) {
28
+ case 0:
29
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content').'</div>';
30
+ break;
31
+ case 1:
32
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content_1').'</div>';
33
+ break;
34
+ case 2:
35
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content_2').'</div>';
36
+ break;
37
+ }
38
  echo $after_widget;
39
  }
40
  else if(!get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
41
  $title = get_option('wp_insert_ad_widget_'.$widgetID.'_title');
42
  echo $before_widget;
43
  if($title != "") { echo $before_title.$title.$after_title; }
44
+ switch($random) {
45
+ case 0:
46
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content').'</div>';
47
+ break;
48
+ case 1:
49
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content_1').'</div>';
50
+ break;
51
+ case 2:
52
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content_2').'</div>';
53
+ break;
54
+ }
55
  echo $after_widget;
56
  }
57
  else {
61
  $title = get_option('wp_insert_ad_widget_'.$widgetID.'_title');
62
  echo $before_widget;
63
  if($title != "") { echo $before_title.$title.$after_title; }
64
+ switch($random) {
65
+ case 0:
66
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content').'</div>';
67
+ break;
68
+ case 1:
69
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content_1').'</div>';
70
+ break;
71
+ case 2:
72
+ echo '<div id="ad_widget_'.$widgetID.'" style="'.$ad_style.'">'.get_option('wp_insert_ad_widget_'.$widgetID.'_content_2').'</div>';
73
+ break;
74
+ }
75
  echo $after_widget;
76
  }
77
  }
includes/essentials.php CHANGED
@@ -16,7 +16,6 @@ if ( ! defined( 'WP_PLUGIN_DIR' ) )
16
  define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
17
 
18
  add_action('admin_menu', 'smart_add_menu');
19
- //wp_register_script('checkboxToSlider', WP_PLUGIN_URL.'/wp-insert/js/jquery.checkboxToSlider.js', array( 'jquery' ));
20
 
21
  function screen_layout_columns($columns, $screen) {
22
  $columns[$screen] = 2;
@@ -32,6 +31,12 @@ function on_screen_layout_columns($columns, $screen) {
32
  return $columns;
33
  }*/
34
 
 
 
 
 
 
 
35
  function wp_insert_get_current_page_details() {
36
  if(is_home()) return 'HOME';
37
  else if(is_archive()) return 'ARCHIVE';
@@ -53,7 +58,18 @@ function wp_insert_is_in_array($inputString, $inputArray) {
53
  return 'FALSE';
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
56
  require_once (dirname(__FILE__) . '/widgethook.php');
57
  require_once (dirname(__FILE__) . '/contenthook.php');
58
  require_once (dirname(__FILE__) . '/ads.php');
 
59
  ?>
16
  define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' );
17
 
18
  add_action('admin_menu', 'smart_add_menu');
 
19
 
20
  function screen_layout_columns($columns, $screen) {
21
  $columns[$screen] = 2;
31
  return $columns;
32
  }*/
33
 
34
+ function wp_insert_admin_register_head() {
35
+ echo "<link rel='stylesheet' type='text/css' href='".WP_PLUGIN_URL.'/wp-insert/css/adminStyle.css'."' /><!--[if IE 6]><link rel='stylesheet' type='text/css' href='".WP_PLUGIN_URL.'/wp-insert/css/IE6adminStyle.css'."' /><![endif]-->\n";
36
+ }
37
+ add_action('admin_head', 'wp_insert_admin_register_head');
38
+
39
+
40
  function wp_insert_get_current_page_details() {
41
  if(is_home()) return 'HOME';
42
  else if(is_archive()) return 'ARCHIVE';
58
  return 'FALSE';
59
  }
60
 
61
+ $random = 0;
62
+ switch(get_option('wp_insert_multiple_ad_network_type')) {
63
+ case "All Ad Networks":
64
+ $random = rand(0,2);
65
+ break;
66
+ case "Primary and Alternate Ad Network 1":
67
+ $random = rand(0,1);
68
+ break;
69
+ }
70
+
71
  require_once (dirname(__FILE__) . '/widgethook.php');
72
  require_once (dirname(__FILE__) . '/contenthook.php');
73
  require_once (dirname(__FILE__) . '/ads.php');
74
+ require_once (dirname(__FILE__) . '/adsadvanced.php');
75
  ?>
includes/inpostads.php CHANGED
@@ -1,13 +1,4 @@
1
  <?php
2
- $random = 0;
3
- switch(get_option('wp_insert_multiple_ad_network_type')) {
4
- case "All Ad Networks":
5
- $random = rand(0,2);
6
- break;
7
- case "Primary and Alternate Ad Network 1":
8
- $random = rand(0,1);
9
- break;
10
- }
11
  function wp_insert_filter_content_ads($content, $ad_ID) {
12
  $output = '';
13
  global $random;
1
  <?php
 
 
 
 
 
 
 
 
 
2
  function wp_insert_filter_content_ads($content, $ad_ID) {
3
  $output = '';
4
  global $random;
includes/templateads.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function wp_template_ad($ad_ID) {
3
+ $output = '';
4
+ global $random;
5
+ $page_details = wp_insert_get_current_page_details();
6
+
7
+ if(get_option('wp_insert_template_ad_'.$ad_ID.'_enable')) {
8
+ $ad_style = get_option('wp_insert_template_ad_'.$ad_ID.'_style');
9
+ if($ad_style == '') { $ad_style = 'margin: 5px; padding: 0px;'; }
10
+ if(!get_option('wp_insert_template_ad_'.$ad_ID.'_exclude_home') && ($page_details == 'HOME')) {
11
+ switch($random) {
12
+ case 0:
13
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content').'</div>';
14
+ break;
15
+ case 1:
16
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content_1').'</div>';
17
+ break;
18
+ case 2:
19
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content_2').'</div>';
20
+ break;
21
+ }
22
+ }
23
+ else if(!get_option('wp_insert_template_ad_'.$ad_ID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
24
+ switch($random) {
25
+ case 0:
26
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content').'</div>';
27
+ break;
28
+ case 1:
29
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content_1').'</div>';
30
+ break;
31
+ case 2:
32
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content_2').'</div>';
33
+ break;
34
+ }
35
+ }
36
+ else {
37
+ if(is_singular()) {
38
+ $page_ids = explode(',', str_replace(" ", "", get_option('wp_insert_template_ad_'.$ad_ID.'_exclude_ids')));
39
+ if(wp_insert_is_in_array($page_details, $page_ids) =='FALSE') {
40
+ switch($random) {
41
+ case 0:
42
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content').'</div>';
43
+ break;
44
+ case 1:
45
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content_1').'</div>';
46
+ break;
47
+ case 2:
48
+ $output .= '<div id="template_ad_'.$ad_ID.'" style="'.$ad_style.'">'.get_option('wp_insert_template_ad_'.$ad_ID.'_content_2').'</div>';
49
+ break;
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ echo $output;
57
+ }
58
+ ?>
js/common.js CHANGED
@@ -24,12 +24,12 @@
24
  if(document.getElementById(adBox1).style.display == "block") {
25
  jQuery("#"+adBox1+"_button").animate({color: "red"}, 1500, "linear");
26
  jQuery("#"+adBox0+"_button").animate({color: "#2f9303"}, 1500, "linear");
27
- jQuery("#"+adBox1).animate({height: "0px"}, 500, "linear", function() { document.getElementById(adBox0).style.display = "block";jQuery("#"+adBox0).animate({height: "315px"}, 1000, "linear");document.getElementById(adBox1).style.display = "none"; } );
28
  }
29
  else {
30
  jQuery("#"+adBox2+"_button").animate({color: "red"}, 1500, "linear");
31
  jQuery("#"+adBox0+"_button").animate({color: "#2f9303"}, 1500, "linear");
32
- jQuery("#"+adBox2).animate({height: "0px"}, 500, "linear", function() { document.getElementById(adBox0).style.display = "block";jQuery("#"+adBox0).animate({height: "315px"}, 1000, "linear");document.getElementById(adBox2).style.display = "none"; } );
33
  }
34
  }
35
  }
24
  if(document.getElementById(adBox1).style.display == "block") {
25
  jQuery("#"+adBox1+"_button").animate({color: "red"}, 1500, "linear");
26
  jQuery("#"+adBox0+"_button").animate({color: "#2f9303"}, 1500, "linear");
27
+ jQuery("#"+adBox1).animate({height: "0px"}, 500, "linear", function() { document.getElementById(adBox0).style.display = "block";jQuery("#"+adBox0).animate({height: "200px"}, 1000, "linear");document.getElementById(adBox1).style.display = "none"; } );
28
  }
29
  else {
30
  jQuery("#"+adBox2+"_button").animate({color: "red"}, 1500, "linear");
31
  jQuery("#"+adBox0+"_button").animate({color: "#2f9303"}, 1500, "linear");
32
+ jQuery("#"+adBox2).animate({height: "0px"}, 500, "linear", function() { document.getElementById(adBox0).style.display = "block";jQuery("#"+adBox0).animate({height: "200px"}, 1000, "linear");document.getElementById(adBox2).style.display = "none"; } );
33
  }
34
  }
35
  }
readme.txt CHANGED
@@ -1,72 +1,100 @@
1
- === Plugin Name ===
2
- Contributors: Namith Jawahar
3
- Donate link: http://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,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
5
  Requires at least: 2.7
6
  Tested up to: 2.8.6
7
- Stable tag: 1.4
8
 
9
- WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
10
 
11
  == Description ==
12
- <b>WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin</b><br/>
13
- <br/>
14
- Features<br/>
15
- <br/>
16
- Manage Ads (Completely Rewritten with a New and Powerful Interface)<br/>
17
- <b>This plugin no longer uses tables to set the layout which caused problems with some themes.</b><br/>
18
- (Give the New Ad Manager a try)
19
- In post ads - Allows you to insert your ads around and inside your content<br/>
20
- * Insert Ads above the content <br/>
21
- * Insert Ads below the content <br/>
22
- * Insert Ads in the middle of the content (Automatically adjusts to the length of content eliminating ads on short posts)<br/>
23
- * Insert Ads to the left of the post <br/>
24
- * Insert ads to the right of the post <br/>
25
- * Option to show/hide ads on Home Page<br/>
26
- * Option to show/hide ads on Archive/Category/Tag Pages<br/>
27
- * Option to fiter ads from specified posts/pages (With Popup picker for selecting the posts / pages)<br/>
28
- * Option to control each and every ad<br/>
29
- Ten ad widgets at your disposal <br/>
30
- * Go to the widgets page under "Appearance" and place the widgets onto the sidebars you want the ads to appear onto <br/>
31
- * Option to style the Ads <br/>
32
- * <b>Multiple Ad Network Support.</b> (You can now run any ad-network along with adsense or any other network)<br/>
33
- * Support for upto three different Ad networks all delivering at the same time<br/>
34
- <br/>
35
- <br/>
36
- Manage Feeds<br/>
37
- * Your logo in your feeds <br/>
38
- * Insert Ads into feeds <br/>
39
- * Link your feeds to feedburner <br/>
40
- * Subscribe via Email widget <br/>
41
- * Subscribe to feed widget<br/>
42
- <br/>
43
- <br/>
44
- Manage Tracking Codes<br/>
45
- * Insert Google Analytics tracking onto all you blog pages instantly <br/>
46
- * Paste other tracking code into the header or footer of your blog <br/>
47
- <br/>
48
- <br/>
49
- Manage WYSIWYG editing<br/>
50
- * Replace TINY MCE with FCK EDITOR <br/>
51
- * Disable auto formatting done by wordpress (Stops the annoying autoformatting done by wordpress. You can now write your posts as you intented to write it. Also allowa you to paste in javascript etc easily into your posts/pages)<br/>
52
- * WYSIWYG Category description Editor <br/>
53
- * WYSIWYG Excerpt Editor <br/>
54
- <br/>
55
- <br/>
56
- Syntax Highlighting<br/>
57
- * Syntax HighLighting for theme editor <br/>
58
- * Syntax Highlighting fr plugin editor<br/>
59
- * Different highlighting for different file types <br/>
60
- <br/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  == Installation ==
62
 
63
- This section describes how to install the plugin and get it working.
 
 
 
 
64
 
65
- e.g.
 
 
 
 
 
 
66
 
67
- 1. Upload 'wp-insert' folder to the '/wp-content/plugins/' directory
68
- 1. Activate the plugin through the 'Plugins' menu in WordPress
69
- 1. Go to the wp-insert menu to configure
70
 
71
  == Frequently Asked Questions ==
72
 
 
 
 
 
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,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.8.6
7
+ Stable tag: 1.5.0
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
 
11
  == Description ==
12
+
13
+ **WP-INSERT by <a href="http://www.smartlogix.co.in/" target="_self" title="Smart Logix">Smart Logix</a> : The ultimate wordpress plugin**
14
+ Wp-Insert is the most powerful yet easiest to use wordpress ad management plugin which does a lot more than ad management.
15
+ Wp-Insert can manage your feeds, google analytics, blog editing and even make editing your themes easier for you.
16
+ All from within a well contained and easy to use interface.
17
+ **Features**
18
+ Manage Ads (Completely Rewritten with a New and Powerful Interface)
19
+ **Multiple Ad Network Support.** (You can now run any ad-network along with adsense or any other network)
20
+ (Give the New Ad Manager a try)
21
+ *In post ads - Allows you to insert your ads around and inside your content*
22
+
23
+ * Allows copy/past of html, adsense and other ads code
24
+ * Insert Ads above the content
25
+ * Insert Ads below the content
26
+ * Insert Ads in the middle of the content (Automatically adjusts to the length of content eliminating ads on short posts)
27
+ * Insert Ads to the left of the post
28
+ * Insert ads to the right of the post
29
+ * Option to show/hide ads on Home Page
30
+ * Option to show/hide ads on Archive/Category/Tag Pages
31
+ * Option to fiter ads from specified posts/pages (With Popup picker for selecting the posts / pages)
32
+ * Option to control each and every ad
33
+
34
+ *10 ad widgets at your disposal*
35
+
36
+ * Go to the widgets page under "Appearance" and place the widgets onto the sidebars you want the ads to appear onto
37
+ * Option to style the Ads
38
+ * Support for upto three different Ad networks all delivering at the same time
39
+
40
+ *20 custom ad areas compatible with all themes.*
41
+
42
+ * Now insert Ads anywhere on your site.
43
+ * Indivigually control each ads.
44
+ * Try different ad sizes and positions easily.
45
+
46
+ Run adsense ads along with yahoo, adbrite, chitika or any other ad network without interfering with the terms of each network.
47
+
48
+ **Manage Feeds**
49
+
50
+ * Your logo in your feeds
51
+ * Insert Ads into feeds
52
+ * Link your feeds to feedburner (Experimental)
53
+ * Subscribe via Email widge
54
+ * Subscribe to feed widget
55
+
56
+ **Manage Tracking Codes**
57
+
58
+ * Insert Google Analytics tracking onto all you blog pages instantly
59
+ * Paste other tracking code into the header or footer of your blog
60
+
61
+ **Manage WYSIWYG editing**
62
+
63
+ * Replace TINY MCE with FCK EDITOR
64
+ * Disable auto formatting done by wordpress (Stops the annoying autoformatting done by wordpress. You can now write your posts as you intented to write it. Also allows you to paste in javascript etc easily into your posts/pages)
65
+ * WYSIWYG Category description Editor
66
+ * WYSIWYG Excerpt Editor
67
+
68
+ **Syntax Highlighting**
69
+
70
+ * Syntax HighLighting for theme editor
71
+ * Syntax Highlighting fr plugin editor
72
+ * Different highlighting for different file types
73
+
74
+ All these features in an easy to use and novice user friendly interface which can still cater to the geekiest of webmasters.
75
+
76
+
77
+
78
  == Installation ==
79
 
80
+ Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.
81
+
82
+
83
+
84
+ == Screenshots ==
85
 
86
+ 1. Wp-Insert in action.
87
+ 2. Wp-Insert in action.
88
+ 3. Wp-Insert in action.
89
+ 4. Wp-Insert in action.
90
+ 5. Wp-Insert in action.
91
+ 6. Wp-Insert in action.
92
+ 7. Wp-Insert in action.
93
 
 
 
 
94
 
95
  == Frequently Asked Questions ==
96
 
97
+ <a href="http://www.wp-insert.smartlogix.co.in/" target="_self" title="Wp-Insert Tutorial and Support Website">Wp-Insert Tutorial and Support Website</a>
98
+ <a href="http://www.smartlogix.co.in/" target="_self" title="Wp-Insert Developers">Wp-Insert Developers</a>
99
+ == Changelog ==
100
+ <a href="http://www.wp-insert.smartlogix.co.in/" target="_self" title="Wp-Insert Tutorial and Support Website">Wp-Insert Tutorial and Support Website</a>
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file
screenshot-3.png ADDED
Binary file
screenshot-4.png ADDED
Binary file
screenshot-5.png ADDED
Binary file
screenshot-6.png ADDED
Binary file
screenshot-7.png ADDED
Binary file
support/support.php CHANGED
@@ -13,7 +13,7 @@ You Might Also Like <a target="_blank" href="http://wordpress.org/extend/plugins
13
  </td>
14
  <td>
15
  <b>Think we have done a great job?</b><br/><a target="_blank" href="http://wordpress.org/extend/plugins/wp-insert/">Rate the plugin</a> or <a target="_blank" href="http://www.smartlogix.co.in/">Leave Us a Comment</a><br/>
16
- <b>List your BLOG for FREE in our </b><a target="_blank" href="http://www.getadvertisementshere.com">Directory</a></td>
17
  </tr>
18
  </table>
19
  <?php } ?>
13
  </td>
14
  <td>
15
  <b>Think we have done a great job?</b><br/><a target="_blank" href="http://wordpress.org/extend/plugins/wp-insert/">Rate the plugin</a> or <a target="_blank" href="http://www.smartlogix.co.in/">Leave Us a Comment</a><br/>
16
+ <b></b>Let us match your blog to your website : <a target="_blank" href="http://www.smartlogix.co.in/request-a-free-quote/">Request a Quote</a></td>
17
  </tr>
18
  </table>
19
  <?php } ?>
tracking/insert-analytics.php CHANGED
@@ -66,7 +66,7 @@ function smart_add_analytics() { ?>
66
  </p>
67
  </form>
68
  <p>
69
- <a href="http://www.smartlogix.co.in/"><img src="http://www.smartlogix.co.in/ads/random/rotate.php" border="0" /></a>
70
  </p>
71
  </div>
72
  <?php } ?>
66
  </p>
67
  </form>
68
  <p>
69
+ <script type="text/javascript" src="http://www.wp-insert.smartlogix.co.in/wp-content/plugins/wp-adnetwork/wp-adnetwork.php?showad=1"></script>
70
  </p>
71
  </div>
72
  <?php } ?>
wp-insert.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
  Plugin Name: wp-insert
4
- Plugin URI: http://www.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
- Version: 1.4
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
1
  <?php
2
  /*
3
  Plugin Name: wp-insert
4
+ Plugin URI: http://www.wp-insert.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
+ Version: 1.5.0
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
wysiwyg/insert-wysiwyg.php CHANGED
@@ -142,6 +142,6 @@ function smart_add_wysiwyg_pages() { ?>
142
  <p class="submit">
143
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
144
  </p>
145
- </form>
146
  </div>
147
  <?php } ?>
142
  <p class="submit">
143
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
144
  </p>
145
+ </form>
146
  </div>
147
  <?php } ?>