Wp-Insert - Version 1.3.0

Version Description

Download this release

Release Info

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

Code changes from version 1.2.2 to 1.3.0

Files changed (126) hide show
  1. ads/insert-ads.php +0 -177
  2. feeds/insert-feeds.php +3 -0
  3. highlighter/syntax.php +3 -0
  4. images/Smart-Logix-we-customize.jpg +0 -0
  5. images/feed-icon-24x24.gif +0 -0
  6. images/feedreaders/addbloglines.gif +0 -0
  7. images/feedreaders/addfeedster.gif +0 -0
  8. images/feedreaders/addgoogle.gif +0 -0
  9. images/feedreaders/addmyaol.gif +0 -0
  10. images/feedreaders/addmymsn.gif +0 -0
  11. images/feedreaders/addmyyahoo.gif +0 -0
  12. images/feedreaders/addnetvibes.gif +0 -0
  13. images/feedreaders/addnewsgator.gif +0 -0
  14. images/feedreaders/addpageflakes.gif +0 -0
  15. images/feedreaders/addpluck.gif +0 -0
  16. images/feedreaders/addrojo.gif +0 -0
  17. images/feedreaders/addwindowslive.gif +0 -0
  18. images/feedreaders/subscribe.gif +0 -0
  19. images/socialbookmarking/barrapunto.png +0 -0
  20. images/socialbookmarking/blinkbits.png +0 -0
  21. images/socialbookmarking/blinklist.png +0 -0
  22. images/socialbookmarking/blogmarks.png +0 -0
  23. images/socialbookmarking/blogmemes.png +0 -0
  24. images/socialbookmarking/blogospherenews.gif +0 -0
  25. images/socialbookmarking/blogsvine.png +0 -0
  26. images/socialbookmarking/blogter.png +0 -0
  27. images/socialbookmarking/bluedot.png +0 -0
  28. images/socialbookmarking/bookmarkhu.png +0 -0
  29. images/socialbookmarking/bumpzee.png +0 -0
  30. images/socialbookmarking/co.mments.gif +0 -0
  31. images/socialbookmarking/connotea.png +0 -0
  32. images/socialbookmarking/delicious.png +0 -0
  33. images/socialbookmarking/delirious.png +0 -0
  34. images/socialbookmarking/designfloat.gif +0 -0
  35. images/socialbookmarking/digg.png +0 -0
  36. images/socialbookmarking/dotnetkicks.png +0 -0
  37. images/socialbookmarking/dzone.png +0 -0
  38. images/socialbookmarking/ekudos.gif +0 -0
  39. images/socialbookmarking/email.gif +0 -0
  40. images/socialbookmarking/email.png +0 -0
  41. images/socialbookmarking/email_link.png +0 -0
  42. images/socialbookmarking/facebook.png +0 -0
  43. images/socialbookmarking/fark.png +0 -0
  44. images/socialbookmarking/feedmelinks.png +0 -0
  45. images/socialbookmarking/fleck.gif +0 -0
  46. images/socialbookmarking/furl.png +0 -0
  47. images/socialbookmarking/globalgrind.gif +0 -0
  48. images/socialbookmarking/googlebookmark.png +0 -0
  49. images/socialbookmarking/gwar.gif +0 -0
  50. images/socialbookmarking/haohao.png +0 -0
  51. images/socialbookmarking/healthranker.gif +0 -0
  52. images/socialbookmarking/hemidemi.png +0 -0
  53. images/socialbookmarking/im.png +0 -0
  54. images/socialbookmarking/indiagram.png +0 -0
  55. images/socialbookmarking/indianpad.png +0 -0
  56. images/socialbookmarking/kickit.png +0 -0
  57. images/socialbookmarking/kirtsy.gif +0 -0
  58. images/socialbookmarking/laaikit.png +0 -0
  59. images/socialbookmarking/linkagogo.png +0 -0
  60. images/socialbookmarking/linkarena.gif +0 -0
  61. images/socialbookmarking/linkedin.png +0 -0
  62. images/socialbookmarking/linkter.png +0 -0
  63. images/socialbookmarking/live.png +0 -0
  64. images/socialbookmarking/magnolia.png +0 -0
  65. images/socialbookmarking/meneame.gif +0 -0
  66. images/socialbookmarking/misterwong.gif +0 -0
  67. images/socialbookmarking/mixx.png +0 -0
  68. images/socialbookmarking/muti.png +0 -0
  69. images/socialbookmarking/myshare.png +0 -0
  70. images/socialbookmarking/n4g.gif +0 -0
  71. images/socialbookmarking/netvouz.png +0 -0
  72. images/socialbookmarking/newsvine.png +0 -0
  73. images/socialbookmarking/nujij.gif +0 -0
  74. images/socialbookmarking/plugim.png +0 -0
  75. images/socialbookmarking/popcurrent.png +0 -0
  76. images/socialbookmarking/pownce.gif +0 -0
  77. images/socialbookmarking/ppnow.png +0 -0
  78. images/socialbookmarking/print.gif +0 -0
  79. images/socialbookmarking/printer.png +0 -0
  80. images/socialbookmarking/propeller.gif +0 -0
  81. images/socialbookmarking/ratimarks.png +0 -0
  82. images/socialbookmarking/rawsugar.png +0 -0
  83. images/socialbookmarking/rec6.gif +0 -0
  84. images/socialbookmarking/reddit.png +0 -0
  85. images/socialbookmarking/salesmarks.gif +0 -0
  86. images/socialbookmarking/scoopeo.png +0 -0
  87. images/socialbookmarking/scuttle.png +0 -0
  88. images/socialbookmarking/segnalo.gif +0 -0
  89. images/socialbookmarking/shadows.png +0 -0
  90. images/socialbookmarking/simpy.png +0 -0
  91. images/socialbookmarking/slashdot.png +0 -0
  92. images/socialbookmarking/smarking.png +0 -0
  93. images/socialbookmarking/socialogs.gif +0 -0
  94. images/socialbookmarking/sphere.png +0 -0
  95. images/socialbookmarking/sphinn.png +0 -0
  96. images/socialbookmarking/spurl.png +0 -0
  97. images/socialbookmarking/stumbleupon.png +0 -0
  98. images/socialbookmarking/taggly.png +0 -0
  99. images/socialbookmarking/tailrank.png +0 -0
  100. images/socialbookmarking/technorati.png +0 -0
  101. images/socialbookmarking/thisnext.png +0 -0
  102. images/socialbookmarking/twitter.png +0 -0
  103. images/socialbookmarking/upnews.gif +0 -0
  104. images/socialbookmarking/webnews.gif +0 -0
  105. images/socialbookmarking/webride.png +0 -0
  106. images/socialbookmarking/wikio.gif +0 -0
  107. images/socialbookmarking/wists.png +0 -0
  108. images/socialbookmarking/wykop.gif +0 -0
  109. images/socialbookmarking/xerpi.gif +0 -0
  110. images/socialbookmarking/yahoomyweb.png +0 -0
  111. images/socialbookmarking/yiggit.png +0 -0
  112. includes/ads.php +174 -0
  113. includes/adwidgets.php +43 -0
  114. includes/contenthook.php +7 -0
  115. includes/essentials.php +59 -0
  116. includes/feeds.php +133 -0
  117. includes/inpostads.php +108 -0
  118. includes/tracking.php +133 -0
  119. includes/widgethook.php +18 -0
  120. js/common.js +17 -0
  121. js/jquery.qtip-1.0.0-rc3.min.js +15 -0
  122. readme.txt +13 -7
  123. support/support.php +8 -9
  124. tracking/insert-analytics.php +3 -0
  125. wp-insert.php +20 -15
  126. wysiwyg/insert-wysiwyg.php +1 -1
ads/insert-ads.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- // Hook for adding admin menus
3
- add_action("plugins_loaded", "register_ad_widgets");
4
-
5
- // Creating the dynamic widget for the widgets page
6
- function register_ad_widgets() {
7
- if(get_option('ad_widget_1_enable')) { register_sidebar_widget(__('Ad Widget : 1'), 'ad_widget_1_create'); }
8
- if(get_option('ad_widget_2_enable')) { register_sidebar_widget(__('Ad Widget : 2'), 'ad_widget_2_create'); }
9
- if(get_option('ad_widget_3_enable')) { register_sidebar_widget(__('Ad Widget : 3'), 'ad_widget_3_create'); }
10
- if(get_option('ad_widget_4_enable')) { register_sidebar_widget(__('Ad Widget : 4'), 'ad_widget_4_create'); }
11
- if(get_option('ad_widget_5_enable')) { register_sidebar_widget(__('Ad Widget : 5'), 'ad_widget_5_create'); }
12
- }
13
-
14
- function ad_widget_1_create($args) {
15
- extract($args);
16
- echo $before_widget;
17
- echo get_option('ad_widget_1');
18
- echo $after_widget;
19
- }
20
-
21
- function ad_widget_2_create($args) {
22
- extract($args);
23
- echo $before_widget;
24
- echo get_option('ad_widget_2');
25
- echo $after_widget;
26
- }
27
-
28
- function ad_widget_3_create($args) {
29
- extract($args);
30
- echo $before_widget;
31
- echo get_option('ad_widget_3');
32
- echo $after_widget;
33
- }
34
-
35
- function ad_widget_4_create($args) {
36
- extract($args);
37
- echo $before_widget;
38
- echo get_option('ad_widget_4');
39
- echo $after_widget;
40
- }
41
-
42
- function ad_widget_5_create($args) {
43
- extract($args);
44
- echo $before_widget;
45
- echo get_option('ad_widget_5');
46
- echo $after_widget;
47
- }
48
-
49
- // action function for adding the administrative page
50
- function smart_add_adspage() { ?>
51
- <div class="wrap">
52
- <h2>WP-INSERT : Manage Ads</h2>
53
- <?php show_support_options(); ?>
54
- <form method="post" action="options.php">
55
- <?php wp_nonce_field('update-options'); ?>
56
-
57
- <table class="form-table">
58
-
59
- <tr valign="top">
60
- <th scope="row"><b>In post ads</b></th>
61
- <td>Paste your ads below to make them appear automatically in your posts.</td>
62
- </tr>
63
-
64
- <tr valign="top">
65
- <th scope="row">Ad code to insert<br/><b>( Above the post )</b><br/>
66
- <br/><input id="ad_top_enable" name="ad_top_enable" type="checkbox" value="1"<?php if(get_option('ad_top_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
67
- <td><textarea id="ad_top" name="ad_top" style="width:350px;height:150px;"><?php echo get_option('ad_top'); ?></textarea><br/>
68
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
69
- </tr>
70
-
71
- <tr valign="top">
72
- <th scope="row">Ad code to insert<br/><b>( Below the post )</b><br/>
73
- <br/><input id="ad_bottom_enable" name="ad_bottom_enable" type="checkbox" value="1"<?php if(get_option('ad_bottom_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
74
- <td><textarea id="ad_bottom" name="ad_bottom" style="width:350px;height:150px;"><?php echo get_option('ad_bottom'); ?></textarea><br/>
75
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
76
- </tr>
77
-
78
- <tr valign="top">
79
- <th scope="row">Ad code to insert<br/><b>( Left of the post )</b><br/>
80
- <br/><input id="ad_left_enable" name="ad_left_enable" type="checkbox" value="1"<?php if(get_option('ad_left_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
81
- <td><textarea id="ad_left" name="ad_left" style="width:350px;height:150px;"><?php echo get_option('ad_left'); ?></textarea><br/>
82
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
83
- </tr>
84
-
85
- <tr valign="top">
86
- <th scope="row">Ad code to insert<br/><b>( Right of the post )</b><br/>
87
- <br/><input id="ad_right_enable" name="ad_right_enable" type="checkbox" value="1"<?php if(get_option('ad_right_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
88
- <td><textarea id="ad_right" name="ad_right" style="width:350px;height:150px;"><?php echo get_option('ad_right'); ?></textarea><br/>
89
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
90
- </tr>
91
-
92
- <tr valign="top">
93
- <th scope="row"></th>
94
- <td><input id="ad_enable_single" name="ad_enable_single" type="checkbox" value="1"<?php if(get_option('ad_enable_single')) echo ' checked="checked"'; ?>/> Show Ads only on single posts and pages<br/></td>
95
- </tr>
96
-
97
- <tr valign="top">
98
- <th scope="row"><b>Ad Widgets</b></th>
99
- <td>Paste your ads below and use the widgets section to insert the ads into your sidebar.</td>
100
- </tr>
101
-
102
- <tr valign="top">
103
- <th scope="row">Ad code to insert<br/><b>( Ad widget : 1 )</b><br/>
104
- <br/><input id="ad_widget_1_enable" name="ad_widget_1_enable" type="checkbox" value="1"<?php if(get_option('ad_widget_1_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
105
- <td><textarea id="ad_widget_1" name="ad_widget_1" style="width:350px;height:150px;"><?php echo get_option('ad_widget_1'); ?></textarea><br/>
106
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
107
- </tr>
108
-
109
- <tr valign="top">
110
- <th scope="row">Ad code to insert<br/><b>( Ad widget : 2 )</b><br/>
111
- <br/><input id="ad_widget_2_enable" name="ad_widget_2_enable" type="checkbox" value="1"<?php if(get_option('ad_widget_2_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
112
- <td><textarea id="ad_widget_2" name="ad_widget_2" style="width:350px;height:150px;"><?php echo get_option('ad_widget_2'); ?></textarea><br/>
113
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
114
- </tr>
115
-
116
- <tr valign="top">
117
- <th scope="row">Ad code to insert<br/><b>( Ad widget : 3 )</b><br/>
118
- <br/><input id="ad_widget_3_enable" name="ad_widget_3_enable" type="checkbox" value="1"<?php if(get_option('ad_widget_3_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
119
- <td><textarea id="ad_widget_3" name="ad_widget_3" style="width:350px;height:150px;"><?php echo get_option('ad_widget_3'); ?></textarea><br/>
120
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
121
- </tr>
122
-
123
- <tr valign="top">
124
- <th scope="row">Ad code to insert<br/><b>( Ad widget : 4 )</b><br/>
125
- <br/><input id="ad_widget_4_enable" name="ad_widget_4_enable" type="checkbox" value="1"<?php if(get_option('ad_widget_4_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
126
- <td><textarea id="ad_widget_4" name="ad_widget_4" style="width:350px;height:150px;"><?php echo get_option('ad_widget_4'); ?></textarea><br/>
127
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
128
- </tr>
129
-
130
- <tr valign="top">
131
- <th scope="row">Ad code to insert<br/><b>( Ad widget : 5 )</b><br/>
132
- <br/><input id="ad_widget_5_enable" name="ad_widget_5_enable" type="checkbox" value="1"<?php if(get_option('ad_widget_5_enable')) echo ' checked="checked"'; ?>/> Enabled</th>
133
- <td><textarea id="ad_widget_5" name="ad_widget_5" style="width:350px;height:150px;"><?php echo get_option('ad_widget_5'); ?></textarea><br/>
134
- <small>( Paste your ad-sense or similar code in the box above )</small></td>
135
- </tr>
136
-
137
- </table>
138
-
139
- <input type="hidden" name="action" value="update" />
140
- <input type="hidden" name="page_options" value="ad_top,ad_top_enable,ad_bottom,ad_bottom_enable,ad_left,ad_left_enable,ad_right,ad_right_enable,ad_enable_single,ad_widget_5_enable,ad_widget_4_enable,ad_widget_3_enable,ad_widget_2_enable,ad_widget_1_enable,ad_widget_5,ad_widget_4,ad_widget_3,ad_widget_2,ad_widget_1" />
141
- <p class="submit">
142
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
143
- </p>
144
- </form>
145
- </div>
146
- <?php }
147
- //Actual insertion of ads into content takes place here.
148
- add_filter('the_content', 'insert_into_content');
149
-
150
- function insert_into_content($content) {
151
- if(!is_singular() && get_option('ad_enable_single')) { return $content; }
152
- else {
153
- $output = '<table><tr>';
154
- if(get_option('ad_left_enable') && get_option('ad_right_enable')) {$cellspan=' colspan="3"';} else if(get_option('ad_left_enable') || get_option('ad_right_enable')) {$cellspan=' colspan="2"';} else {$cellspan='';}
155
-
156
- if(get_option('ad_top_enable')) {
157
-
158
- $output .= '<td'.$cellspan.' align="center">'.get_option('ad_top').'</td></tr><tr>';
159
- }
160
- if(get_option('ad_left_enable')) {
161
- $output .= '<td valign="top">'.get_option('ad_left').'</td>';
162
- }
163
-
164
- $output .= '<td>'.$content.'</td>';
165
-
166
- if(get_option('ad_right_enable')) {
167
- $output .= '<td valign="top">'.get_option('ad_right').'</td>';
168
- }
169
- if(get_option('ad_bottom_enable')) {
170
- $output .= '</tr><tr><td'.$cellspan.' align="center">'.get_option('ad_bottom').'</td>';
171
- }
172
-
173
- $output .= '</tr></table>';
174
- return $output;
175
- }
176
- }
177
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
feeds/insert-feeds.php CHANGED
@@ -164,5 +164,8 @@ function smart_add_feedspage() { ?>
164
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
165
  </p>
166
  </form>
 
 
 
167
  </div>
168
  <?php } ?>
164
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
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 } ?>
highlighter/syntax.php CHANGED
@@ -80,5 +80,8 @@ Syntax highlighting by codepress</td>
80
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
81
  </p>
82
  </form>
 
 
 
83
  </div>
84
  <?php } ?>
80
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
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 } ?>
images/Smart-Logix-we-customize.jpg DELETED
Binary file
images/feed-icon-24x24.gif DELETED
Binary file
images/feedreaders/addbloglines.gif DELETED
Binary file
images/feedreaders/addfeedster.gif DELETED
Binary file
images/feedreaders/addgoogle.gif DELETED
Binary file
images/feedreaders/addmyaol.gif DELETED
Binary file
images/feedreaders/addmymsn.gif DELETED
Binary file
images/feedreaders/addmyyahoo.gif DELETED
Binary file
images/feedreaders/addnetvibes.gif DELETED
Binary file
images/feedreaders/addnewsgator.gif DELETED
Binary file
images/feedreaders/addpageflakes.gif DELETED
Binary file
images/feedreaders/addpluck.gif DELETED
Binary file
images/feedreaders/addrojo.gif DELETED
Binary file
images/feedreaders/addwindowslive.gif DELETED
Binary file
images/feedreaders/subscribe.gif DELETED
Binary file
images/socialbookmarking/barrapunto.png DELETED
Binary file
images/socialbookmarking/blinkbits.png DELETED
Binary file
images/socialbookmarking/blinklist.png DELETED
Binary file
images/socialbookmarking/blogmarks.png DELETED
Binary file
images/socialbookmarking/blogmemes.png DELETED
Binary file
images/socialbookmarking/blogospherenews.gif DELETED
Binary file
images/socialbookmarking/blogsvine.png DELETED
Binary file
images/socialbookmarking/blogter.png DELETED
Binary file
images/socialbookmarking/bluedot.png DELETED
Binary file
images/socialbookmarking/bookmarkhu.png DELETED
Binary file
images/socialbookmarking/bumpzee.png DELETED
Binary file
images/socialbookmarking/co.mments.gif DELETED
Binary file
images/socialbookmarking/connotea.png DELETED
Binary file
images/socialbookmarking/delicious.png DELETED
Binary file
images/socialbookmarking/delirious.png DELETED
Binary file
images/socialbookmarking/designfloat.gif DELETED
Binary file
images/socialbookmarking/digg.png DELETED
Binary file
images/socialbookmarking/dotnetkicks.png DELETED
Binary file
images/socialbookmarking/dzone.png DELETED
Binary file
images/socialbookmarking/ekudos.gif DELETED
Binary file
images/socialbookmarking/email.gif DELETED
Binary file
images/socialbookmarking/email.png DELETED
Binary file
images/socialbookmarking/email_link.png DELETED
Binary file
images/socialbookmarking/facebook.png DELETED
Binary file
images/socialbookmarking/fark.png DELETED
Binary file
images/socialbookmarking/feedmelinks.png DELETED
Binary file
images/socialbookmarking/fleck.gif DELETED
Binary file
images/socialbookmarking/furl.png DELETED
Binary file
images/socialbookmarking/globalgrind.gif DELETED
Binary file
images/socialbookmarking/googlebookmark.png DELETED
Binary file
images/socialbookmarking/gwar.gif DELETED
Binary file
images/socialbookmarking/haohao.png DELETED
Binary file
images/socialbookmarking/healthranker.gif DELETED
Binary file
images/socialbookmarking/hemidemi.png DELETED
Binary file
images/socialbookmarking/im.png DELETED
Binary file
images/socialbookmarking/indiagram.png DELETED
Binary file
images/socialbookmarking/indianpad.png DELETED
Binary file
images/socialbookmarking/kickit.png DELETED
Binary file
images/socialbookmarking/kirtsy.gif DELETED
Binary file
images/socialbookmarking/laaikit.png DELETED
Binary file
images/socialbookmarking/linkagogo.png DELETED
Binary file
images/socialbookmarking/linkarena.gif DELETED
Binary file
images/socialbookmarking/linkedin.png DELETED
Binary file
images/socialbookmarking/linkter.png DELETED
Binary file
images/socialbookmarking/live.png DELETED
Binary file
images/socialbookmarking/magnolia.png DELETED
Binary file
images/socialbookmarking/meneame.gif DELETED
Binary file
images/socialbookmarking/misterwong.gif DELETED
Binary file
images/socialbookmarking/mixx.png DELETED
Binary file
images/socialbookmarking/muti.png DELETED
Binary file
images/socialbookmarking/myshare.png DELETED
Binary file
images/socialbookmarking/n4g.gif DELETED
Binary file
images/socialbookmarking/netvouz.png DELETED
Binary file
images/socialbookmarking/newsvine.png DELETED
Binary file
images/socialbookmarking/nujij.gif DELETED
Binary file
images/socialbookmarking/plugim.png DELETED
Binary file
images/socialbookmarking/popcurrent.png DELETED
Binary file
images/socialbookmarking/pownce.gif DELETED
Binary file
images/socialbookmarking/ppnow.png DELETED
Binary file
images/socialbookmarking/print.gif DELETED
Binary file
images/socialbookmarking/printer.png DELETED
Binary file
images/socialbookmarking/propeller.gif DELETED
Binary file
images/socialbookmarking/ratimarks.png DELETED
Binary file
images/socialbookmarking/rawsugar.png DELETED
Binary file
images/socialbookmarking/rec6.gif DELETED
Binary file
images/socialbookmarking/reddit.png DELETED
Binary file
images/socialbookmarking/salesmarks.gif DELETED
Binary file
images/socialbookmarking/scoopeo.png DELETED
Binary file
images/socialbookmarking/scuttle.png DELETED
Binary file
images/socialbookmarking/segnalo.gif DELETED
Binary file
images/socialbookmarking/shadows.png DELETED
Binary file
images/socialbookmarking/simpy.png DELETED
Binary file
images/socialbookmarking/slashdot.png DELETED
Binary file
images/socialbookmarking/smarking.png DELETED
Binary file
images/socialbookmarking/socialogs.gif DELETED
Binary file
images/socialbookmarking/sphere.png DELETED
Binary file
images/socialbookmarking/sphinn.png DELETED
Binary file
images/socialbookmarking/spurl.png DELETED
Binary file
images/socialbookmarking/stumbleupon.png DELETED
Binary file
images/socialbookmarking/taggly.png DELETED
Binary file
images/socialbookmarking/tailrank.png DELETED
Binary file
images/socialbookmarking/technorati.png DELETED
Binary file
images/socialbookmarking/thisnext.png DELETED
Binary file
images/socialbookmarking/twitter.png DELETED
Binary file
images/socialbookmarking/upnews.gif DELETED
Binary file
images/socialbookmarking/webnews.gif DELETED
Binary file
images/socialbookmarking/webride.png DELETED
Binary file
images/socialbookmarking/wikio.gif DELETED
Binary file
images/socialbookmarking/wists.png DELETED
Binary file
images/socialbookmarking/wykop.gif DELETED
Binary file
images/socialbookmarking/xerpi.gif DELETED
Binary file
images/socialbookmarking/yahoomyweb.png DELETED
Binary file
images/socialbookmarking/yiggit.png DELETED
Binary file
includes/ads.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ require_once (dirname(__FILE__) . '/adwidgets.php');
3
+ 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');
11
+ add_submenu_page(__FILE__, 'wp-insert', 'Syntax Highlighting', 8, 'Syntax Highlighting', 'smart_add_syntaxhighlighting_pages');
12
+ //add_submenu_page(__FILE__, 'wp-insert', 'Tracking Codes', 8, 'Manage Feeds', 'wp_insert_add_trackingpage');
13
+ //ensure, that the needed javascripts been loaded to allow drag/drop, expand/collapse and hide/show of boxes
14
+ wp_enqueue_script('common');
15
+ wp_enqueue_script('wp-lists');
16
+ wp_enqueue_script('postbox');
17
+ //$columns[$screen] = 2;
18
+ }
19
+
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_in_post_ad_top_1', 'Ad - Above Post Content', 'wp_insert_in_post_ad_top_1_HTML', 'inPostAds');
35
+ //add_meta_box('wp_insert_in_post_ad_top_2', 'Ad - Above Post Content : 2', 'wp_insert_in_post_ad_top_2_HTML', 'inPostAds');
36
+ add_meta_box('wp_insert_in_post_ad_bottom_1', 'Ad - Below Post Content', 'wp_insert_in_post_ad_bottom_1_HTML', 'inPostAds');
37
+ //add_meta_box('wp_insert_in_post_ad_bottom_2', 'Ad - Below Post Content : 2', 'wp_insert_in_post_ad_bottom_2_HTML', 'inPostAds');
38
+ add_meta_box('wp_insert_in_post_ad_left_1', 'Ad - Left of Post Content', 'wp_insert_in_post_ad_left_1_HTML', 'inPostAds');
39
+ //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');
40
+ add_meta_box('wp_insert_in_post_ad_right_1', 'Ad - Right of Post Content', 'wp_insert_in_post_ad_right_1_HTML', 'inPostAds');
41
+ //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');
42
+ add_meta_box('wp_insert_in_post_ad_middle_1', 'Ad - Middle of Post Content', 'wp_insert_in_post_ad_middle_1_HTML', 'inPostAds');
43
+ //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');
44
+ ?>
45
+ <div id="post_ads_container" class="wrap">
46
+ <?php screen_icon('options-general'); ?>
47
+ <h2>WP-INSERT : Manage Ads</h2>
48
+ <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>
49
+ <?php show_support_options(); ?>
50
+ <form method="post" action="options.php">
51
+ <?php
52
+ wp_nonce_field('update-options');
53
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
54
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
55
+ ?>
56
+ <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/js/common.js"></script>
57
+ <div id="poststuff" class="metabox-holder has-right-sidebar">
58
+ <div id="side-info-column" class="inner-sidebar">
59
+ <?php do_meta_boxes('adWidgets','advanced',null); ?>
60
+ </div>
61
+ <div id="post-body" class="has-sidebar">
62
+ <div id="post-body-content" class="has-sidebar-content">
63
+ <?php do_meta_boxes('inPostAds','advanced',null); ?>
64
+ <input type="hidden" name="action" value="update" />
65
+ <input type="hidden" name="page_options" value="<?php wp_insert_in_post_ad_parameters('middle_1'); wp_insert_in_post_ad_parameters('middle_2'); wp_insert_in_post_ad_parameters('right_1'); wp_insert_in_post_ad_parameters('right_2'); wp_insert_in_post_ad_parameters('left_1'); wp_insert_in_post_ad_parameters('left_2'); wp_insert_in_post_ad_parameters('bottom_1'); wp_insert_in_post_ad_parameters('bottom_2'); wp_insert_in_post_ad_parameters('top_1'); wp_insert_in_post_ad_parameters('top_2'); 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); ?>" />
66
+ <p class="submit">
67
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
68
+ </p>
69
+ <p>
70
+ <a href="http://www.smartlogix.co.in/"><img src="http://www.smartlogix.co.in/ads/random/rotate.php" border="0" /></a>
71
+ </p>
72
+ </div>
73
+ </div>
74
+ <br class="clear"/>
75
+ </div>
76
+ </form>
77
+ </div>
78
+ <script type="text/javascript">
79
+ //<![CDATA[
80
+ jQuery(document).ready( function($) {
81
+ // close postboxes that should be closed
82
+ jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
83
+ jQuery('.postbox').addClass('closed');
84
+ // postboxes setup
85
+ postboxes.add_postbox_toggles('wp-insert');
86
+ });
87
+ //]]>
88
+ </script>
89
+ </div>
90
+ <?php
91
+ }
92
+
93
+ function wp_insert_in_post_ad_parameters($in_post_adID) {
94
+ 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.'_exclude_ids,wp_insert_in_post_ad_'.$in_post_adID.'_exclude_home,wp_insert_in_post_ad_'.$in_post_adID.'_exclude_archives,';
95
+ }
96
+
97
+ function wp_insert_in_post_ad_HTML($in_post_adID) { ?>
98
+ <div>
99
+ <?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')"/>
100
+ <?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 } ?>
101
+ <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"'; ?> />
102
+ <p>
103
+ <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_content">Ad Code:</label>
104
+ <textarea 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>
105
+ </p>
106
+ <p>
107
+ <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_ids">Exclude On Posts/Pages:</label>
108
+ <input id="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_ids" 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"/>
109
+ </p>
110
+ <p>
111
+ <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_home">Exclude On Home Page:</label>
112
+ <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"'; ?> />
113
+ </p>
114
+ <p>
115
+ <label for="wp_insert_in_post_ad_<?php echo $in_post_adID; ?>_exclude_archives">Exclude On Archives Pages:</label>
116
+ <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"'; ?> />
117
+ </p>
118
+ </div>
119
+ <?php }
120
+
121
+ function wp_insert_in_post_ad_top_1_HTML() { wp_insert_in_post_ad_HTML("top_1"); }
122
+ //function wp_insert_in_post_ad_top_2_HTML() { wp_insert_in_post_ad_HTML("top_2"); }
123
+ function wp_insert_in_post_ad_bottom_1_HTML() { wp_insert_in_post_ad_HTML("bottom_1"); }
124
+ //function wp_insert_in_post_ad_bottom_2_HTML() { wp_insert_in_post_ad_HTML("bottom_2"); }
125
+ function wp_insert_in_post_ad_left_1_HTML() { wp_insert_in_post_ad_HTML("left_1"); }
126
+ //function wp_insert_in_post_ad_left_2_HTML() { wp_insert_in_post_ad_HTML("left_2"); }
127
+ function wp_insert_in_post_ad_right_1_HTML() { wp_insert_in_post_ad_HTML("right_1"); }
128
+ //function wp_insert_in_post_ad_right_2_HTML() { wp_insert_in_post_ad_HTML("right_2"); }
129
+ function wp_insert_in_post_ad_middle_1_HTML() { wp_insert_in_post_ad_HTML("middle_1"); }
130
+ //function wp_insert_in_post_ad_middle_2_HTML() { wp_insert_in_post_ad_HTML("middle_2"); }
131
+
132
+ function wp_insert_ad_widget_parameters($widgetID) {
133
+ 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,';
134
+ }
135
+
136
+ function ad_widget_HTML($widgetID) { ?>
137
+ <div>
138
+ <?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')"/>
139
+ <?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 } ?>
140
+ <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"'; ?> />
141
+ <p>
142
+ <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_title">Title:</label>
143
+ <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"/>
144
+ </p>
145
+ <p>
146
+ <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_content">Ad Code:</label>
147
+ <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>
148
+ </p>
149
+ <p>
150
+ <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_ids">Exclude On Posts/Pages:</label>
151
+ <input id="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_ids" 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"/>
152
+ </p>
153
+ <p>
154
+ <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_home">Exclude On Home Page:</label>
155
+ <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"'; ?> />
156
+ </p>
157
+ <p>
158
+ <label for="wp_insert_ad_widget_<?php echo $widgetID; ?>_exclude_archives">Exclude On Archives Pages:</label>
159
+ <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"'; ?> />
160
+ </p>
161
+ </div>
162
+ <?php }
163
+
164
+ function wp_insert_ad_widget_1_HTML() { ad_widget_HTML(1); }
165
+ function wp_insert_ad_widget_2_HTML() { ad_widget_HTML(2); }
166
+ function wp_insert_ad_widget_3_HTML() { ad_widget_HTML(3); }
167
+ function wp_insert_ad_widget_4_HTML() { ad_widget_HTML(4); }
168
+ function wp_insert_ad_widget_5_HTML() { ad_widget_HTML(5); }
169
+ function wp_insert_ad_widget_6_HTML() { ad_widget_HTML(6); }
170
+ function wp_insert_ad_widget_7_HTML() { ad_widget_HTML(7); }
171
+ function wp_insert_ad_widget_8_HTML() { ad_widget_HTML(8); }
172
+ function wp_insert_ad_widget_9_HTML() { ad_widget_HTML(9); }
173
+ function wp_insert_ad_widget_10_HTML() { ad_widget_HTML(10); }
174
+ ?>
includes/adwidgets.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 {
20
+ if(is_singular()) {
21
+ $page_ids = explode(',', str_replace(" ", "", get_option('wp_insert_ad_widget_'.$widgetID.'_exclude_ids')));
22
+ if(wp_insert_is_in_array($page_details, $page_ids) =='FALSE') {
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
+ }
30
+ }
31
+ }
32
+
33
+ function wp_insert_ad_widget_1_create($args) { wp_insert_ad_widget_create(1, $args); }
34
+ function wp_insert_ad_widget_2_create($args) { wp_insert_ad_widget_create(2, $args); }
35
+ function wp_insert_ad_widget_3_create($args) { wp_insert_ad_widget_create(3, $args); }
36
+ function wp_insert_ad_widget_4_create($args) { wp_insert_ad_widget_create(4, $args); }
37
+ function wp_insert_ad_widget_5_create($args) { wp_insert_ad_widget_create(5, $args); }
38
+ function wp_insert_ad_widget_6_create($args) { wp_insert_ad_widget_create(6, $args); }
39
+ function wp_insert_ad_widget_7_create($args) { wp_insert_ad_widget_create(7, $args); }
40
+ function wp_insert_ad_widget_8_create($args) { wp_insert_ad_widget_create(8, $args); }
41
+ function wp_insert_ad_widget_9_create($args) { wp_insert_ad_widget_create(9, $args); }
42
+ function wp_insert_ad_widget_10_create($args) { wp_insert_ad_widget_create(10, $args); }
43
+ ?>
includes/contenthook.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ add_filter('the_content', 'wp_insert_filter_content');
3
+
4
+ function wp_insert_filter_content($content) {
5
+ return wp_insert_filter_content_ads($content, '1');
6
+ }
7
+ ?>
includes/essentials.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //avoid direct calls to this file where wp core files not present
3
+ if (!function_exists ('add_action')) {
4
+ header('Status: 403 Forbidden');
5
+ header('HTTP/1.1 403 Forbidden');
6
+ exit();
7
+ }
8
+ // Pre-2.6 compatibility
9
+ if ( ! defined( 'WP_CONTENT_URL' ) )
10
+ define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' );
11
+ if ( ! defined( 'WP_CONTENT_DIR' ) )
12
+ define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
13
+ if ( ! defined( 'WP_PLUGIN_URL' ) )
14
+ define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' );
15
+ 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;
23
+ return $columns;
24
+ }
25
+
26
+ /*add_filter('screen_layout_columns', array(&$this, 'on_screen_layout_columns'), 10, 2);
27
+ //for WordPress 2.8 we have to tell, that we support 2 columns !
28
+ function on_screen_layout_columns($columns, $screen) {
29
+ if ($screen == $this->pagehook) {
30
+ $columns[$this->pagehook] = 2;
31
+ }
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';
38
+ else if(is_singular()) {
39
+ global $wp_query;
40
+ return $wp_query->post->ID;
41
+ }
42
+ else return 'NULL';
43
+ }
44
+
45
+ function wp_insert_is_in_array($inputString, $inputArray) {
46
+ foreach($inputArray as $arrayElements)
47
+ {
48
+ if($arrayElements == $inputString)
49
+ {
50
+ return 'TRUE';
51
+ }
52
+ }
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
+ ?>
includes/feeds.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function wp_insert_add_feedspage() {
3
+ global $screen_layout_columns;
4
+
5
+ add_meta_box('wp_insert_feed_logo', 'Logo for your Feed', 'wp_insert_feed_logo_HTML', 'feedLogo');
6
+ add_meta_box('wp_insert_subscribe_widget_1', 'Subscribe Widget : Type 1', 'wp_insert_subscribe_widget_1_HTML', 'subscribeWidgets');
7
+ add_meta_box('wp_insert_subscribe_widget_2', 'Subscribe Widget : Type 2', 'wp_insert_subscribe_widget_2_HTML', 'subscribeWidgets');
8
+ add_meta_box('wp_insert_subscribe_widget_3', 'Subscribe Widget : Type 3', 'wp_insert_subscribe_widget_3_HTML', 'subscribeWidgets');
9
+ add_meta_box('wp_insert_feed_ad_top', 'Ad - Above Feed Content', 'wp_insert_feed_ad_top_HTML', 'inFeedAds');
10
+ add_meta_box('wp_insert_feed_ad_bottom', 'Ad - Below Feed Content', 'wp_insert_feed_ad_bottom_HTML', 'inFeedAds');
11
+ add_meta_box('wp_insert_feed_feedburner', 'FeedBurner Feed URL', 'wp_insert_feed_feedburner_HTML', 'feedburner');
12
+ add_meta_box('wp_insert_feed_feedburner_email', 'FeedBurner - Subscribe via Email Widget', 'wp_insert_feed_feedburner_email_HTML', 'feedburner');
13
+ ?>
14
+ <div id="post_ads_container" class="wrap">
15
+ <?php screen_icon('options-general'); ?>
16
+ <h2>WP-INSERT : Manage Feeds</h2>
17
+ <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>
18
+ <form method="post" action="options.php">
19
+ <?php
20
+ wp_nonce_field('update-options');
21
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
22
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
23
+ ?>
24
+ <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/js/common.js"></script>
25
+ <div id="poststuff" class="metabox-holder has-right-sidebar">
26
+ <div id="side-info-column" class="inner-sidebar">
27
+ <?php do_meta_boxes('feedLogo','advanced',null); ?>
28
+ <?php do_meta_boxes('subscribeWidgets','advanced',null); ?>
29
+ </div>
30
+ <div id="post-body" class="has-sidebar">
31
+ <div id="post-body-content" class="has-sidebar-content">
32
+ <?php do_meta_boxes('inFeedAds','advanced',null); ?>
33
+ <?php do_meta_boxes('feedburner','advanced',null); ?>
34
+ <input type="hidden" name="action" value="update" />
35
+ <input type="hidden" name="page_options" value="" />
36
+ <p class="submit">
37
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
38
+ </p>
39
+ </div>
40
+ </div>
41
+ <br class="clear"/>
42
+
43
+ </div>
44
+ </form>
45
+ </div>
46
+ <script type="text/javascript">
47
+ //<![CDATA[
48
+ jQuery(document).ready( function($) {
49
+ // close postboxes that should be closed
50
+ jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
51
+ jQuery('.postbox').addClass('closed');
52
+ // postboxes setup
53
+ postboxes.add_postbox_toggles('wp-insert');
54
+ });
55
+ //]]>
56
+ </script>
57
+ </div>
58
+ <?php
59
+ }
60
+
61
+ function wp_insert_subscribe_widget_HTML($widgetID) { ?>
62
+ <div>
63
+ <?php if(get_option('wp_insert_feed_widget_'.$widgetID.'_enable')) { ?><input type="button" id="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button', '#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable')"/>
64
+ <?php } else { ?><input type="button" id="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button', '#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable')"/><?php } ?>
65
+ <input style="display:none;" id="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable" name="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_widget_'.$widgetID.'_enable')) echo ' checked="checked"'; ?> />
66
+ <p>
67
+ <label for="wp_insert_feed_widget_<?php echo $widgetID; ?>_title">Title:</label>
68
+ <input id="wp_insert_feed_widget_<?php echo $widgetID; ?>_title" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_widget_'.$widgetID.'_title'); ?>" name="wp_insert_feed_widget_<?php echo $widgetID; ?>_title"/>
69
+ </p>
70
+ </div>
71
+ <?php }
72
+
73
+ function wp_insert_subscribe_widget_1_HTML() { wp_insert_subscribe_widget_HTML(1); }
74
+ function wp_insert_subscribe_widget_2_HTML() { wp_insert_subscribe_widget_HTML(2); }
75
+ function wp_insert_subscribe_widget_3_HTML() { wp_insert_subscribe_widget_HTML(3); }
76
+
77
+ function wp_insert_feed_feedburner_email_HTML() { ?>
78
+ <div>
79
+ <?php if(get_option('wp_insert_feed_feedburner_email_enable')) { ?><input type="button" id="wp_insert_feed_feedburner_email_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_email_enable_button', '#wp_insert_feed_feedburner_email_enable')"/>
80
+ <?php } else { ?><input type="button" id="wp_insert_feed_feedburner_email_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_email_enable_button', '#wp_insert_feed_feedburner_email_enable')"/><?php } ?>
81
+ <input style="display:none;" id="wp_insert_feed_feedburner_email_enable" name="wp_insert_feed_feedburner_email_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_feedburner_email_enable')) echo ' checked="checked"'; ?> />
82
+ <p>
83
+ <label for="wp_insert_feed_feedburner_email_widget_code">Subscribe via Email Code:</label>
84
+ <textarea id="wp_insert_feed_feedburner_email_widget_code" class="widefat" name="wp_insert_feed_feedburner_email_widget_code" cols="20" rows="16"><?php echo get_option('wp_insert_feed_feedburner_email_widget_code'); ?></textarea></p>
85
+ </div>
86
+ <?php }
87
+
88
+ function wp_insert_feed_feedburner_HTML() { ?>
89
+ <div>
90
+ <?php if(get_option('wp_insert_feed_feedburner_enable')) { ?><input type="button" id="wp_insert_feed_feedburner_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_enable_button', '#wp_insert_feed_feedburner_enable')"/>
91
+ <?php } else { ?><input type="button" id="wp_insert_feed_feedburner_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_enable_button', '#wp_insert_feed_feedburner_enable')"/><?php } ?>
92
+ <input style="display:none;" id="wp_insert_feed_feedburner_enable" name="wp_insert_feed_feedburner_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_feedburner_enable')) echo ' checked="checked"'; ?> />
93
+ <p>
94
+ <label for="wp_insert_feed_feedburner_url">Logo URL:</label>
95
+ <input id="wp_insert_feed_feedburner_url" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_feedburner_url'); ?>" name="wp_insert_feed_feedburner_url"/>
96
+ </p>
97
+ </div>
98
+ <?php }
99
+
100
+ function wp_insert_feed_ad_HTML($feed_adID) { ?>
101
+ <div>
102
+ <?php if(get_option('wp_insert_feed_ad_'.$in_post_adID.'_enable')) { ?><input type="button" id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button', '#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable')"/>
103
+ <?php } else { ?><input type="button" id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button', '#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable')"/><?php } ?>
104
+ <input style="display:none;" id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable" name="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_ad_'.$in_post_adID.'_enable')) echo ' checked="checked"'; ?> />
105
+ <p>
106
+ <label for="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_content">Ad Code:</label>
107
+ <textarea id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_content" class="widefat" name="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_content" cols="20" rows="16"><?php echo get_option('wp_insert_feed_ad_'.$in_post_adID.'_content'); ?></textarea>
108
+ </p>
109
+ </div>
110
+ <?php }
111
+
112
+ function wp_insert_feed_ad_top_HTML() { wp_insert_feed_ad_HTML("top"); }
113
+ function wp_insert_feed_ad_bottom_HTML() { wp_insert_feed_ad_HTML("bottom"); }
114
+
115
+ function wp_insert_feed_logo_HTML() { ?>
116
+ <div>
117
+ <?php if(get_option('wp_insert_feed_logo_enable')) { ?><input type="button" id="wp_insert_feed_logo_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_logo_enable_button', '#wp_insert_feed_logo_enable')"/>
118
+ <?php } else { ?><input type="button" id="wp_insert_feed_logo_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_logo_enable_button', '#wp_insert_feed_logo_enable')"/><?php } ?>
119
+ <input style="display:none;" id="wp_insert_feed_logo_enable" name="wp_insert_feed_logo_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_logo_enable')) echo ' checked="checked"'; ?> />
120
+ <p>
121
+ <label for="wp_insert_feed_logo_url">Logo URL:</label>
122
+ <input id="wp_insert_feed_logo_url" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_logo_url'); ?>" name="wp_insert_feed_logo_url"/>
123
+ </p>
124
+ <p>
125
+ <label for="wp_insert_feed_logo_width">Logo width:</label>
126
+ <input id="wp_insert_feed_logo_width" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_logo_width'); ?>" name="wp_insert_feed_logo_width" />
127
+ </p>
128
+ <p>
129
+ <label for="wp_insert_feed_logo_height">Logo height:</label>
130
+ <input id="wp_insert_feed_logo_height" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_logo_height'); ?>" name="wp_insert_feed_logo_height"/>
131
+ </p>
132
+ </div>
133
+ <?php }
includes/inpostads.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function wp_insert_filter_content_ads($content, $ad_ID) {
3
+ $output = '';
4
+ $page_details = wp_insert_get_current_page_details();
5
+
6
+ if(get_option('wp_insert_in_post_ad_middle_'.$ad_ID.'_enable')) {
7
+ /*Finding a appropriate position near the middle of the content to insert the ad*/
8
+ $positions = array();
9
+ $endpos = -1;
10
+ $trigger = "<p";
11
+ if(strpos($content, "<p") === false)
12
+ $trigger = "<br";
13
+
14
+ while(strpos($content, $trigger, $endpos+1) !== false){
15
+ $endpos = strpos($content, $trigger, $endpos+1);
16
+ $positions[] = $endpos;
17
+ }
18
+ $middle = sizeof($positions);
19
+ while(sizeof($positions) > $middle)
20
+ array_pop($positions);
21
+ $triggerpoint = $positions[floor(sizeof($positions)/2)];
22
+ /*End of Finding a appropriate position near the middle of the content to insert the ad*/
23
+
24
+ if ($middle > 2) {
25
+ if(!get_option('wp_insert_in_post_ad_middle_'.$ad_ID.'_exclude_home') && ($page_details == 'HOME')) {
26
+ $content = substr_replace($content, '<div id="in_post_ad_middle_'.$ad_ID.'" style="margin:5px;">'.get_option('wp_insert_in_post_ad_middle_'.$ad_ID.'_content').'</div>'.$trigger, $triggerpoint, 2);
27
+ }
28
+ else if(!get_option('wp_insert_in_post_ad_middle_'.$ad_ID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
29
+ $content = substr_replace($content, '<div id="in_post_ad_middle_'.$ad_ID.'" style="margin:5px;">'.get_option('wp_insert_in_post_ad_middle_'.$ad_ID.'_content').'</div>'.$trigger, $triggerpoint, 2);
30
+ }
31
+ else {
32
+ if(is_singular()) {
33
+ $page_ids = explode(',', str_replace(" ", "", get_option('wp_insert_in_post_ad_middle_'.$ad_ID.'_exclude_ids')));
34
+ if(wp_insert_is_in_array($page_details, $page_ids) =='FALSE') {
35
+ $content = substr_replace($content, '<div id="in_post_ad_middle_'.$ad_ID.'" style="margin:5px;">'.get_option('wp_insert_in_post_ad_middle_'.$ad_ID.'_content').'</div>'.$trigger, $triggerpoint, 2);
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ if(get_option('wp_insert_in_post_ad_top_'.$ad_ID.'_enable')) {
42
+ if(!get_option('wp_insert_in_post_ad_top_'.$ad_ID.'_exclude_home') && ($page_details == 'HOME')) {
43
+ $output .= '<div id="in_post_ad_top_'.$ad_ID.'" style="margin:5px;">'.get_option('wp_insert_in_post_ad_top_'.$ad_ID.'_content').'</div>';
44
+ }
45
+ else if(!get_option('wp_insert_in_post_ad_top_'.$ad_ID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
46
+ $output .= '<div id="in_post_ad_top_'.$ad_ID.'" style="margin:5px;">'.get_option('wp_insert_in_post_ad_top_'.$ad_ID.'_content').'</div>';
47
+ }
48
+ else {
49
+ if(is_singular()) {
50
+ $page_ids = explode(',', str_replace(" ", "", get_option('wp_insert_in_post_ad_top_'.$ad_ID.'_exclude_ids')));
51
+ if(wp_insert_is_in_array($page_details, $page_ids) =='FALSE') {
52
+ $output .= '<div id="in_post_ad_top_'.$ad_ID.'" style="margin:5px;">'.get_option('wp_insert_in_post_ad_top_'.$ad_ID.'_content').'</div>';
53
+ }
54
+ }
55
+ }
56
+ }
57
+ if(get_option('wp_insert_in_post_ad_left_'.$ad_ID.'_enable')) {
58
+ if(!get_option('wp_insert_in_post_ad_left_'.$ad_ID.'_exclude_home') && ($page_details == 'HOME')) {
59
+ $output .= '<div id="in_post_ad_left_'.$ad_ID.'" style="margin:5px;float:left;">'.get_option('wp_insert_in_post_ad_left_'.$ad_ID.'_content').'</div>';
60
+ }
61
+ else if(!get_option('wp_insert_in_post_ad_left_'.$ad_ID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
62
+ $output .= '<div id="in_post_ad_left_'.$ad_ID.'" style="margin:5px;float:left;">'.get_option('wp_insert_in_post_ad_left_'.$ad_ID.'_content').'</div>';
63
+ }
64
+ else {
65
+ if(is_singular()) {
66
+ $page_ids = explode(',', str_replace(" ", "", get_option('wp_insert_in_post_ad_left_'.$ad_ID.'_exclude_ids')));
67
+ if(wp_insert_is_in_array($page_details, $page_ids) =='FALSE') {
68
+ $output .= '<div id="in_post_ad_left_'.$ad_ID.'" style="margin:5px;float:left;">'.get_option('wp_insert_in_post_ad_left_'.$ad_ID.'_content').'</div>';
69
+ }
70
+ }
71
+ }
72
+ }
73
+ if(get_option('wp_insert_in_post_ad_right_'.$ad_ID.'_enable')) {
74
+ if(!get_option('wp_insert_in_post_ad_right_'.$ad_ID.'_exclude_home') && ($page_details == 'HOME')) {
75
+ $output .= '<div id="in_post_ad_right_'.$ad_ID.'" style="margin:5px;float:right;">'.get_option('wp_insert_in_post_ad_right_'.$ad_ID.'_content').'</div>';
76
+ }
77
+ else if(!get_option('wp_insert_in_post_ad_right_'.$ad_ID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
78
+ $output .= '<div id="in_post_ad_right_'.$ad_ID.'" style="margin:5px;float:right;">'.get_option('wp_insert_in_post_ad_right_'.$ad_ID.'_content').'</div>';
79
+ }
80
+ else {
81
+ if(is_singular()) {
82
+ $page_ids = explode(',', str_replace(" ", "", get_option('wp_insert_in_post_ad_right_'.$ad_ID.'_exclude_ids')));
83
+ if(wp_insert_is_in_array($page_details, $page_ids) =='FALSE') {
84
+ $output .= '<div id="in_post_ad_right_'.$ad_ID.'" style="margin:5px;float:right;">'.get_option('wp_insert_in_post_ad_right_'.$ad_ID.'_content').'</div>';
85
+ }
86
+ }
87
+ }
88
+ }
89
+ if(get_option('wp_insert_in_post_ad_bottom_'.$ad_ID.'_enable')) {
90
+ if(!get_option('wp_insert_in_post_ad_bottom_'.$ad_ID.'_exclude_home') && ($page_details == 'HOME')) {
91
+ $content .= '<div id="in_post_ad_bottom_'.$ad_ID.'" style="margin:5px;clear:both;">'.get_option('wp_insert_in_post_ad_bottom_'.$ad_ID.'_content').'</div>';
92
+ }
93
+ else if(!get_option('wp_insert_in_post_ad_bottom_'.$ad_ID.'_exclude_archives') && ($page_details == 'ARCHIVE')) {
94
+ $content .= '<div id="in_post_ad_bottom_'.$ad_ID.'" style="margin:5px;clear:both;">'.get_option('wp_insert_in_post_ad_bottom_'.$ad_ID.'_content').'</div>';
95
+ }
96
+ else {
97
+ if(is_singular()) {
98
+ $page_ids = explode(',', str_replace(" ", "", get_option('wp_insert_in_post_ad_bottom_'.$ad_ID.'_exclude_ids')));
99
+ if(wp_insert_is_in_array($page_details, $page_ids) =='FALSE') {
100
+ $content .= '<div id="in_post_ad_bottom_'.$ad_ID.'" style="margin:5px;clear:both;">'.get_option('wp_insert_in_post_ad_bottom_'.$ad_ID.'_content').'</div>';
101
+ }
102
+ }
103
+ }
104
+ }
105
+ $content = $output.$content."<div style='clear:both'></div>";
106
+ return $content;
107
+ }
108
+ ?>
includes/tracking.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function wp_insert_add_trackingpage() {
3
+ global $screen_layout_columns;
4
+
5
+ add_meta_box('wp_insert_feed_logo', 'Logo for your Feed', 'wp_insert_feed_logo_HTML', 'feedLogo');
6
+ add_meta_box('wp_insert_subscribe_widget_1', 'Subscribe Widget : Type 1', 'wp_insert_subscribe_widget_1_HTML', 'subscribeWidgets');
7
+ add_meta_box('wp_insert_subscribe_widget_2', 'Subscribe Widget : Type 2', 'wp_insert_subscribe_widget_2_HTML', 'subscribeWidgets');
8
+ add_meta_box('wp_insert_subscribe_widget_3', 'Subscribe Widget : Type 3', 'wp_insert_subscribe_widget_3_HTML', 'subscribeWidgets');
9
+ add_meta_box('wp_insert_feed_ad_top', 'Ad - Above Feed Content', 'wp_insert_feed_ad_top_HTML', 'inFeedAds');
10
+ add_meta_box('wp_insert_feed_ad_bottom', 'Ad - Below Feed Content', 'wp_insert_feed_ad_bottom_HTML', 'inFeedAds');
11
+ add_meta_box('wp_insert_feed_feedburner', 'FeedBurner Feed URL', 'wp_insert_feed_feedburner_HTML', 'feedburner');
12
+ add_meta_box('wp_insert_feed_feedburner_email', 'FeedBurner - Subscribe via Email Widget', 'wp_insert_feed_feedburner_email_HTML', 'feedburner');
13
+ ?>
14
+ <div id="post_ads_container" class="wrap">
15
+ <?php screen_icon('options-general'); ?>
16
+ <h2>WP-INSERT : Manage Feeds</h2>
17
+ <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>
18
+ <form method="post" action="options.php">
19
+ <?php
20
+ wp_nonce_field('update-options');
21
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
22
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
23
+ ?>
24
+ <script type="text/javascript" src="<?php echo WP_PLUGIN_URL; ?>/wp-insert/js/common.js"></script>
25
+ <div id="poststuff" class="metabox-holder has-right-sidebar">
26
+ <div id="side-info-column" class="inner-sidebar">
27
+ <?php do_meta_boxes('feedLogo','advanced',null); ?>
28
+ <?php do_meta_boxes('subscribeWidgets','advanced',null); ?>
29
+ </div>
30
+ <div id="post-body" class="has-sidebar">
31
+ <div id="post-body-content" class="has-sidebar-content">
32
+ <?php do_meta_boxes('inFeedAds','advanced',null); ?>
33
+ <?php do_meta_boxes('feedburner','advanced',null); ?>
34
+ <input type="hidden" name="action" value="update" />
35
+ <input type="hidden" name="page_options" value="" />
36
+ <p class="submit">
37
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
38
+ </p>
39
+ </div>
40
+ </div>
41
+ <br class="clear"/>
42
+
43
+ </div>
44
+ </form>
45
+ </div>
46
+ <script type="text/javascript">
47
+ //<![CDATA[
48
+ jQuery(document).ready( function($) {
49
+ // close postboxes that should be closed
50
+ jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
51
+ jQuery('.postbox').addClass('closed');
52
+ // postboxes setup
53
+ postboxes.add_postbox_toggles('wp-insert');
54
+ });
55
+ //]]>
56
+ </script>
57
+ </div>
58
+ <?php
59
+ }
60
+
61
+ function wp_insert_subscribe_widget_HTML($widgetID) { ?>
62
+ <div>
63
+ <?php if(get_option('wp_insert_feed_widget_'.$widgetID.'_enable')) { ?><input type="button" id="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button', '#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable')"/>
64
+ <?php } else { ?><input type="button" id="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable_button', '#wp_insert_feed_widget_<?php echo $widgetID; ?>_enable')"/><?php } ?>
65
+ <input style="display:none;" id="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable" name="wp_insert_feed_widget_<?php echo $widgetID; ?>_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_widget_'.$widgetID.'_enable')) echo ' checked="checked"'; ?> />
66
+ <p>
67
+ <label for="wp_insert_feed_widget_<?php echo $widgetID; ?>_title">Title:</label>
68
+ <input id="wp_insert_feed_widget_<?php echo $widgetID; ?>_title" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_widget_'.$widgetID.'_title'); ?>" name="wp_insert_feed_widget_<?php echo $widgetID; ?>_title"/>
69
+ </p>
70
+ </div>
71
+ <?php }
72
+
73
+ function wp_insert_subscribe_widget_1_HTML() { wp_insert_subscribe_widget_HTML(1); }
74
+ function wp_insert_subscribe_widget_2_HTML() { wp_insert_subscribe_widget_HTML(2); }
75
+ function wp_insert_subscribe_widget_3_HTML() { wp_insert_subscribe_widget_HTML(3); }
76
+
77
+ function wp_insert_feed_feedburner_email_HTML() { ?>
78
+ <div>
79
+ <?php if(get_option('wp_insert_feed_feedburner_email_enable')) { ?><input type="button" id="wp_insert_feed_feedburner_email_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_email_enable_button', '#wp_insert_feed_feedburner_email_enable')"/>
80
+ <?php } else { ?><input type="button" id="wp_insert_feed_feedburner_email_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_email_enable_button', '#wp_insert_feed_feedburner_email_enable')"/><?php } ?>
81
+ <input style="display:none;" id="wp_insert_feed_feedburner_email_enable" name="wp_insert_feed_feedburner_email_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_feedburner_email_enable')) echo ' checked="checked"'; ?> />
82
+ <p>
83
+ <label for="wp_insert_feed_feedburner_email_widget_code">Subscribe via Email Code:</label>
84
+ <textarea id="wp_insert_feed_feedburner_email_widget_code" class="widefat" name="wp_insert_feed_feedburner_email_widget_code" cols="20" rows="16"><?php echo get_option('wp_insert_feed_feedburner_email_widget_code'); ?></textarea></p>
85
+ </div>
86
+ <?php }
87
+
88
+ function wp_insert_feed_feedburner_HTML() { ?>
89
+ <div>
90
+ <?php if(get_option('wp_insert_feed_feedburner_enable')) { ?><input type="button" id="wp_insert_feed_feedburner_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_enable_button', '#wp_insert_feed_feedburner_enable')"/>
91
+ <?php } else { ?><input type="button" id="wp_insert_feed_feedburner_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_feedburner_enable_button', '#wp_insert_feed_feedburner_enable')"/><?php } ?>
92
+ <input style="display:none;" id="wp_insert_feed_feedburner_enable" name="wp_insert_feed_feedburner_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_feedburner_enable')) echo ' checked="checked"'; ?> />
93
+ <p>
94
+ <label for="wp_insert_feed_feedburner_url">Logo URL:</label>
95
+ <input id="wp_insert_feed_feedburner_url" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_feedburner_url'); ?>" name="wp_insert_feed_feedburner_url"/>
96
+ </p>
97
+ </div>
98
+ <?php }
99
+
100
+ function wp_insert_feed_ad_HTML($feed_adID) { ?>
101
+ <div>
102
+ <?php if(get_option('wp_insert_feed_ad_'.$in_post_adID.'_enable')) { ?><input type="button" id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button', '#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable')"/>
103
+ <?php } else { ?><input type="button" id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable_button', '#wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable')"/><?php } ?>
104
+ <input style="display:none;" id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable" name="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_ad_'.$in_post_adID.'_enable')) echo ' checked="checked"'; ?> />
105
+ <p>
106
+ <label for="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_content">Ad Code:</label>
107
+ <textarea id="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_content" class="widefat" name="wp_insert_feed_ad_<?php echo $in_post_adID; ?>_content" cols="20" rows="16"><?php echo get_option('wp_insert_feed_ad_'.$in_post_adID.'_content'); ?></textarea>
108
+ </p>
109
+ </div>
110
+ <?php }
111
+
112
+ function wp_insert_feed_ad_top_HTML() { wp_insert_feed_ad_HTML("top"); }
113
+ function wp_insert_feed_ad_bottom_HTML() { wp_insert_feed_ad_HTML("bottom"); }
114
+
115
+ function wp_insert_feed_logo_HTML() { ?>
116
+ <div>
117
+ <?php if(get_option('wp_insert_feed_logo_enable')) { ?><input type="button" id="wp_insert_feed_logo_enable_button" value="Click to Deactivate" class="button" style="font-weight:bold;color:red;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_logo_enable_button', '#wp_insert_feed_logo_enable')"/>
118
+ <?php } else { ?><input type="button" id="wp_insert_feed_logo_enable_button" value="Click to Activate" class="button" style="font-weight:bold;color:#2f9303;" onclick="wpInsertToggleAdWidget('#wp_insert_feed_logo_enable_button', '#wp_insert_feed_logo_enable')"/><?php } ?>
119
+ <input style="display:none;" id="wp_insert_feed_logo_enable" name="wp_insert_feed_logo_enable" type="checkbox" value="1"<?php if(get_option('wp_insert_feed_logo_enable')) echo ' checked="checked"'; ?> />
120
+ <p>
121
+ <label for="wp_insert_feed_logo_url">Logo URL:</label>
122
+ <input id="wp_insert_feed_logo_url" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_logo_url'); ?>" name="wp_insert_feed_logo_url"/>
123
+ </p>
124
+ <p>
125
+ <label for="wp_insert_feed_logo_width">Logo width:</label>
126
+ <input id="wp_insert_feed_logo_width" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_logo_width'); ?>" name="wp_insert_feed_logo_width" />
127
+ </p>
128
+ <p>
129
+ <label for="wp_insert_feed_logo_height">Logo height:</label>
130
+ <input id="wp_insert_feed_logo_height" class="widefat" type="text" value="<?php echo get_option('wp_insert_feed_logo_height'); ?>" name="wp_insert_feed_logo_height"/>
131
+ </p>
132
+ </div>
133
+ <?php }
includes/widgethook.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ add_action("plugins_loaded", "wp_insert_register_widgets");
3
+
4
+ // Creating the dynamic widgets for the widgets page
5
+ function wp_insert_register_widgets() {
6
+ //Ad Widgets
7
+ if(get_option('wp_insert_ad_widget_1_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 1'), 'wp_insert_ad_widget_1_create'); }
8
+ if(get_option('wp_insert_ad_widget_2_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 2'), 'wp_insert_ad_widget_2_create'); }
9
+ if(get_option('wp_insert_ad_widget_3_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 3'), 'wp_insert_ad_widget_3_create'); }
10
+ if(get_option('wp_insert_ad_widget_4_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 4'), 'wp_insert_ad_widget_4_create'); }
11
+ if(get_option('wp_insert_ad_widget_5_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 5'), 'wp_insert_ad_widget_5_create'); }
12
+ if(get_option('wp_insert_ad_widget_6_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 6'), 'wp_insert_ad_widget_6_create'); }
13
+ if(get_option('wp_insert_ad_widget_7_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 7'), 'wp_insert_ad_widget_7_create'); }
14
+ if(get_option('wp_insert_ad_widget_8_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 8'), 'wp_insert_ad_widget_8_create'); }
15
+ if(get_option('wp_insert_ad_widget_9_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 9'), 'wp_insert_ad_widget_9_create'); }
16
+ if(get_option('wp_insert_ad_widget_10_enable')) { register_sidebar_widget(__('WP-INSERT : Ad Widget - 10'), 'wp_insert_ad_widget_10_create'); }
17
+ }
18
+ ?>
js/common.js ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function wpInsertToggleNotSavedAlert() {
2
+ document.getElementById("message").style.display = "block";
3
+ jQuery("#message").animate({opacity: 1, height: "100%"}, 1500);
4
+ }
5
+
6
+ function wpInsertToggleAdWidget(sender, pointerid) {
7
+ if(jQuery(sender).attr("value") == "Click to Activate") {
8
+ jQuery(pointerid).attr("checked", true);
9
+ jQuery(sender).animate({color: "red",}, 1500, "linear", function() { wpInsertToggleNotSavedAlert(); } );
10
+ jQuery(sender).attr("value", "Click to Deactivate");
11
+ }
12
+ else {
13
+ jQuery(pointerid).attr("checked", false);
14
+ jQuery(sender).animate({color: "#2f9303",}, 1500, "linear", function() { wpInsertToggleNotSavedAlert(); } );
15
+ jQuery(sender).attr("value", "Click to Activate");
16
+ }
17
+ }
js/jquery.qtip-1.0.0-rc3.min.js ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jquery.qtip. The jQuery tooltip plugin
3
+ *
4
+ * Copyright (c) 2009 Craig Thompson
5
+ * http://craigsworks.com
6
+ *
7
+ * Licensed under MIT
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * Launch : February 2009
11
+ * Version : 1.0.0-rc3
12
+ * Released: Tuesday 12th May, 2009 - 00:00
13
+ * Debug: jquery.qtip.debug.js
14
+ */
15
+ (function(f){f.fn.qtip=function(B,u){var y,t,A,s,x,w,v,z;if(typeof B=="string"){if(typeof f(this).data("qtip")!=="object"){f.fn.qtip.log.error.call(self,1,f.fn.qtip.constants.NO_TOOLTIP_PRESENT,false)}if(B=="api"){return f(this).data("qtip").interfaces[f(this).data("qtip").current]}else{if(B=="interfaces"){return f(this).data("qtip").interfaces}}}else{if(!B){B={}}if(typeof B.content!=="object"||(B.content.jquery&&B.content.length>0)){B.content={text:B.content}}if(typeof B.content.title!=="object"){B.content.title={text:B.content.title}}if(typeof B.position!=="object"){B.position={corner:B.position}}if(typeof B.position.corner!=="object"){B.position.corner={target:B.position.corner,tooltip:B.position.corner}}if(typeof B.show!=="object"){B.show={when:B.show}}if(typeof B.show.when!=="object"){B.show.when={event:B.show.when}}if(typeof B.show.effect!=="object"){B.show.effect={type:B.show.effect}}if(typeof B.hide!=="object"){B.hide={when:B.hide}}if(typeof B.hide.when!=="object"){B.hide.when={event:B.hide.when}}if(typeof B.hide.effect!=="object"){B.hide.effect={type:B.hide.effect}}if(typeof B.style!=="object"){B.style={name:B.style}}B.style=c(B.style);s=f.extend(true,{},f.fn.qtip.defaults,B);s.style=a.call({options:s},s.style);s.user=f.extend(true,{},B)}return f(this).each(function(){if(typeof B=="string"){w=B.toLowerCase();A=f(this).qtip("interfaces");if(typeof A=="object"){if(u===true&&w=="destroy"){while(A.length>0){A[A.length-1].destroy()}}else{if(u!==true){A=[f(this).qtip("api")]}for(y=0;y<A.length;y++){if(w=="destroy"){A[y].destroy()}else{if(A[y].status.rendered===true){if(w=="show"){A[y].show()}else{if(w=="hide"){A[y].hide()}else{if(w=="focus"){A[y].focus()}else{if(w=="disable"){A[y].disable(true)}else{if(w=="enable"){A[y].disable(false)}}}}}}}}}}}else{v=f.extend(true,{},s);v.hide.effect.length=s.hide.effect.length;v.show.effect.length=s.show.effect.length;if(v.position.container===false){v.position.container=f(document.body)}if(v.position.target===false){v.position.target=f(this)}if(v.show.when.target===false){v.show.when.target=f(this)}if(v.hide.when.target===false){v.hide.when.target=f(this)}t=f.fn.qtip.interfaces.length;for(y=0;y<t;y++){if(typeof f.fn.qtip.interfaces[y]=="undefined"){t=y;break}}x=new d(f(this),v,t);f.fn.qtip.interfaces[t]=x;if(typeof f(this).data("qtip")=="object"){if(typeof f(this).attr("qtip")==="undefined"){f(this).data("qtip").current=f(this).data("qtip").interfaces.length}f(this).data("qtip").interfaces.push(x)}else{f(this).data("qtip",{current:0,interfaces:[x]})}if(v.content.prerender===false&&v.show.when.event!==false&&v.show.ready!==true){v.show.when.target.bind(v.show.when.event+".qtip-"+t+"-create",{qtip:t},function(C){z=f.fn.qtip.interfaces[C.data.qtip];z.options.show.when.target.unbind(z.options.show.when.event+".qtip-"+C.data.qtip+"-create");z.cache.mouse={x:C.pageX,y:C.pageY};p.call(z);z.options.show.when.target.trigger(z.options.show.when.event)})}else{x.cache.mouse={x:v.show.when.target.offset().left,y:v.show.when.target.offset().top};p.call(x)}}})};function d(u,t,v){var s=this;s.id=v;s.options=t;s.status={animated:false,rendered:false,disabled:false,focused:false};s.elements={target:u.addClass(s.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};s.cache={mouse:{},position:{},toggle:0};s.timers={};f.extend(s,s.options.api,{show:function(y){var x,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show")}if(s.elements.tooltip.css("display")!=="none"){return s}s.elements.tooltip.stop(true,false);x=s.beforeShow.call(s,y);if(x===false){return s}function w(){if(s.options.position.type!=="static"){s.focus()}s.onShow.call(s,y);if(f.browser.msie){s.elements.tooltip.get(0).style.removeAttribute("filter")}}s.cache.toggle=1;if(s.options.position.type!=="static"){s.updatePosition(y,(s.options.show.effect.length>0))}if(typeof s.options.show.solo=="object"){z=f(s.options.show.solo)}else{if(s.options.show.solo===true){z=f("div.qtip").not(s.elements.tooltip)}}if(z){z.each(function(){if(f(this).qtip("api").status.rendered===true){f(this).qtip("api").hide()}})}if(typeof s.options.show.effect.type=="function"){s.options.show.effect.type.call(s.elements.tooltip,s.options.show.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.show.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeIn(s.options.show.effect.length,w);break;case"slide":s.elements.tooltip.slideDown(s.options.show.effect.length,function(){w();if(s.options.position.type!=="static"){s.updatePosition(y,true)}});break;case"grow":s.elements.tooltip.show(s.options.show.effect.length,w);break;default:s.elements.tooltip.show(null,w);break}s.elements.tooltip.addClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(y){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(s.elements.tooltip.css("display")==="none"){return s}}clearTimeout(s.timers.show);s.elements.tooltip.stop(true,false);x=s.beforeHide.call(s,y);if(x===false){return s}function w(){s.onHide.call(s,y)}s.cache.toggle=0;if(typeof s.options.hide.effect.type=="function"){s.options.hide.effect.type.call(s.elements.tooltip,s.options.hide.effect.length);s.elements.tooltip.queue(function(){w();f(this).dequeue()})}else{switch(s.options.hide.effect.type.toLowerCase()){case"fade":s.elements.tooltip.fadeOut(s.options.hide.effect.length,w);break;case"slide":s.elements.tooltip.slideUp(s.options.hide.effect.length,w);break;case"grow":s.elements.tooltip.hide(s.options.hide.effect.length,w);break;default:s.elements.tooltip.hide(null,w);break}s.elements.tooltip.removeClass(s.options.style.classes.active)}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(w,x){var C,G,L,J,H,E,y,I,B,D,K,A,F,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}}G={position:{left:0,top:0},dimensions:{height:0,width:0},corner:s.options.position.corner.target};L={position:s.getPosition(),dimensions:s.getDimensions(),corner:s.options.position.corner.tooltip};if(s.options.position.target!=="mouse"){if(s.options.position.target.get(0).nodeName.toLowerCase()=="area"){J=s.options.position.target.attr("coords").split(",");for(C=0;C<J.length;C++){J[C]=parseInt(J[C])}H=s.options.position.target.parent("map").attr("name");E=f('img[usemap="#'+H+'"]:first').offset();G.position={left:Math.floor(E.left+J[0]),top:Math.floor(E.top+J[1])};switch(s.options.position.target.attr("shape").toLowerCase()){case"rect":G.dimensions={width:Math.ceil(Math.abs(J[2]-J[0])),height:Math.ceil(Math.abs(J[3]-J[1]))};break;case"circle":G.dimensions={width:J[2]+1,height:J[2]+1};break;case"poly":G.dimensions={width:J[0],height:J[1]};for(C=0;C<J.length;C++){if(C%2==0){if(J[C]>G.dimensions.width){G.dimensions.width=J[C]}if(J[C]<J[0]){G.position.left=Math.floor(E.left+J[C])}}else{if(J[C]>G.dimensions.height){G.dimensions.height=J[C]}if(J[C]<J[1]){G.position.top=Math.floor(E.top+J[C])}}}G.dimensions.width=G.dimensions.width-(G.position.left-E.left);G.dimensions.height=G.dimensions.height-(G.position.top-E.top);break;default:return f.fn.qtip.log.error.call(s,4,f.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break}G.dimensions.width-=2;G.dimensions.height-=2}else{if(s.options.position.target.add(document.body).length===1){G.position={left:f(document).scrollLeft(),top:f(document).scrollTop()};G.dimensions={height:f(window).height(),width:f(window).width()}}else{if(typeof s.options.position.target.attr("qtip")!=="undefined"){G.position=s.options.position.target.qtip("api").cache.position}else{G.position=s.options.position.target.offset()}G.dimensions={height:s.options.position.target.outerHeight(),width:s.options.position.target.outerWidth()}}}y=f.extend({},G.position);if(G.corner.search(/right/i)!==-1){y.left+=G.dimensions.width}if(G.corner.search(/bottom/i)!==-1){y.top+=G.dimensions.height}if(G.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left+=(G.dimensions.width/2)}if(G.corner.search(/((left|right)Middle)|center/)!==-1){y.top+=(G.dimensions.height/2)}}else{G.position=y={left:s.cache.mouse.x,top:s.cache.mouse.y};G.dimensions={height:1,width:1}}if(L.corner.search(/right/i)!==-1){y.left-=L.dimensions.width}if(L.corner.search(/bottom/i)!==-1){y.top-=L.dimensions.height}if(L.corner.search(/((top|bottom)Middle)|center/)!==-1){y.left-=(L.dimensions.width/2)}if(L.corner.search(/((left|right)Middle)|center/)!==-1){y.top-=(L.dimensions.height/2)}I=(f.browser.msie)?1:0;B=(f.browser.msie&&parseInt(f.browser.version.charAt(0))===6)?1:0;if(s.options.style.border.radius>0){if(L.corner.search(/Left/)!==-1){y.left-=s.options.style.border.radius}else{if(L.corner.search(/Right/)!==-1){y.left+=s.options.style.border.radius}}if(L.corner.search(/Top/)!==-1){y.top-=s.options.style.border.radius}else{if(L.corner.search(/Bottom/)!==-1){y.top+=s.options.style.border.radius}}}if(I){if(L.corner.search(/top/)!==-1){y.top-=I}else{if(L.corner.search(/bottom/)!==-1){y.top+=I}}if(L.corner.search(/left/)!==-1){y.left-=I}else{if(L.corner.search(/right/)!==-1){y.left+=I}}if(L.corner.search(/leftMiddle|rightMiddle/)!==-1){y.top-=1}}if(s.options.position.adjust.screen===true){y=o.call(s,y,G,L)}if(s.options.position.target==="mouse"&&s.options.position.adjust.mouse===true){if(s.options.position.adjust.screen===true&&s.elements.tip){K=s.elements.tip.attr("rel")}else{K=s.options.position.corner.tooltip}y.left+=(K.search(/right/i)!==-1)?-6:6;y.top+=(K.search(/bottom/i)!==-1)?-6:6}if(!s.elements.bgiframe&&f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){f("select, object").each(function(){A=f(this).offset();A.bottom=A.top+f(this).height();A.right=A.left+f(this).width();if(y.top+L.dimensions.height>=A.top&&y.left+L.dimensions.width>=A.left){k.call(s)}})}y.left+=s.options.position.adjust.x;y.top+=s.options.position.adjust.y;F=s.getPosition();if(y.left!=F.left||y.top!=F.top){z=s.beforePositionUpdate.call(s,w);if(z===false){return s}s.cache.position=y;if(x===true){s.status.animated=true;s.elements.tooltip.animate(y,200,"swing",function(){s.status.animated=false})}else{s.elements.tooltip.css(y)}s.onPositionUpdate.call(s,w);if(typeof w!=="undefined"&&w.type&&w.type!=="mousemove"){f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return s},updateWidth:function(w){var x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(w&&typeof w!=="number"){return f.fn.qtip.log.error.call(s,2,"newWidth must be of type number","updateWidth")}}x=s.elements.contentWrapper.siblings().add(s.elements.tip).add(s.elements.button);if(!w){if(typeof s.options.style.width.value=="number"){w=s.options.style.width.value}else{s.elements.tooltip.css({width:"auto"});x.hide();if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"normal"})}w=s.getDimensions().width+1;if(!s.options.style.width.value){if(w>s.options.style.width.max){w=s.options.style.width.max}if(w<s.options.style.width.min){w=s.options.style.width.min}}}}if(w%2!==0){w-=1}s.elements.tooltip.width(w);x.show();if(s.options.style.border.radius){s.elements.tooltip.find(".qtip-betweenCorners").each(function(y){f(this).width(w-(s.options.style.border.radius*2))})}if(f.browser.msie){s.elements.wrapper.add(s.elements.contentWrapper.children()).css({zoom:"1"});s.elements.wrapper.width(w);if(s.elements.bgiframe){s.elements.bgiframe.width(w).height(s.getDimensions.height)}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(w){var z,A,x,y,B;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof w!=="string"||!f.fn.qtip.styles[w]){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}}s.options.style=a.call(s,f.fn.qtip.styles[w],s.options.user.style);s.elements.content.css(q(s.options.style));if(s.options.content.title.text!==false){s.elements.title.css(q(s.options.style.title,true))}s.elements.contentWrapper.css({borderColor:s.options.style.border.color});if(s.options.style.tip.corner!==false){if(f("<canvas>").get(0).getContext){z=s.elements.tooltip.find(".qtip-tip canvas:first");x=z.get(0).getContext("2d");x.clearRect(0,0,300,300);y=z.parent("div[rel]:first").attr("rel");B=b(y,s.options.style.tip.size.width,s.options.style.tip.size.height);h.call(s,z,B,s.options.style.tip.color||s.options.style.border.color)}else{if(f.browser.msie){z=s.elements.tooltip.find('.qtip-tip [nodeName="shape"]');z.attr("fillcolor",s.options.style.tip.color||s.options.style.border.color)}}}if(s.options.style.border.radius>0){s.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:s.options.style.border.color});if(f("<canvas>").get(0).getContext){A=g(s.options.style.border.radius);s.elements.tooltip.find(".qtip-wrapper canvas").each(function(){x=f(this).get(0).getContext("2d");x.clearRect(0,0,300,300);y=f(this).parent("div[rel]:first").attr("rel");r.call(s,f(this),A[y],s.options.style.border.radius,s.options.style.border.color)})}else{if(f.browser.msie){s.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){f(this).attr("fillcolor",s.options.style.border.color)})}}}return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(A,y){var z,x,w;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!A){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}}z=s.beforeContentUpdate.call(s,A);if(typeof z=="string"){A=z}else{if(z===false){return}}if(f.browser.msie){s.elements.contentWrapper.children().css({zoom:"normal"})}if(A.jquery&&A.length>0){A.clone(true).appendTo(s.elements.content).show()}else{s.elements.content.html(A)}x=s.elements.content.find("img[complete=false]");if(x.length>0){w=0;x.each(function(C){f('<img src="'+f(this).attr("src")+'" />').load(function(){if(++w==x.length){B()}})})}else{B()}function B(){s.updateWidth();if(y!==false){if(s.options.position.type!=="static"){s.updatePosition(s.elements.tooltip.is(":visible"),true)}if(s.options.style.tip.corner!==false){n.call(s)}}}s.onContentUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(w,z,A){var y;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")}y=s.beforeContentLoad.call(s);if(y===false){return s}if(A=="post"){f.post(w,z,x)}else{f.get(w,z,x)}function x(B){s.onContentLoad.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");s.updateContent(B)}return s},updateTitle:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!w){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=s.beforeTitleUpdate.call(s);if(returned===false){return s}if(s.elements.button){s.elements.button=s.elements.button.clone(true)}s.elements.title.html(w);if(s.elements.button){s.elements.title.prepend(s.elements.button)}s.onTitleUpdate.call(s);return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(A){var y,x,w,z;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(s.options.position.type=="static"){return f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}}y=parseInt(s.elements.tooltip.css("z-index"));x=6000+f("div.qtip[qtip]").length-1;if(!s.status.focused&&y!==x){z=s.beforeFocus.call(s,A);if(z===false){return s}f("div.qtip[qtip]").not(s.elements.tooltip).each(function(){if(f(this).qtip("api").status.rendered===true){w=parseInt(f(this).css("z-index"));if(typeof w=="number"&&w>-1){f(this).css({zIndex:parseInt(f(this).css("z-index"))-1})}f(this).qtip("api").status.focused=false}});s.elements.tooltip.css({zIndex:x});s.status.focused=true;s.onFocus.call(s,A);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_FOCUSED,"focus")}return s},disable:function(w){if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")}if(w){if(!s.status.disabled){s.status.disabled=true;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DISABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(s.status.disabled){s.status.disabled=false;f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_ENABLED,"disable")}else{f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return s},destroy:function(){var w,x,y;x=s.beforeDestroy.call(s);if(x===false){return s}if(s.status.rendered){s.options.show.when.target.unbind("mousemove.qtip",s.updatePosition);s.options.show.when.target.unbind("mouseout.qtip",s.hide);s.options.show.when.target.unbind(s.options.show.when.event+".qtip");s.options.hide.when.target.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind(s.options.hide.when.event+".qtip");s.elements.tooltip.unbind("mouseover.qtip",s.focus);s.elements.tooltip.remove()}else{s.options.show.when.target.unbind(s.options.show.when.event+".qtip-create")}if(typeof s.elements.target.data("qtip")=="object"){y=s.elements.target.data("qtip").interfaces;if(typeof y=="object"&&y.length>0){for(w=0;w<y.length-1;w++){if(y[w].id==s.id){y.splice(w,1)}}}}delete f.fn.qtip.interfaces[s.id];if(typeof y=="object"&&y.length>0){s.elements.target.data("qtip").current=y.length-1}else{s.elements.target.removeData("qtip")}s.onDestroy.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_DESTROYED,"destroy");return s.elements.target},getPosition:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")}w=(s.elements.tooltip.css("display")!=="none")?false:true;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x=s.elements.tooltip.offset();if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x},getDimensions:function(){var w,x;if(!s.status.rendered){return f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}w=(!s.elements.tooltip.is(":visible"))?true:false;if(w){s.elements.tooltip.css({visiblity:"hidden"}).show()}x={height:s.elements.tooltip.outerHeight(),width:s.elements.tooltip.outerWidth()};if(w){s.elements.tooltip.css({visiblity:"visible"}).hide()}return x}})}function p(){var s,w,u,t,v,y,x;s=this;s.beforeRender.call(s);s.status.rendered=true;s.elements.tooltip='<div qtip="'+s.id+'" class="qtip '+(s.options.style.classes.tooltip||s.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+s.options.position.type+';"> <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;"> <div class="qtip-contentWrapper" style="overflow:hidden;"> <div class="qtip-content '+s.options.style.classes.content+'"></div></div></div></div>';s.elements.tooltip=f(s.elements.tooltip);s.elements.tooltip.appendTo(s.options.position.container);s.elements.tooltip.data("qtip",{current:0,interfaces:[s]});s.elements.wrapper=s.elements.tooltip.children("div:first");s.elements.contentWrapper=s.elements.wrapper.children("div:first").css({background:s.options.style.background});s.elements.content=s.elements.contentWrapper.children("div:first").css(q(s.options.style));if(f.browser.msie){s.elements.wrapper.add(s.elements.content).css({zoom:1})}if(s.options.hide.when.event=="unfocus"){s.elements.tooltip.attr("unfocus",true)}if(typeof s.options.style.width.value=="number"){s.updateWidth()}if(f("<canvas>").get(0).getContext||f.browser.msie){if(s.options.style.border.radius>0){m.call(s)}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color})}if(s.options.style.tip.corner!==false){e.call(s)}}else{s.elements.contentWrapper.css({border:s.options.style.border.width+"px solid "+s.options.style.border.color});s.options.style.border.radius=0;s.options.style.tip.corner=false;f.fn.qtip.log.error.call(s,2,f.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof s.options.content.text=="string"&&s.options.content.text.length>0)||(s.options.content.text.jquery&&s.options.content.text.length>0)){u=s.options.content.text}else{if(typeof s.elements.target.attr("title")=="string"&&s.elements.target.attr("title").length>0){u=s.elements.target.attr("title").replace("\\n","<br />");s.elements.target.attr("title","")}else{if(typeof s.elements.target.attr("alt")=="string"&&s.elements.target.attr("alt").length>0){u=s.elements.target.attr("alt").replace("\\n","<br />");s.elements.target.attr("alt","")}else{u=" ";f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.NO_VALID_CONTENT,"render")}}}if(s.options.content.title.text!==false){j.call(s)}s.updateContent(u);l.call(s);if(s.options.show.ready===true){s.show()}if(s.options.content.url!==false){t=s.options.content.url;v=s.options.content.data;y=s.options.content.method||"get";s.loadContent(t,v,y)}s.onRender.call(s);f.fn.qtip.log.error.call(s,1,f.fn.qtip.constants.EVENT_RENDERED,"render")}function m(){var F,z,t,B,x,E,u,G,D,y,w,C,A,s,v;F=this;F.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();t=F.options.style.border.width;B=F.options.style.border.radius;x=F.options.style.border.color||F.options.style.tip.color;E=g(B);u={};for(z in E){u[z]='<div rel="'+z+'" style="'+((z.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+B+"px; width:"+B+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(f("<canvas>").get(0).getContext){u[z]+='<canvas height="'+B+'" width="'+B+'" style="vertical-align: top"></canvas>'}else{if(f.browser.msie){G=B*2+3;u[z]+='<v:arc stroked="false" fillcolor="'+x+'" startangle="'+E[z][0]+'" endangle="'+E[z][1]+'" style="width:'+G+"px; height:"+G+"px; margin-top:"+((z.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((z.search(/Right/)!==-1)?E[z][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}u[z]+="</div>"}D=F.getDimensions().width-(Math.max(t,B)*2);y='<div class="qtip-betweenCorners" style="height:'+B+"px; width:"+D+"px; overflow:hidden; background-color:"+x+'; line-height:0.1px; font-size:1px;">';w='<div class="qtip-borderTop" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.topLeft+u.topRight+y;F.elements.wrapper.prepend(w);C='<div class="qtip-borderBottom" dir="ltr" style="height:'+B+"px; margin-left:"+B+'px; line-height:0.1px; font-size:1px; padding:0;">'+u.bottomLeft+u.bottomRight+y;F.elements.wrapper.append(C);if(f("<canvas>").get(0).getContext){F.elements.wrapper.find("canvas").each(function(){A=E[f(this).parent("[rel]:first").attr("rel")];r.call(F,f(this),A,B,x)})}else{if(f.browser.msie){F.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}s=Math.max(B,(B+(t-B)));v=Math.max(t-B,0);F.elements.contentWrapper.css({border:"0px solid "+x,borderWidth:v+"px "+s+"px"})}function r(u,w,s,t){var v=u.get(0).getContext("2d");v.fillStyle=t;v.beginPath();v.arc(w[0],w[1],s,0,Math.PI*2,false);v.fill()}function e(v){var t,s,x,u,w;t=this;if(t.elements.tip!==null){t.elements.tip.remove()}s=t.options.style.tip.color||t.options.style.border.color;if(t.options.style.tip.corner===false){return}else{if(!v){v=t.options.style.tip.corner}}x=b(v,t.options.style.tip.size.width,t.options.style.tip.size.height);t.elements.tip='<div class="'+t.options.style.classes.tip+'" dir="ltr" rel="'+v+'" style="position:absolute; height:'+t.options.style.tip.size.height+"px; width:"+t.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(f("<canvas>").get(0).getContext){t.elements.tip+='<canvas height="'+t.options.style.tip.size.height+'" width="'+t.options.style.tip.size.width+'"></canvas>'}else{if(f.browser.msie){u=t.options.style.tip.size.width+","+t.options.style.tip.size.height;w="m"+x[0][0]+","+x[0][1];w+=" l"+x[1][0]+","+x[1][1];w+=" "+x[2][0]+","+x[2][1];w+=" xe";t.elements.tip+='<v:shape fillcolor="'+s+'" stroked="false" filled="true" path="'+w+'" coordsize="'+u+'" style="width:'+t.options.style.tip.size.width+"px; height:"+t.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((v.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';t.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';t.elements.contentWrapper.css("position","relative")}}t.elements.tooltip.prepend(t.elements.tip+"</div>");t.elements.tip=t.elements.tooltip.find("."+t.options.style.classes.tip).eq(0);if(f("<canvas>").get(0).getContext){h.call(t,t.elements.tip.find("canvas:first"),x,s)}if(v.search(/top/)!==-1&&f.browser.msie&&parseInt(f.browser.version.charAt(0))===6){t.elements.tip.css({marginTop:-4})}n.call(t,v)}function h(t,v,s){var u=t.get(0).getContext("2d");u.fillStyle=s;u.beginPath();u.moveTo(v[0][0],v[0][1]);u.lineTo(v[1][0],v[1][1]);u.lineTo(v[2][0],v[2][1]);u.fill()}function n(u){var t,w,s,x,v;t=this;if(t.options.style.tip.corner===false||!t.elements.tip){return}if(!u){u=t.elements.tip.attr("rel")}w=positionAdjust=(f.browser.msie)?1:0;t.elements.tip.css(u.match(/left|right|top|bottom/)[0],0);if(u.search(/top|bottom/)!==-1){if(f.browser.msie){if(parseInt(f.browser.version.charAt(0))===6){positionAdjust=(u.search(/top/)!==-1)?-3:1}else{positionAdjust=(u.search(/top/)!==-1)?1:2}}if(u.search(/Middle/)!==-1){t.elements.tip.css({left:"50%",marginLeft:-(t.options.style.tip.size.width/2)})}else{if(u.search(/Left/)!==-1){t.elements.tip.css({left:t.options.style.border.radius-w})}else{if(u.search(/Right/)!==-1){t.elements.tip.css({right:t.options.style.border.radius+w})}}}if(u.search(/top/)!==-1){t.elements.tip.css({top:-positionAdjust})}else{t.elements.tip.css({bottom:positionAdjust})}}else{if(u.search(/left|right/)!==-1){if(f.browser.msie){positionAdjust=(parseInt(f.browser.version.charAt(0))===6)?1:((u.search(/left/)!==-1)?1:2)}if(u.search(/Middle/)!==-1){t.elements.tip.css({top:"50%",marginTop:-(t.options.style.tip.size.height/2)})}else{if(u.search(/Top/)!==-1){t.elements.tip.css({top:t.options.style.border.radius-w})}else{if(u.search(/Bottom/)!==-1){t.elements.tip.css({bottom:t.options.style.border.radius+w})}}}if(u.search(/left/)!==-1){t.elements.tip.css({left:-positionAdjust})}else{t.elements.tip.css({right:positionAdjust})}}}s="padding-"+u.match(/left|right|top|bottom/)[0];x=t.options.style.tip.size[(s.search(/left|right/)!==-1)?"width":"height"];t.elements.tooltip.css("padding",0);t.elements.tooltip.css(s,x);if(f.browser.msie&&parseInt(f.browser.version.charAt(0))==6){v=parseInt(t.elements.tip.css("margin-top"))||0;v+=parseInt(t.elements.content.css("margin-top"))||0;t.elements.tip.css({marginTop:v})}}function j(){var s=this;if(s.elements.title!==null){s.elements.title.remove()}s.elements.title=f('<div class="'+s.options.style.classes.title+'">').css(q(s.options.style.title,true)).css({zoom:(f.browser.msie)?1:0}).prependTo(s.elements.contentWrapper);if(s.options.content.title.text){s.updateTitle.call(s,s.options.content.title.text)}if(s.options.content.title.button!==false&&typeof s.options.content.title.button=="string"){s.elements.button=f('<a class="'+s.options.style.classes.button+'" style="float:right; position: relative"></a>').css(q(s.options.style.button,true)).html(s.options.content.title.button).prependTo(s.elements.title).click(function(t){if(!s.status.disabled){s.hide(t)}})}}function l(){var t,v,u,s;t=this;v=t.options.show.when.target;u=t.options.hide.when.target;if(t.options.hide.fixed){u=u.add(t.elements.tooltip)}if(t.options.hide.when.event=="inactive"){s=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function y(z){if(t.status.disabled===true){return}clearTimeout(t.timers.inactive);t.timers.inactive=setTimeout(function(){f(s).each(function(){u.unbind(this+".qtip-inactive");t.elements.content.unbind(this+".qtip-inactive")});t.hide(z)},t.options.hide.delay)}}else{if(t.options.hide.fixed===true){t.elements.tooltip.bind("mouseover.qtip",function(){if(t.status.disabled===true){return}clearTimeout(t.timers.hide)})}}function x(z){if(t.status.disabled===true){return}if(t.options.hide.when.event=="inactive"){f(s).each(function(){u.bind(this+".qtip-inactive",y);t.elements.content.bind(this+".qtip-inactive",y)});y()}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.timers.show=setTimeout(function(){t.show(z)},t.options.show.delay)}function w(z){if(t.status.disabled===true){return}if(t.options.hide.fixed===true&&t.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&f(z.relatedTarget).parents("div.qtip[qtip]").length>0){z.stopPropagation();z.preventDefault();clearTimeout(t.timers.hide);return false}clearTimeout(t.timers.show);clearTimeout(t.timers.hide);t.elements.tooltip.stop(true,true);t.timers.hide=setTimeout(function(){t.hide(z)},t.options.hide.delay)}if((t.options.show.when.target.add(t.options.hide.when.target).length===1&&t.options.show.when.event==t.options.hide.when.event&&t.options.hide.when.event!=="inactive")||t.options.hide.when.event=="unfocus"){t.cache.toggle=0;v.bind(t.options.show.when.event+".qtip",function(z){if(t.cache.toggle==0){x(z)}else{w(z)}})}else{v.bind(t.options.show.when.event+".qtip",x);if(t.options.hide.when.event!=="inactive"){u.bind(t.options.hide.when.event+".qtip",w)}}if(t.options.position.type.search(/(fixed|absolute)/)!==-1){t.elements.tooltip.bind("mouseover.qtip",t.focus)}if(t.options.position.target==="mouse"&&t.options.position.type!=="static"){v.bind("mousemove.qtip",function(z){t.cache.mouse={x:z.pageX,y:z.pageY};if(t.status.disabled===false&&t.options.position.adjust.mouse===true&&t.options.position.type!=="static"&&t.elements.tooltip.css("display")!=="none"){t.updatePosition(z)}})}}function o(u,v,A){var z,s,x,y,t,w;z=this;if(A.corner=="center"){return v.position}s=f.extend({},u);y={x:false,y:false};t={left:(s.left<f.fn.qtip.cache.screen.scroll.left),right:(s.left+A.dimensions.width+2>=f.fn.qtip.cache.screen.width+f.fn.qtip.cache.screen.scroll.left),top:(s.top<f.fn.qtip.cache.screen.scroll.top),bottom:(s.top+A.dimensions.height+2>=f.fn.qtip.cache.screen.height+f.fn.qtip.cache.screen.scroll.top)};x={left:(t.left&&(A.corner.search(/right/i)!=-1||(A.corner.search(/right/i)==-1&&!t.right))),right:(t.right&&(A.corner.search(/left/i)!=-1||(A.corner.search(/left/i)==-1&&!t.left))),top:(t.top&&A.corner.search(/top/i)==-1),bottom:(t.bottom&&A.corner.search(/bottom/i)==-1)};if(x.left){if(z.options.position.target!=="mouse"){s.left=v.position.left+v.dimensions.width}else{s.left=z.cache.mouse.x}y.x="Left"}else{if(x.right){if(z.options.position.target!=="mouse"){s.left=v.position.left-A.dimensions.width}else{s.left=z.cache.mouse.x-A.dimensions.width}y.x="Right"}}if(x.top){if(z.options.position.target!=="mouse"){s.top=v.position.top+v.dimensions.height}else{s.top=z.cache.mouse.y}y.y="top"}else{if(x.bottom){if(z.options.position.target!=="mouse"){s.top=v.position.top-A.dimensions.height}else{s.top=z.cache.mouse.y-A.dimensions.height}y.y="bottom"}}if(s.left<0){s.left=u.left;y.x=false}if(s.top<0){s.top=u.top;y.y=false}if(z.options.style.tip.corner!==false){s.corner=new String(A.corner);if(y.x!==false){s.corner=s.corner.replace(/Left|Right|Middle/,y.x)}if(y.y!==false){s.corner=s.corner.replace(/top|bottom/,y.y)}if(s.corner!==z.elements.tip.attr("rel")){e.call(z,s.corner)}}return s}function q(u,t){var v,s;v=f.extend(true,{},u);for(s in v){if(t===true&&s.search(/(tip|classes)/i)!==-1){delete v[s]}else{if(!t&&s.search(/(width|border|tip|title|classes|user)/i)!==-1){delete v[s]}}}return v}function c(s){if(typeof s.tip!=="object"){s.tip={corner:s.tip}}if(typeof s.tip.size!=="object"){s.tip.size={width:s.tip.size,height:s.tip.size}}if(typeof s.border!=="object"){s.border={width:s.border}}if(typeof s.width!=="object"){s.width={value:s.width}}if(typeof s.width.max=="string"){s.width.max=parseInt(s.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof s.width.min=="string"){s.width.min=parseInt(s.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof s.tip.size.x=="number"){s.tip.size.width=s.tip.size.x;delete s.tip.size.x}if(typeof s.tip.size.y=="number"){s.tip.size.height=s.tip.size.y;delete s.tip.size.y}return s}function a(){var s,t,u,x,v,w;s=this;u=[true,{}];for(t=0;t<arguments.length;t++){u.push(arguments[t])}x=[f.extend.apply(f,u)];while(typeof x[0].name=="string"){x.unshift(c(f.fn.qtip.styles[x[0].name]))}x.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},f.fn.qtip.styles.defaults);v=f.extend.apply(f,x);w=(f.browser.msie)?1:0;v.tip.size.width+=w;v.tip.size.height+=w;if(v.tip.size.width%2>0){v.tip.size.width+=1}if(v.tip.size.height%2>0){v.tip.size.height+=1}if(v.tip.corner===true){v.tip.corner=(s.options.position.corner.tooltip==="center")?false:s.options.position.corner.tooltip}return v}function b(v,u,t){var s={bottomRight:[[0,0],[u,t],[u,0]],bottomLeft:[[0,0],[u,0],[0,t]],topRight:[[0,t],[u,0],[u,t]],topLeft:[[0,0],[0,t],[u,t]],topMiddle:[[0,t],[u/2,0],[u,t]],bottomMiddle:[[0,0],[u,0],[u/2,t]],rightMiddle:[[0,0],[u,t/2],[0,t]],leftMiddle:[[u,0],[u,t],[0,t/2]]};s.leftTop=s.bottomRight;s.rightTop=s.bottomLeft;s.leftBottom=s.topRight;s.rightBottom=s.topLeft;return s[v]}function g(s){var t;if(f("<canvas>").get(0).getContext){t={topLeft:[s,s],topRight:[0,s],bottomLeft:[s,0],bottomRight:[0,0]}}else{if(f.browser.msie){t={topLeft:[-90,90,0],topRight:[-90,90,-s],bottomLeft:[90,270,0],bottomRight:[90,270,-s]}}}return t}function k(){var s,t,u;s=this;u=s.getDimensions();t='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+u.height+"px; width:"+u.width+'px" />';s.elements.bgiframe=s.elements.wrapper.prepend(t).children(".qtip-bgiframe:first")}f(document).ready(function(){f.fn.qtip.cache={screen:{scroll:{left:f(window).scrollLeft(),top:f(window).scrollTop()},width:f(window).width(),height:f(window).height()}};var s;f(window).bind("resize scroll",function(t){clearTimeout(s);s=setTimeout(function(){if(t.type==="scroll"){f.fn.qtip.cache.screen.scroll={left:f(window).scrollLeft(),top:f(window).scrollTop()}}else{f.fn.qtip.cache.screen.width=f(window).width();f.fn.qtip.cache.screen.height=f(window).height()}for(i=0;i<f.fn.qtip.interfaces.length;i++){var u=f.fn.qtip.interfaces[i];if(u.status.rendered===true&&(u.options.position.type!=="static"||u.options.position.adjust.scroll&&t.type==="scroll"||u.options.position.adjust.resize&&t.type==="resize")){u.updatePosition(t,true)}}},100)});f(document).bind("mousedown.qtip",function(t){if(f(t.target).parents("div.qtip").length===0){f(".qtip[unfocus]").each(function(){var u=f(this).qtip("api");if(f(this).is(":visible")&&!u.status.disabled&&f(t.target).add(u.elements.target).length>1){u.hide(t)}})}})});f.fn.qtip.interfaces=[];f.fn.qtip.log={error:function(){return this}};f.fn.qtip.constants={};f.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};f.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);
readme.txt CHANGED
@@ -1,10 +1,10 @@
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
5
  Requires at least: 2.7
6
- Tested up to: 2.8
7
- Stable tag: 1.2.2
8
 
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
10
 
@@ -13,14 +13,20 @@ WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
13
  <br/>
14
  Features<br/>
15
  <br/>
16
- Manage Ads<br/>
17
- In post ads - Allows you to insert your ads around your content<br/>
 
 
18
  * Insert Ads above the content <br/>
19
  * Insert Ads below the content <br/>
 
20
  * Insert Ads to the left of the post <br/>
21
  * Insert ads to the right of the post <br/>
22
- * Option to show ads only on single posts and pages <br/>
23
- Five ad widgets at your disposal <br/>
 
 
 
24
  * Go to the widgets page under "Appearance" and place the widgets onto the sidebars you want the ads to appear onto <br/>
25
  <br/>
26
  <br/>
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.4
7
+ Stable tag: 1.3.0
8
 
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
10
 
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<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
  <br/>
32
  <br/>
support/support.php CHANGED
@@ -1,20 +1,19 @@
1
  <?php function show_support_options() { ?>
2
  <table class="form-table">
3
- <tr>
4
- <td align="left">
5
- <a href="http://www.smartlogix.co.in/"><img src="http://smartlogix.co.in/ads/smartlogixad1.jpg" /></a>
6
- </td>
7
- <td align="right">
8
- <b>Think we have done a great job?</b><br/><a href="http://wordpress.org/extend/plugins/wp-insert/">Rate the plugin</a> or <a href="http://www.smartlogix.co.in/">Leave Us a Comment</a>
9
- <div>
10
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
11
  <input type="hidden" name="cmd" value="_s-xclick">
12
- <input type="hidden" name="hosted_button_id" value="5199131">
13
  <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
14
  <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
15
  </form>
16
- </div>
17
  </td>
 
 
 
18
  </tr>
19
  </table>
20
  <?php } ?>
1
  <?php function show_support_options() { ?>
2
  <table class="form-table">
3
+ <tr valign="bottom">
4
+ <th scope="row"><small><span style="color:#FF0000;"><b>Donate a Dollar</b></span><br/><span style="color:#008E04;">Support our FREE Plugins</span><br/>
5
+ You Might Also Like <a target="_blank" href="http://wordpress.org/extend/plugins/wp-private/">WP-PRIVATE</a></small></th>
6
+ <td width="100px">
 
 
 
7
  <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
8
  <input type="hidden" name="cmd" value="_s-xclick">
9
+ <input type="hidden" name="hosted_button_id" value="7834514">
10
  <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
11
  <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
12
  </form>
 
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 } ?>
tracking/insert-analytics.php CHANGED
@@ -65,5 +65,8 @@ function smart_add_analytics() { ?>
65
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
66
  </p>
67
  </form>
 
 
 
68
  </div>
69
  <?php } ?>
65
  <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
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 } ?>
wp-insert.php CHANGED
@@ -3,28 +3,33 @@
3
  Plugin Name: wp-insert
4
  Plugin URI: http://www.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
- Version: 1.2.2
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
10
  */
11
- add_action('admin_menu', 'smart_add_menu');
12
 
13
- // action function for above hook
14
- function smart_add_menu() {
15
- add_menu_page('Wp-Insert', 'Wp-Insert', 8, __FILE__);
16
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Ads', 8, __FILE__, 'smart_add_adspage');
17
- add_submenu_page(__FILE__, 'wp-insert', 'Manage Feeds', 8, 'Manage Feeds', 'smart_add_feedspage');
18
- add_submenu_page(__FILE__, 'wp-insert', 'Tracking Codes', 8, 'Tracking Codes', 'smart_add_analytics');
19
- add_submenu_page(__FILE__, 'wp-insert', 'WYSIWYG Editor', 8, 'WYSIWYG Editor', 'smart_add_wysiwyg_pages');
20
- add_submenu_page(__FILE__, 'wp-insert', 'Syntax Highlighting', 8, 'Syntax Highlighting', 'smart_add_syntaxhighlighting_pages');
21
- //add_submenu_page(__FILE__, 'wp-insert', 'Social Bookmarking', 8, 'Social Bookmarking', 'smart_add_socialpages');
22
- //add_submenu_page(__FILE__, 'wp-insert', 'SEO Optimization', 8, 'SEO', 'smart_add_SEOpages');
23
- }
 
 
 
 
 
 
 
24
  require_once (dirname(__FILE__) . '/support/support.php');
25
- require_once (dirname(__FILE__) . '/ads/insert-ads.php');
26
  require_once (dirname(__FILE__) . '/feeds/insert-feeds.php');
27
  require_once (dirname(__FILE__) . '/tracking/insert-analytics.php');
28
  require_once (dirname(__FILE__) . '/wysiwyg/insert-wysiwyg.php');
29
  require_once (dirname(__FILE__) . '/highlighter/syntax.php');
30
- ?>
3
  Plugin Name: wp-insert
4
  Plugin URI: http://www.smartlogix.co.in/
5
  Description: The ultimate wordpress plugin
6
+ Version: 1.3.0
7
  Author: Namith Jawahar
8
  Author URI: http://www.smartlogix.co.in/
9
  WP-INSERT by SMARTLOGIX : The ultimate wordpress plugin
10
  */
 
11
 
12
+ /* Copyright 2009 NAMITH JAWAHAR (website : http://www.smartlogix.co.in)
13
+
14
+ This program is free software; you can redistribute it and/or modify
15
+ it under the terms of the GNU General Public License as published by
16
+ the Free Software Foundation; either version 2 of the License, or
17
+ (at your option) any later version.
18
+
19
+ This program is distributed in the hope that it will be useful,
20
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
+ GNU General Public License for more details.
23
+
24
+ You should have received a copy of the GNU General Public License
25
+ along with this program; if not, write to the Free Software
26
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
+ */
28
+ require_once (dirname(__FILE__) . '/includes/essentials.php');
29
+
30
  require_once (dirname(__FILE__) . '/support/support.php');
 
31
  require_once (dirname(__FILE__) . '/feeds/insert-feeds.php');
32
  require_once (dirname(__FILE__) . '/tracking/insert-analytics.php');
33
  require_once (dirname(__FILE__) . '/wysiwyg/insert-wysiwyg.php');
34
  require_once (dirname(__FILE__) . '/highlighter/syntax.php');
35
+ ?>
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 } ?>