WP Easy Columns - Version 1.1

Version Description

Minor fixes. Please upgrade!

=

Download this release

Release Info

Developer kcfried
Plugin Icon wp plugin WP Easy Columns
Version 1.1
Comparing to
See all releases

Version 1.1

1.jpg ADDED
Binary file
2.jpg ADDED
Binary file
css/wp-ez-columns.css ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ ** WP-Ez-Columns CSS: css to define column layouts for the WP-Colum plugin
3
+ ** for more info visit: http://www.affiliatetechhelp.com/wordpress/easy-columns
4
+ **
5
+ ** use percentage widths and margins for fluid
6
+ ** or unknown content widths and fixed
7
+ ** widths and margins for known content widths
8
+ **
9
+ ** for pixel widths:
10
+ ** div width = ((content width - padding - margin)/number of divs)
11
+ ** - margin - padding - border
12
+ **
13
+ ** for more information on calcluating your widths, check
14
+ ** out http://www.w3schools.com/css/css_boxmodel.asp
15
+ ** for info on the CSS box model
16
+ */
17
+ .wpcol-one-quarter,
18
+ .wpcol-one-half,
19
+ .wpcol-three-quarter,
20
+ .wpcol-one-third,
21
+ .wpcol-two-third {
22
+ float: left;
23
+ margin-right: 4%;
24
+ position: relative;
25
+ }
26
+ .wpcol-one-quarter {
27
+ width: 22%;
28
+ }
29
+ .wpcol-one-half {
30
+ width: 48%;
31
+ }
32
+ .wpcol-three-quarter {
33
+ width: 74%;
34
+ }
35
+ .wpcol-one-third {
36
+ width: 30.666%;
37
+ }
38
+ .wpcol-two-third {
39
+ width: 65.334%;
40
+ }
41
+ .wpcol-last {
42
+ clear: right;
43
+ margin-right: 0;
44
+ }
45
+ .wpcol-both,
46
+ .wpcol-left,
47
+ .wpcol-right {
48
+ margin: 0;
49
+ padding: 0;
50
+ background: none;
51
+ }
52
+ .wpcol-divider {
53
+ clear: both !important;
54
+ display: block !important;
55
+ margin-bottom: 5px !important;
56
+ padding-top: 5px !important;
57
+ width: 100% !important;
58
+ background: none !important;
59
+ }
60
+ .wpcol-both {
61
+ clear: both !important;
62
+ }
63
+ .wpcol-left {
64
+ clear: left !important;
65
+ }
66
+ .wpcol-right {
67
+ clear: right !important;
68
+ }
easy-columns-options.php ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function write_sel($n,$v){
3
+ echo '<select id="'.$n.'" name="'.$n.'">' . "\r\n";
4
+ if($v == 'px'){
5
+ echo '<option value="px" selected="selected">px</option>' . "\r\n";
6
+ echo '<option value="%">%</option>' . "\r\n";
7
+ } else {
8
+ echo '<option value="px">px</option>' . "\r\n";
9
+ echo '<option value="%" selected="selected">%</option>' . "\r\n";
10
+ }
11
+ echo '</select>' . "\r\n";
12
+ }
13
+ ?>
14
+ <div class="wrap" style="max-width:950px !important;">
15
+
16
+ <a href="http://www.affiliatetechhelp.com/wordpress/easy-columns" target="_blank">
17
+ <img src="<?php echo $plugin_url; ?>/img/easy-column-logo.jpg" alt="Easy Columns - take control of your layout" style="margin:10px 0px 5px 0px;border:none;">
18
+ </a>
19
+
20
+ <div id="paypal-float" style="float:right;margin-top:10px;width:260px;padding-top:8px;">
21
+ <img src="<?php echo $plugin_url; ?>/img/coffee.jpg" style="float:left;margin:-8px 8px 8px 0px;">
22
+ Like Easy Columns?<br />
23
+ Say, then how about a cup o' coffee?<br />
24
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
25
+ <input type="hidden" name="cmd" value="_donations">
26
+ <input type="hidden" name="business" value="T8V954QPLEW2J">
27
+ <input type="hidden" name="lc" value="US">
28
+ <input type="hidden" name="item_name" value="Easy Columns Plugin Donation">
29
+ <input type="hidden" name="item_number" value="easy-columns">
30
+ <input type="hidden" name="amount" id="amount" value="1.00">
31
+ <input type="hidden" name="currency_code" value="USD">
32
+ <input type="hidden" name="no_note" value="1">
33
+ <input type="hidden" name="no_shipping" value="1">
34
+ <input type="hidden" name="currency_code" value="USD">
35
+ <input type="hidden" name="bn" value="PP-DonationsBF:btn_donate_LG.gif:NonHosted">
36
+ <select id="multi-amount" onchange="changeAmount(this.options[this.selectedIndex].value);">
37
+ <option value="1.00" selected="selected">$1.00 - Regular cup o' joe</option>
38
+ <option value="5.00">$5.00 - Grande mocha</option>
39
+ <option value="10.00">$10.00 - Venti caramel macchiato with whip</option>
40
+ <option value="15.00">$15.00 - Nuclear alien coffee!</option>
41
+ </select>
42
+ <br />
43
+ <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" style="float:right;">
44
+ <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
45
+ </form>
46
+ <script language="javascript">
47
+ function changeAmount(v){ amt = document.getElementById('amount'); amt.value = v; }
48
+ </script>
49
+ </div>
50
+
51
+ <br />
52
+
53
+ <iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.affiliatetechhelp.com%2Fwordpress%2Feasy-columns&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;font=lucida+grande&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
54
+
55
+ <div class="dbx-content">
56
+
57
+ <form name="frmEasyColumns" action="<?php echo $action_url ?>" method="post">
58
+
59
+ <input type="hidden" name="submitted" value="1" />
60
+ <?php wp_nonce_field('easycol-nonce'); ?>
61
+
62
+ <p>
63
+ Easy Columns options are for those times when you need pixel level control over the width and margins of the columns
64
+ in your theme. Most of the time, the standard percentage widths work just fine!
65
+ </p>
66
+
67
+ <h3>Column Options</h3>
68
+ <table border="0" cellpadding="2" cellspacing="4">
69
+ <tr>
70
+ <td valign="middle">
71
+ <strong>Use Custom Options?</strong>
72
+ </td>
73
+ <td valign="middle">
74
+ <?php if($use_custom){ ?>
75
+ <input type="checkbox" id="use_custom" name="use_custom" value="true" checked="checked">
76
+ <?php } else { ?>
77
+ <input type="checkbox" id="use_custom" name="use_custom" value="true">
78
+ <?php } ?>
79
+ </td>
80
+ </tr>
81
+ </table>
82
+
83
+ <table border="0" cellpadding="2" cellspacing="4">
84
+
85
+ <tr>
86
+ <td colspan="6"><hr></td>
87
+ </tr>
88
+
89
+ <tr>
90
+ <td valign="middle" colspan="2">
91
+ <strong>1/4 Column Options</strong>
92
+ </td>
93
+ <td valign="middle" colspan="2">
94
+ <strong>1/2 Column Options</strong>
95
+ </td>
96
+ <td valign="middle" colspan="2">
97
+ <strong>3/4 Column Options</strong>
98
+ </td>
99
+ </tr>
100
+
101
+ <tr>
102
+ <td valign="middle">
103
+ Width
104
+ </td>
105
+ <td valign="middle">
106
+ <input type="text" id="quarter_width" name="quarter_width" value="<?php echo $quarter_width; ?>" size="6">
107
+ &nbsp;
108
+ <?php write_sel('quarter_width_type',$quarter_width_type); ?>
109
+ </td>
110
+ <td valign="middle">
111
+ Width
112
+ </td>
113
+ <td valign="middle">
114
+ <input type="text" id="onehalf_width" name="onehalf_width" value="<?php echo $onehalf_width; ?>" size="6">
115
+ &nbsp;
116
+ <?php write_sel('onehalf_width_type',$onehalf_width_type); ?>
117
+ </td>
118
+ <td valign="middle">
119
+ Width
120
+ </td>
121
+ <td valign="middle">
122
+ <input type="text" id="threequarter_width" name="threequarter_width" value="<?php echo $threequarter_width; ?>" size="6">
123
+ &nbsp;
124
+ <?php write_sel('threequarter_width_type',$threequarter_width_type); ?>
125
+ </td>
126
+ </tr>
127
+
128
+ <tr>
129
+ <td valign="middle">
130
+ Margin
131
+ </td>
132
+ <td valign="middle">
133
+ <input type="text" id="quarter_margin" name="quarter_margin" value="<?php echo $quarter_margin; ?>" size="6">
134
+ &nbsp;
135
+ <?php write_sel('quarter_margin_type',$quarter_margin_type); ?>
136
+ </td>
137
+ <td valign="middle">
138
+ Margin
139
+ </td>
140
+ <td valign="middle">
141
+ <input type="text" id="onehalf_margin" name="onehalf_margin" value="<?php echo $onehalf_margin; ?>" size="6">
142
+ &nbsp;
143
+ <?php write_sel('onehalf_margin_type',$onehalf_margin_type); ?>
144
+ </td>
145
+ <td valign="middle">
146
+ Margin
147
+ </td>
148
+ <td valign="middle">
149
+ <input type="text" id="threequarter_margin" name="threequarter_margin" value="<?php echo $threequarter_margin; ?>" size="6">
150
+ &nbsp;
151
+ <?php write_sel('threequarter_margin_type',$threequarter_margin_type); ?>
152
+ </td>
153
+ </tr>
154
+
155
+ <tr>
156
+ <td colspan="6"><hr></td>
157
+ </tr>
158
+
159
+ <tr>
160
+ <td valign="middle" colspan="2">
161
+ <strong>1/3 Column Options</strong>
162
+ </td>
163
+ <td valign="middle" colspan="2">
164
+ <strong>2/3 Column Options</strong>
165
+ </td>
166
+ <td valign="middle" colspan="2">
167
+ &nbsp;
168
+ </td>
169
+ </tr>
170
+
171
+ <tr>
172
+ <td valign="middle">
173
+ Width
174
+ </td>
175
+ <td valign="middle">
176
+ <input type="text" id="onethird_width" name="onethird_width" value="<?php echo $onethird_width; ?>" size="6">
177
+ &nbsp;
178
+ <?php write_sel('onethird_width_type',$onethird_width_type); ?>
179
+ </td>
180
+ <td valign="middle">
181
+ Width
182
+ </td>
183
+ <td valign="middle">
184
+ <input type="text" id="twothird_width" name="twothird_width" value="<?php echo $twothird_width; ?>" size="6">
185
+ &nbsp;
186
+ <?php write_sel('twothird_width_type',$twothird_width_type); ?>
187
+ </td>
188
+ <td colspan="2">
189
+ &nbsp;
190
+ </td>
191
+ </tr>
192
+ <tr>
193
+ <td valign="middle">
194
+ Margin
195
+ </td>
196
+ <td valign="middle">
197
+ <input type="text" id="onethird_margin" name="onethird_margin" value="<?php echo $onethird_margin; ?>" size="6">
198
+ &nbsp;
199
+ <?php write_sel('onethird_margin_type',$onethird_margin_type); ?>
200
+ </td>
201
+ <td valign="middle">
202
+ Margin
203
+ </td>
204
+ <td valign="middle">
205
+ <input type="text" id="twothird_margin" name="twothird_margin" value="<?php echo $twothird_margin; ?>" size="6">
206
+ &nbsp;
207
+ <?php write_sel('twothird_margin_type',$twothird_margin_type); ?>
208
+ </td>
209
+ <td valign="middle" colspan="2">
210
+ &nbsp;
211
+ </td>
212
+ </tr>
213
+
214
+ </table>
215
+
216
+ <p>
217
+ <input type="submit" name="Submit" value="Update" />
218
+ </p>
219
+
220
+ </form>
221
+
222
+ <h3>Column Shortcodes</h3>
223
+
224
+ <strong>1/4 columns</strong><br />
225
+ [wpcol_1quarter id="" class="" style=""][/wpcol_1quarter]<br />
226
+ [wpcol_1quarter_end id="" class="" style=""][/wpcol_1quarter_end]<br />
227
+ <br />
228
+ <strong>1/2 columns</strong><br />
229
+ [wpcol_1half id="" class="" style=""][/wpcol_1half]<br />
230
+ [wpcol_1half_end id="" class="" style=""][/wpcol_1half_end]<br />
231
+ <br />
232
+ <strong>3/4 columns</strong><br />
233
+ [wpcol_3quarter id="" class="" style=""][/wpcol_3quarter]<br />
234
+ [wpcol_3quarter_end id="" class="" style=""][/wpcol_3quarter_end]<br />
235
+ <br />
236
+ <strong>1/3 columns</strong><br />
237
+ [wpcol_1third id="" class="" style=""][/wpcol_1third]<br />
238
+ [wpcol_1third_end id="" class="" style=""][/wpcol_1third_end]<br />
239
+ <br />
240
+ <strong>2/3 columns</strong><br />
241
+ [wpcol_2third id="" class="" style=""][/wpcol_2third]<br />
242
+ [wpcol_2third_end id="" class="" style=""][/wpcol_2third_end]<br />
243
+ <br />
244
+ <strong>special columns</strong><br />
245
+ [wpdiv id="" class="" style=""][/wpdiv] (easily create DIVs in your content without editing HTML)<br />
246
+ <br />
247
+ [wpcol_divider] (clears all floats and creates a 2px high, 100% width div)<br />
248
+ [wpcol_end_left] (clears left float)<br />
249
+ [wpcol_end_right] (clears right float)<br />
250
+ [wpcol_end_both] (clears both)
251
+
252
+ <p>
253
+ As you can see, column shortcodes take the attributes of "id", "class", and "style". This way you can
254
+ have even more control over your columns, apply an additional class or use inline CSS.
255
+ </p>
256
+
257
+ <h5>Easy Columns plugin by <a href="http://www.affiliatetechhelp.com" target="_blank">AffiliateTechHelp.com</a></h5>
258
+
259
+ </div><!-- dbx-content -->
260
+
261
+ </div><!-- wrap -->
easy-columns.php ADDED
@@ -0,0 +1,474 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: Easy Columns
4
+ Plugin URI: http://www.affiliatetechhelp.com/wordpress/easy-columns
5
+ Version: v1.1
6
+ Author: <a href="http://www.affiliatetechhelp.com">Pat Friedl</a>
7
+ Description: Easy Columns provides the shortcodes to create a grid system or magazine style columns for laying out your pages just the way you need them. Using shortcodes for 1/4, 1/2, 1/3, 2/3, and 3/4 columns, you can insert at least fifteen unique variations of columns on any page or post. Quickly add columns to your pages from the editor with an easy to use "pick n' click" interface! For usage and more information, visit <a href="http://www.affiliatetechhelp.com" target="_blank">affiliatetechhelp.com</a>.
8
+
9
+ Copyright 2010 AffiliaTetechHelp.com (email: support[at]affiliatetechhelp[dot]com)
10
+
11
+ This program is free software; you can redistribute it and/or modify
12
+ it under the terms of the GNU General Public License as published by
13
+ the Free Software Foundation; either version 2 of the License, or
14
+ (at your option) any later version.
15
+
16
+ This program is distributed in the hope that it will be useful,
17
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ GNU General Public License for more details.
20
+
21
+ You should have received a copy of the GNU General Public License
22
+ along with this program; if not, write to the Free Software
23
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
+ */
25
+
26
+ if(!class_exists("EasyColumns")){
27
+
28
+ /*
29
+ Available Shortcodes:
30
+ [wpcol_1quarter id="" class="" style=""][/wpcol_1quarter]
31
+ [wpcol_1quarter_end id="" class="" style=""][/wpcol_1quarter_end]
32
+
33
+ [wpcol_1half id="" class="" style=""][/wpcol_1half]
34
+ [wpcol_1half_end id="" class="" style=""][/wpcol_1half_end]
35
+
36
+ [wpcol_3quarter id="" class="" style=""][/wpcol_3quarter]
37
+ [wpcol_3quarter_end id="" class="" style=""][/wpcol_3quarter_end]
38
+
39
+ [wpcol_1third id="" class="" style=""][/wpcol_1third]
40
+ [wpcol_1third_end id="" class="" style=""][/wpcol_1third_end]
41
+
42
+ [wpcol_2third id="" class="" style=""][/wpcol_2third]
43
+ [wpcol_2third_end id="" class="" style=""][/wpcol_2third_end]
44
+
45
+ [wpdiv id="" class="" style=""][/wpdiv]
46
+ (easily create DIVs in your content without editing HTML)
47
+
48
+ [wpcol_divider] (clears all floats and creates a 2px high, 100% width div)
49
+ [wpcol_end_left] (clears left float)
50
+ [wpcol_end_right] (clears right float)
51
+ [wpcol_end_both] (clears both)
52
+ */
53
+
54
+ class EasyColumns {
55
+
56
+ var $plugin_url;
57
+ var $EasyColumns_DB_option = 'easycol_options';
58
+ var $EasyColumns_options;
59
+
60
+ var $use_custom;
61
+ var $quarter_width;
62
+ var $quarter_width_type;
63
+ var $quarter_margin;
64
+ var $quarter_margin_type;
65
+ var $onehalf_width;
66
+ var $onehalf_width_type;
67
+ var $onehalf_margin;
68
+ var $onehalf_margin_type;
69
+ var $threequarter_width;
70
+ var $threequarter_width_type;
71
+ var $threequarter_margin;
72
+ var $threequarter_margin_type;
73
+ var $onethird_width;
74
+ var $onethird_width_type;
75
+ var $onethird_margin;
76
+ var $onethird_margin_type;
77
+ var $twothird_width;
78
+ var $twothird_width_type;
79
+ var $twothird_margin;
80
+ var $twothird_margin_type;
81
+
82
+ function EasyColumns() { //constructor
83
+
84
+ // define the plugin URL so we can add the CSS
85
+ $this->plugin_url = $this->plugin_url = defined('WP_PLUGIN_URL') ? WP_PLUGIN_URL . '/' . dirname(plugin_basename(__FILE__)) : trailingslashit(get_bloginfo('wpurl')) . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));
86
+
87
+ // define column shortcodes
88
+ add_shortcode('wpcol_1half', array(&$this, 'wpcol_one_half'));
89
+ add_shortcode('wpcol_1half_end', array(&$this, 'wpcol_one_half_end'));
90
+ add_shortcode('wpcol_1third', array(&$this, 'wpcol_one_third'));
91
+ add_shortcode('wpcol_1third_end', array(&$this, 'wpcol_one_third_end'));
92
+ add_shortcode('wpcol_2third', array(&$this, 'wpcol_two_third'));
93
+ add_shortcode('wpcol_2third_end', array(&$this, 'wpcol_two_third_end'));
94
+ add_shortcode('wpcol_1quarter', array(&$this, 'wpcol_one_quarter'));
95
+ add_shortcode('wpcol_1quarter_end', array(&$this, 'wpcol_one_quarter_end'));
96
+ add_shortcode('wpcol_3quarter', array(&$this, 'wpcol_three_quarter'));
97
+ add_shortcode('wpcol_3quarter_end', array(&$this, 'wpcol_three_quarter_end'));
98
+ add_shortcode('wpdiv', array(&$this, 'wpcol_div'));
99
+ add_shortcode('wpcol_divider', array(&$this, 'wpcol_add_divider'));
100
+ add_shortcode('wpcol_end_right', array(&$this, 'wpcol_end_column_right'));
101
+ add_shortcode('wpcol_end_left', array(&$this, 'wpcol_end_column_left'));
102
+ add_shortcode('wpcol_end_both', array(&$this, 'wpcol_end_column_both'));
103
+ // add to tinyMCE
104
+ add_action('init', array(&$this, 'add_tinymce'));
105
+ // add admin menu
106
+ add_action('admin_menu', array(&$this, 'admin_menu'));
107
+
108
+ // get the options
109
+ $options = $this->get_options();
110
+
111
+ // assign variables for column styles
112
+ $this->use_custom = $options['use_custom'];
113
+ $this->quarter_width = $options['quarter_width'];
114
+ $this->quarter_width_type = $options['quarter_width_type'];
115
+ $this->quarter_margin = $options['quarter_margin'];
116
+ $this->quarter_margin_type = $options['quarter_margin_type'];
117
+ $this->onehalf_width = $options['onehalf_width'];
118
+ $this->onehalf_width_type = $options['onehalf_width_type'];
119
+ $this->onehalf_margin = $options['onehalf_margin'];
120
+ $this->onehalf_margin_type = $options['onehalf_margin_type'];
121
+ $this->threequarter_width = $options['threequarter_width'];
122
+ $this->threequarter_width_type = $options['threequarter_width_type'];
123
+ $this->threequarter_margin = $options['threequarter_margin'];
124
+ $this->threequarter_margin_type = $options['threequarter_margin_type'];
125
+ $this->onethird_width = $options['onethird_width'];
126
+ $this->onethird_width_type = $options['onethird_width_type'];
127
+ $this->onethird_margin = $options['onethird_margin'];
128
+ $this->onethird_margin_type = $options['onethird_margin_type'];
129
+ $this->twothird_width = $options['twothird_width'];
130
+ $this->twothird_width_type = $options['twothird_width_type'];
131
+ $this->twothird_margin = $options['twothird_margin'];
132
+ $this->twothird_margin_type = $options['twothird_margin_type'];
133
+
134
+ } // end function EasyColumns
135
+
136
+ function wpcol_one_half($atts, $content = null) {
137
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-one-half') . '>'.$this->wpcol_strip_autop($content).'</div>';
138
+ }
139
+
140
+ function wpcol_one_half_end($atts, $content = null) {
141
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-one-half wpcol-last') . '>'.$this->wpcol_strip_autop($content).'</div>'.$this->wpcol_add_divider();
142
+ }
143
+
144
+ function wpcol_one_third($atts, $content = null) {
145
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-one-third') . '>'.$this->wpcol_strip_autop($content).'</div>';
146
+ }
147
+
148
+ function wpcol_one_third_end($atts, $content = null) {
149
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-one-third wpcol-last') . '>'.$this->wpcol_strip_autop($content).'</div>'.$this->wpcol_add_divider();
150
+ }
151
+
152
+ function wpcol_two_third($atts, $content = null) {
153
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-two-third') . '>'.$this->wpcol_strip_autop($content).'</div>';
154
+ }
155
+
156
+ function wpcol_two_third_end($atts, $content = null) {
157
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-two-third wpcol-last') . '>'.$this->wpcol_strip_autop($content).'</div>'.$this->wpcol_add_divider();
158
+ }
159
+
160
+ function wpcol_one_quarter($atts, $content = null) {
161
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-one-quarter') . '>'.$this->wpcol_strip_autop($content).'</div>';
162
+ }
163
+
164
+ function wpcol_one_quarter_end($atts, $content = null) {
165
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-one-quarter wpcol-last') . '>'.$this->wpcol_strip_autop($content).'</div>'.$this->wpcol_add_divider();
166
+ }
167
+
168
+ function wpcol_three_quarter($atts, $content = null) {
169
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-three-quarter') . '>'.$this->wpcol_strip_autop($content).'</div>';
170
+ }
171
+
172
+ function wpcol_three_quarter_end($atts, $content = null) {
173
+ return '<div' . $this->wpcol_div_atts($atts,'wpcol-three-quarter wpcol-last') . '>'.$this->wpcol_strip_autop($content).'</div>'.$this->wpcol_add_divider();
174
+ }
175
+
176
+ function wpcol_div($atts, $content = null) {
177
+ return '<div' . $this->wpcol_div_atts($atts,'') . '>' . $this->wpcol_strip_autop($content) . '</div>';
178
+ }
179
+
180
+ function wpcol_add_divider(){
181
+ return '<div class="wpcol-divider"></div>';
182
+ }
183
+
184
+ function wpcol_end_column_left($atts, $content = null) {
185
+ return '<div class="wpcol-left"></div>';
186
+ }
187
+
188
+ function wpcol_end_column_right($atts, $content = null) {
189
+ return '<div class="wpcol-right"></div>';
190
+ }
191
+
192
+ function wpcol_end_column_both($atts, $content = null) {
193
+ return '<div class="wpcol-both"></div>';
194
+ }
195
+
196
+ function wpcol_div_atts($atts,$col_type) {
197
+ extract(shortcode_atts(array('id' => '','class' => '','style' => ''),$atts));
198
+
199
+ $att_str = ' class="';
200
+ if($col_type != ''){
201
+ $att_str .= $col_type;
202
+ }
203
+ if($col_type != '' && $class != ''){
204
+ $att_str .= ' ';
205
+ }
206
+ if($class != ''){
207
+ $att_str .= $class;
208
+ }
209
+ $att_str .= '"';
210
+ if($id != ''){
211
+ $att_str .= ' id="' . $id . '"';
212
+ }
213
+ if($style != ''){
214
+ $att_str .= ' style="' . $style . '"';
215
+ }
216
+ return $att_str;
217
+ }
218
+
219
+ function wpcol_strip_autop($content){
220
+ $content = do_shortcode(shortcode_unautop( $content ));
221
+ $content = preg_replace('#^<\/p>|^<br \/>|<p>$#', '', $content);
222
+ return $content;
223
+ }
224
+
225
+ function wpcol_add_css(){
226
+ ?>
227
+ <!-- Begin Easy Columns 1.0 by Pat Friedl http://www.affiliatetechhelp.com -->
228
+ <link rel="stylesheet" href="<?php echo $this->plugin_url; ?>/css/wp-ez-columns.css?<?php echo time();?>" type="text/css" media="screen, projection" />
229
+ <!-- End Easy Columns 1.0 -->
230
+ <?php
231
+ if($this->use_custom)
232
+ {
233
+ if($this->quarter_width != '' || $this->quarter_margin != '' || $this->onehalf_width != '' ||
234
+ $this->onehalf_margin != '' || $this->threequarter_width != '' || $this->threequarter_margin != '' ||
235
+ $this->onethird_width != '' || $this->onethird_margin != '' || $this->twothird_width != ''
236
+ || $this->twothird_margin != '')
237
+ {
238
+ ?>
239
+ <!-- Begin Easy Columns 1.0 Custom CSS -->
240
+ <style type="text/css" media="screen, projection">
241
+ <?php
242
+ if($this->quarter_width != '' || $this->quarter_margin != '')
243
+ {
244
+ echo '.wpcol-one-quarter {';
245
+ if($this->quarter_width != '') { echo 'width:'.$this->quarter_width.$this->quarter_width_type.'; '; }
246
+ if($this->quarter_margin != '') { echo 'margin-right:'.$this->quarter_margin.$this->quarter_margin_type.';'; }
247
+ echo '} ';
248
+ }
249
+ if($this->onehalf_width != '' || $this->onehalf_margin != '')
250
+ {
251
+ echo '.wpcol-one-half {';
252
+ if($this->onehalf_width != '') { echo 'width:'.$this->onehalf_width.$this->onehalf_width_type.'; '; }
253
+ if($this->onehalf_margin != '') { echo 'margin-right:'.$this->onehalf_margin.$this->onehalf_margin_type.';'; }
254
+ echo '} ';
255
+ }
256
+ if($this->threequarter_width != '' || $this->threequarter_margin != '')
257
+ {
258
+ echo '.wpcol-three-quarter {';
259
+ if($this->threequarter_width != '') { echo 'width:'.$this->threequarter_width.$this->threequarter_width_type.'; '; }
260
+ if($this->threequarter_margin != '') { echo 'margin-right:'.$this->threequarter_margin.$this->threequarter_margin_type.';'; }
261
+ echo '} ';
262
+ }
263
+ if($this->onethird_width != '' || $this->onethird_margin != '')
264
+ {
265
+ echo '.wpcol-one-third {';
266
+ if($this->onethird_width != '') { echo 'width:'.$this->onethird_width.$this->onethird_width_type.'; '; }
267
+ if($this->onethird_margin != '') { echo 'margin-right:'.$this->onethird_margin.$this->onethird_margin_type.';'; }
268
+ echo '} ';
269
+ }
270
+ if($this->twothird_width != '' || $this->twothird_margin != '')
271
+ {
272
+ echo '.wpcol-two-third {';
273
+ if($this->twothird_width != '') { echo 'width:'.$this->twothird_width.$this->twothird_width_type.'; '; }
274
+ if($this->twothird_margin != '') { echo 'margin-right:'.$this->twothird_margin.$this->twothird_margin_type.';'; }
275
+ echo '}';
276
+ }
277
+ ?>
278
+ echo "\n";
279
+ </style>
280
+ <!-- End Easy Columns 1.0 Custom CSS -->
281
+ <?php
282
+ }
283
+ } // end if($this->use_custom)
284
+ }// end wpcol_add_css
285
+
286
+ // begin functions for adding plugin to tinyMCE
287
+ function add_tinymce() {
288
+ if(!current_user_can('edit_posts') && ! current_user_can('edit_pages')) {
289
+ return;
290
+ }
291
+ if(get_user_option('rich_editing') == 'true') {
292
+ add_filter('mce_external_plugins', array(&$this, 'add_tinymce_plugin'));
293
+ add_filter('mce_buttons', array(&$this, 'add_tinymce_button'));
294
+ }
295
+ }
296
+ function add_tinymce_plugin($plugin_array) {
297
+ $plugin_array['ezColumns'] = $this->plugin_url . '/tinymce/editor_plugin.js';
298
+ return $plugin_array;
299
+ }
300
+ function add_tinymce_button($buttons) {
301
+ array_push($buttons, "separator", 'ezColumns');
302
+ return $buttons;
303
+ }
304
+ // end functions for adding plugin to tinyMCE
305
+
306
+ /*
307
+ get plugin options, set plugin options
308
+ */
309
+ function get_options()
310
+ {
311
+ // default values
312
+ $options = array(
313
+ 'use_custom' => false,
314
+ 'quarter_width' => '',
315
+ 'quarter_width_type' => '%',
316
+ 'quarter_margin' => '',
317
+ 'quarter_margin_type' => '%',
318
+ 'onehalf_width' => '',
319
+ 'onehalf_width_type' => '%',
320
+ 'onehalf_margin' => '',
321
+ 'onehalf_type' => '%',
322
+ 'threequarter_width' => '',
323
+ 'threequarter_width_type' => '%',
324
+ 'threequarter_margin' => '',
325
+ 'threequarter_type' => '%',
326
+ 'onethird_width' => '',
327
+ 'onethird_width_type' => '%',
328
+ 'onethird_margin' => '',
329
+ 'onethird_margin_type' => '%',
330
+ 'twothird_width' => '',
331
+ 'twothird_width_type' => '%',
332
+ 'twothird_margin' => '',
333
+ 'twothird_margin_type' => '%'
334
+ );
335
+
336
+ // get saved options
337
+ $saved = get_option($this->EasyColumns_DB_option);
338
+
339
+ // assign options
340
+ if(!empty($saved))
341
+ {
342
+ foreach($saved as $key => $option)
343
+ {
344
+ $options[$key] = $option;
345
+ }
346
+ }
347
+
348
+ //update options if necessary
349
+ if($saved != $options)
350
+ {
351
+ update_option($this->EasyColumns_DB_option,$options);
352
+ }
353
+
354
+ // return the options
355
+ return $options;
356
+ } // end get_options
357
+
358
+ /*
359
+ update options from the admin page
360
+ */
361
+ function handle_options()
362
+ {
363
+ $options = $this->get_options();
364
+ if (isset($_POST['submitted'])) {
365
+
366
+ //check security
367
+ check_admin_referer('easycol-nonce');
368
+
369
+ $options = array();
370
+ if($_POST['use_custom'] != ''){
371
+ $options['use_custom'] = true;
372
+ } else {
373
+ $options['use_custom'] = false;
374
+ }
375
+ $options['quarter_width'] = trim($_POST['quarter_width']);
376
+ $options['quarter_width_type'] = $_POST['quarter_width_type'];
377
+ $options['quarter_margin'] = trim($_POST['quarter_margin']);
378
+ $options['quarter_margin_type'] = $_POST['quarter_margin_type'];
379
+ $options['onehalf_width'] = trim($_POST['onehalf_width']);
380
+ $options['onehalf_width_type'] = $_POST['onehalf_width_type'];
381
+ $options['onehalf_margin'] = trim($_POST['onehalf_margin']);
382
+ $options['onehalf_margin_type'] = $_POST['onehalf_margin_type'];
383
+ $options['threequarter_width'] = trim($_POST['threequarter_width']);
384
+ $options['threequarter_width_type'] = $_POST['threequarter_width_type'];
385
+ $options['threequarter_margin'] = trim($_POST['threequarter_margin']);
386
+ $options['threequarter_margin_type'] = $_POST['threequarter_margin_type'];
387
+ $options['onethird_width'] = trim($_POST['onethird_width']);
388
+ $options['onethird_width_type'] = $_POST['onethird_width_type'];
389
+ $options['onethird_margin'] = trim($_POST['onethird_margin']);
390
+ $options['onethird_margin_type'] = $_POST['onethird_margin_type'];
391
+ $options['twothird_width'] = trim($_POST['twothird_width']);
392
+ $options['twothird_width_type'] = $_POST['twothird_width_type'];
393
+ $options['twothird_margin'] = trim($_POST['twothird_margin']);
394
+ $options['twothird_margin_type'] = $_POST['twothird_margin_type'];
395
+
396
+ update_option($this->EasyColumns_DB_option, $options);
397
+
398
+ echo '<div class="updated fade"><p>Plugin settings saved.</p></div>';
399
+ }
400
+
401
+ // URL for form submit, equals our current page
402
+ $action_url = $_SERVER['REQUEST_URI'];
403
+
404
+ // assign variables for the options page
405
+ $use_custom = $options['use_custom'];
406
+ $quarter_width = $options['quarter_width'];
407
+ $quarter_width_type = $options['quarter_width_type'];
408
+ $quarter_margin = $options['quarter_margin'];
409
+ $quarter_margin_type = $options['quarter_margin_type'];
410
+ $onehalf_width = $options['onehalf_width'];
411
+ $onehalf_width_type = $options['onehalf_width_type'];
412
+ $onehalf_margin = $options['onehalf_margin'];
413
+ $onehalf_margin_type = $options['onehalf_margin_type'];
414
+ $threequarter_width = $options['threequarter_width'];
415
+ $threequarter_width_type = $options['threequarter_width_type'];
416
+ $threequarter_margin = $options['threequarter_margin'];
417
+ $threequarter_margin_type = $options['threequarter_margin_type'];
418
+ $onethird_width = $options['onethird_width'];
419
+ $onethird_width_type = $options['onethird_width_type'];
420
+ $onethird_margin = $options['onethird_margin'];
421
+ $onethird_margin_type = $options['onethird_margin_type'];
422
+ $twothird_width = $options['twothird_width'];
423
+ $twothird_width_type = $options['twothird_width_type'];
424
+ $twothird_margin = $options['twothird_margin'];
425
+ $twothird_margin_type = $options['twothird_margin_type'];
426
+ $plugin_url = $this->plugin_url;
427
+
428
+ // include the options page
429
+ include('easy-columns-options.php');
430
+ } // end handle_options
431
+
432
+ /*
433
+ add option page for Affiliate Cookie Jar
434
+ */
435
+ function admin_menu()
436
+ {
437
+ add_options_page('Easy Columns Options', 'Easy Columns', 8, basename(__FILE__), array(&$this, 'handle_options'));
438
+ } // end admin_menu
439
+
440
+ /*
441
+ install and initialize the plugin
442
+ */
443
+ function install()
444
+ {
445
+ // set default options
446
+ $EasyColumns_options = $this->get_options();
447
+ } // end install
448
+
449
+ /*
450
+ uninstall the plugin - removes options
451
+ */
452
+ function uninstall() {
453
+ delete_option($this->EasyColumns_DB_option);
454
+ } // end uninstall
455
+
456
+
457
+ } // end class EasyColumns
458
+
459
+ } // end if class exists
460
+
461
+ // initialize the EasyColumns class
462
+ if (class_exists("EasyColumns")) {
463
+ $wp_wp_columns = new EasyColumns();
464
+ }
465
+
466
+ // set up actions and filters
467
+ if (isset($wp_wp_columns)) {
468
+ add_action('wp_head', array(&$wp_wp_columns, 'wpcol_add_css'), 100);
469
+ if (function_exists('register_uninstall_hook'))
470
+ {
471
+ register_uninstall_hook(__FILE__, array(&$wp_wp_columns, 'uninstall'));
472
+ }
473
+ }
474
+ ?>
img/coffee.jpg ADDED
Binary file
img/easy-column-logo.jpg ADDED
Binary file
readme.txt ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === WP Easy Columns ===
2
+ Contributors: Pat Friedl
3
+ Donate link: http://www.affiliatetechhelp.com/wordpress/easy-columns
4
+ Tags: columns, column, grid layout, layout, magazine, page, posts, magazine columns, magazine layout, float div
5
+
6
+ Requires at least: 2.7
7
+ Tested up to: 3.1.2
8
+ Stable tag: 1.1
9
+
10
+ Easy Columns provides the shortcodes to create a grid system or magazine style columns for laying out your pages just the way you need them.
11
+
12
+ == Description ==
13
+
14
+ Easy Columns provides the shortcodes to create a grid system or magazine style columns for laying out your pages just the way you need them.
15
+
16
+ Using shortcodes for 1/4, 1/2, 1/3, 2/3, and 3/4 columns, you can insert at least fifteen unique variations of columns on any page or post.
17
+
18
+ Quickly add columns to your pages from the editor with an easy to use "pick n' click" interface!
19
+
20
+ For usage and more information, visit <a href="http://www.affiliatetechhelp.com" target="_blank">affiliatetechhelp.com</a>.
21
+
22
+ <b>Example</b>
23
+ To create content with 3 columns, you would use the shortcodes like this:
24
+ [wpcol_1third]this is column 1[/wpcol_1third]
25
+ [wpcol_1third]this is column 2[/wpcol_1third]
26
+ [wpcol_1third_end]this is column 3[/wpcol_1third_end]
27
+
28
+ == Installation ==
29
+
30
+ 1. Upload `wp-ez-columns` directory to the `/wp-content/plugins/` directory
31
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
32
+ 3. Use any of the following shortcodes in your posts or pages:
33
+ Available Shortcodes:
34
+
35
+ [wpcol_1quarter id="" class="" style=""][/wpcol_1quarter]
36
+ [wpcol_1quarter_end id="" class="" style=""][/wpcol_1quarter_end]
37
+
38
+ [wpcol_1half id="" class="" style=""][/wpcol_1half]
39
+ [wpcol_1half_end id="" class="" style=""][/wpcol_1half_end]
40
+
41
+ [wpcol_3quarter id="" class="" style=""][/wpcol_3quarter]
42
+ [wpcol_3quarter_end id="" class="" style=""][/wpcol_3quarter_end]
43
+
44
+ [wpcol_1third id="" class="" style=""][/wpcol_1third]
45
+ [wpcol_1third_end id="" class="" style=""][/wpcol_1third_end]
46
+
47
+ [wpcol_2third id="" class="" style=""][/wpcol_2third]
48
+ [wpcol_2third_end id="" class="" style=""][/wpcol_2third_end]
49
+
50
+ [wpdiv id="" class="" style=""][/wpdiv]
51
+ (easily create DIVs in your content without editing HTML)
52
+
53
+ [wpcol_divider] (clears all floats and creates a 10px high, 100% width div)
54
+ [wpcol_end_left] (clears left float)
55
+ [wpcol_end_right] (clears right float)
56
+ [wpcol_end_both] (clears both)
57
+
58
+ ** Be sure to insert the "_end" column shortcode for your last column! **
59
+
60
+ == Frequently Asked Questions ==
61
+
62
+ = Is This Plugin Supported? =
63
+ Yes. Just send an email, and I'd be happy to help
64
+
65
+ = How can I customize the columns? =
66
+ You can edit the wp-ez-columns.css file to customize the layouts. Be sure to back up the CSS before testing!
67
+
68
+ = Can I put anything in the columns? =
69
+ Yes, as long as the content isn't larger than the column, otherwise the CSS will break and cause line breaks.
70
+
71
+ = What good are columns? =
72
+ Columns can be used in CMS layouts, magazine layouts and squeeze page layouts - it's only limited by your imagination.
73
+
74
+ == Upgrade Notice ==
75
+
76
+ = 1.1 =
77
+ Minor fixes. Please upgrade!
78
+
79
+ == Changelog ==
80
+
81
+ = 1.1 =
82
+ * Updated the shortcodes to clean up the WordPress &quot;Auto P&quot; functions that cause gaps, etc.
83
+
84
+ = 1.0 =
85
+ * New code
tinymce/editor_plugin.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Documentaion : http://wiki.moxiecode.com/index.php/TinyMCE:Create_plugin/3.x#Creating_your_own_plugins
2
+ (function() {
3
+ // Load plugin specific language pack
4
+ tinymce.PluginManager.requireLangPack('ezColumns');
5
+
6
+ tinymce.create('tinymce.plugins.ezColumns', {
7
+ /**
8
+ * Initializes the plugin, this will be executed after the plugin has been created.
9
+ * This call is done before the editor instance has finished it's initialization so use the onInit event
10
+ * of the editor instance to intercept that event.
11
+ *
12
+ * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
13
+ * @param {string} url Absolute URL to where the plugin is located.
14
+ */
15
+ init : function(ed, url) {
16
+ // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
17
+
18
+ ed.addCommand('mceEZColumns', function() {
19
+ ed.windowManager.open({
20
+ file : url + '/window.php',
21
+ width : 400 + ed.getLang('ezColumns.delta_width', 0),
22
+ height : 524 + ed.getLang('ezColumns.delta_height', 0),
23
+ inline : 1
24
+ }, {
25
+ plugin_url : url // Plugin absolute URL
26
+ });
27
+ });
28
+
29
+ // Register example button
30
+ ed.addButton('ezColumns', {
31
+ title : 'Easy Columns',
32
+ cmd : 'mceEZColumns',
33
+ image : url + '/img/column.png'
34
+ });
35
+
36
+ // Add a node change handler, selects the button in the UI when a image is selected
37
+ ed.onNodeChange.add(function(ed, cm, n) {
38
+ cm.setActive('ezColumns', n.nodeName == 'IMG');
39
+ });
40
+ },
41
+
42
+ /**
43
+ * Returns information about the plugin as a name/value array.
44
+ * The current keys are longname, author, authorurl, infourl and version.
45
+ *
46
+ * @return {Object} Name/value array containing information about the plugin.
47
+ */
48
+ getInfo : function() {
49
+ return {
50
+ longname : 'WP EZ Columns',
51
+ author : 'AffiliateTechHelp.com',
52
+ authorurl : 'http://affiliatetechhelp.com',
53
+ infourl : 'http://affiliatetechhelp.com',
54
+ version : "1.0"
55
+ };
56
+ }
57
+ });
58
+
59
+ // Register plugin
60
+ tinymce.PluginManager.add('ezColumns', tinymce.plugins.ezColumns);
61
+ })();
tinymce/img/1half2quarter.jpg ADDED
Binary file
tinymce/img/1quarter3quarter.jpg ADDED
Binary file
tinymce/img/1third2third.jpg ADDED
Binary file
tinymce/img/2half.jpg ADDED
Binary file
tinymce/img/2quarter1half.jpg ADDED
Binary file
tinymce/img/2third1third.jpg ADDED
Binary file
tinymce/img/3quarter1quarter.jpg ADDED
Binary file
tinymce/img/3third.jpg ADDED
Binary file
tinymce/img/4quarter.jpg ADDED
Binary file
tinymce/img/column.png ADDED
Binary file
tinymce/img/half.jpg ADDED
Binary file
tinymce/img/quarter.jpg ADDED
Binary file
tinymce/img/quarterhalfquarter.jpg ADDED
Binary file
tinymce/img/third.jpg ADDED
Binary file
tinymce/img/threequarter.jpg ADDED
Binary file
tinymce/img/twothirds.jpg ADDED
Binary file
tinymce/langs/en.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ tinyMCE.addI18n({en:{
2
+ cookieJar:{
3
+ desc : 'Drop an Affiliate Cookie'
4
+ }}});
tinymce/langs/en_US.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ tinyMCE.addI18n({en_US:{
2
+ cookieJar:{
3
+ desc : 'Drop an Affiliate Cookie'
4
+ }}});
tinymce/langs/en_en.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ tinyMCE.addI18n({en_US:{
2
+ cookieJar:{
3
+ desc : 'Drop an Affiliate Cookie'
4
+ }}});
tinymce/window.php ADDED
@@ -0,0 +1,336 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ wp ez columns tinymce
4
+ */
5
+ // look up for the path
6
+ require_once('../../../../wp-config.php');
7
+
8
+ // check for rights
9
+ if ( !is_user_logged_in() || !current_user_can('edit_posts') )
10
+ wp_die(__("You are not allowed to be here"));
11
+
12
+ global $wpdb;
13
+
14
+ // get the options
15
+ //$options = get_option('wpezcol_options');
16
+ //$options['ctr']
17
+ ?>
18
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
19
+ <html xmlns="http://www.w3.org/1999/xhtml">
20
+ <head>
21
+ <title>WP Easy Columns</title>
22
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
23
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
24
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
25
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
26
+ <script language="javascript" type="text/javascript">
27
+ var colTxt = ' ';
28
+ function init() {
29
+ tinyMCEPopup.resizeToInnerSize();
30
+ }
31
+
32
+ function insertColumns(col) {
33
+ colTxt = ' ';
34
+ switch(col)
35
+ {
36
+ case 'quarter':
37
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
38
+ break;
39
+ case 'half':
40
+ colTxt += '[wpcol_1half id="" class="" style=""]Half Column[/wpcol_1half] ';
41
+ break;
42
+ case 'threequarter':
43
+ colTxt += '[wpcol_3quarter id="" class="" style=""]Three Quarter Column[/wpcol_3quarter] ';
44
+ break;
45
+ case 'third':
46
+ colTxt += '[wpcol_1third id="" class="" style=""]Third Column[/wpcol_1third] ';
47
+ break;
48
+ case 'twothirds':
49
+ colTxt += '[wpcol_2third id="" class="" style=""]Two Thirds Column[/wpcol_2third] ';
50
+ break;
51
+ case '4quarter':
52
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
53
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
54
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
55
+ colTxt += '[wpcol_1quarter_end id="" class="" style=""]Quarter Column[/wpcol_1quarter_end] ';
56
+ break;
57
+ case '2quarter1half':
58
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
59
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
60
+ colTxt += '[wpcol_1half_end id="" class="" style=""]Half Column[/wpcol_1half_end] ';
61
+ break;
62
+ case '1half2quarter':
63
+ colTxt += '[wpcol_1half id="" class="" style=""]Half Column[/wpcol_1half] ';
64
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
65
+ colTxt += '[wpcol_1quarter_end id="" class="" style=""]Quarter Column[/wpcol_1quarter_end] ';
66
+ break;
67
+ case 'quarterhalfquarter':
68
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
69
+ colTxt += '[wpcol_1half id="" class="" style=""]Half Column[/wpcol_1half] ';
70
+ colTxt += '[wpcol_1quarter_end id="" class="" style=""]Quarter Column[/wpcol_1quarter_end] ';
71
+ break;
72
+ case '2half':
73
+ colTxt += '[wpcol_1half id="" class="" style=""]Half Column[/wpcol_1half] ';
74
+ colTxt += '[wpcol_1half_end id="" class="" style=""]Half Column[/wpcol_1half_end] ';
75
+ break;
76
+ case '1quarter3quarter':
77
+ colTxt += '[wpcol_1quarter id="" class="" style=""]Quarter Column[/wpcol_1quarter] ';
78
+ colTxt += '[wpcol_3quarter_end id="" class="" style=""]Three Quarter Column[/wpcol_3quarter_end] ';
79
+ break;
80
+ case '3quarter1quarter':
81
+ colTxt += '[wpcol_3quarter id="" class="" style=""]Three Quarter Column[/wpcol_3quarter] ';
82
+ colTxt += '[wpcol_1quarter_end id="" class="" style=""]Quarter Column[/wpcol_1quarter_end] ';
83
+ break;
84
+ case '3third':
85
+ colTxt += '[wpcol_1third id="" class="" style=""]Third Column[/wpcol_1third] ';
86
+ colTxt += '[wpcol_1third id="" class="" style=""]Third Column[/wpcol_1third] ';
87
+ colTxt += '[wpcol_1third_end id="" class="" style=""]Third Column[/wpcol_1third_end] ';
88
+ break;
89
+ case '1third2third':
90
+ colTxt += '[wpcol_1third id="" class="" style=""]Third Column[/wpcol_1third] ';
91
+ colTxt += '[wpcol_2third_end id="" class="" style=""]Two Thirds Column[/wpcol_2third_end] ';
92
+ break;
93
+ case '2third1third':
94
+ colTxt += '[wpcol_2third id="" class="" style=""]Two Thirds Column[/wpcol_2third] ';
95
+ colTxt += '[wpcol_1third_end id="" class="" style=""]Third Column[/wpcol_1third_end] ';
96
+ break;
97
+ }
98
+ insertText();
99
+ }
100
+
101
+ function insertDiv(){
102
+ colTxt = ' ';
103
+ divID = document.getElementById('txtID').value;
104
+ divClass = document.getElementById('txtClass').value;
105
+ divStyle = document.getElementById('txtStyle').value;
106
+ colTxt += '[wpdiv id="';
107
+ if(divID != ''){
108
+ colTxt += divID;
109
+ }
110
+ colTxt += '" class="';
111
+ if(divClass != ''){
112
+ colTxt += divClass;
113
+ }
114
+ colTxt += '" style="';
115
+ if(divStyle != ''){
116
+ colTxt += divStyle;
117
+ }
118
+ colTxt += '"]Custom Div[/wpdiv] ';
119
+ insertText();
120
+ }
121
+
122
+ function insertClear(){
123
+ colTxt = ' ';
124
+ var sel = document.getElementById('selClearType');
125
+ var classType = sel.options[sel.selectedIndex].value;
126
+ switch(classType)
127
+ {
128
+ case 'left':
129
+ colTxt += '[wpcol_end_left]';
130
+ break;
131
+ case 'right':
132
+ colTxt += '[wpcol_end_right]';
133
+ break;
134
+ case 'both':
135
+ colTxt += '[wpcol_end_both]';
136
+ break;
137
+ case 'divider':
138
+ colTxt += '[wpcol_divider]';
139
+ break;
140
+ }
141
+ insertText();
142
+ }
143
+
144
+ function insertText(){
145
+ if(window.tinyMCE) {
146
+ window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, colTxt);
147
+ tinyMCEPopup.editor.execCommand('mceRepaint');
148
+ tinyMCEPopup.close();
149
+ }
150
+ return;
151
+ }
152
+ </script>
153
+ <base target="_self" />
154
+ <style type="text/css">
155
+ img {
156
+ border: none;
157
+ }
158
+ input[type="text"] {
159
+ font-size: 12px;
160
+ border: 1px solid #777;
161
+ line-height: 14px;
162
+ height: 16px;
163
+ }
164
+ select {
165
+ font-size: 12px;
166
+ }
167
+ .panel {
168
+ margin-bottom: 8px;
169
+ }
170
+ .hdrRow {
171
+ padding-top: 4px;
172
+ padding-bottom: 4px;
173
+ font-weight: bold;
174
+ }
175
+ </style>
176
+ </head>
177
+ <body id="link" onload="tinyMCEPopup.executeOnLoad('init();');">
178
+ <form name="cookieJar" action="#">
179
+
180
+ <div class="panel">
181
+
182
+ <table border="0" cellpadding="2" cellspacing="0">
183
+ <tr>
184
+ <td colspan="2" class="hdrRow">
185
+ Insert Single Column
186
+ </td>
187
+ </tr>
188
+ <tr>
189
+ <td colspan="2" align="center">
190
+ <a href="javascript:void(0);" onclick="insertColumns('quarter')";><img src="img/quarter.jpg" alt="One Quarter Column"></a>
191
+ &nbsp;
192
+ <a href="javascript:void(0);" onclick="insertColumns('half')";><img src="img/half.jpg" alt="One Half Column"></a>
193
+ &nbsp;
194
+ <a href="javascript:void(0);" onclick="insertColumns('threequarter')";><img src="img/threequarter.jpg" alt="One Three Quarter Column"></a>
195
+ &nbsp;
196
+ <a href="javascript:void(0);" onclick="insertColumns('third')";><img src="img/third.jpg" alt="One Third Column"></a>
197
+ &nbsp;
198
+ <a href="javascript:void(0);" onclick="insertColumns('twothirds')";><img src="img/twothirds.jpg" alt="One Two Thirds Column"></a>
199
+ </td>
200
+ </tr>
201
+ <tr>
202
+ <td colspan="2" class="hdrRow">
203
+ Insert Multiple Columns (1/4, 1/2, 3/4)
204
+ </td>
205
+ </tr>
206
+ <tr>
207
+ <td width="50%" align="center">
208
+ <a href="javascript:void(0);" onclick="insertColumns('4quarter')";><img src="img/4quarter.jpg" alt="Four Quarter Columns"></a>
209
+ </td>
210
+ <td width="50%" align="center">
211
+ <a href="javascript:void(0);" onclick="insertColumns('2half')";><img src="img/2half.jpg" alt="Two Half Columns"></a>
212
+ </td>
213
+ </tr>
214
+ <tr>
215
+ <td align="center">
216
+ <a href="javascript:void(0);" onclick="insertColumns('2quarter1half')";><img src="img/2quarter1half.jpg" alt="Two Quarter &amp; One Half Column"></a>
217
+ </td>
218
+ <td align="center">
219
+ <a href="javascript:void(0);" onclick="insertColumns('1quarter3quarter')";><img src="img/1quarter3quarter.jpg" alt="One Quarter &amp; One Three Quarter Column"></a>
220
+ </td>
221
+ </tr>
222
+ <tr>
223
+ <td align="center">
224
+ <a href="javascript:void(0);" onclick="insertColumns('1half2quarter')";><img src="img/1half2quarter.jpg" alt="One Half &amp; Two Quarter Columns"></a>
225
+ </td>
226
+ <td align="center">
227
+ <a href="javascript:void(0);" onclick="insertColumns('3quarter1quarter')";><img src="img/3quarter1quarter.jpg" alt="One Three Quarter &amp; One Quarter Column"></a>
228
+ </td>
229
+ </tr>
230
+ <tr>
231
+ <td align="center">
232
+ <a href="javascript:void(0);" onclick="insertColumns('quarterhalfquarter')";><img src="img/quarterhalfquarter.jpg" alt="One Quarter, One Half &amp; One Quarter Column"></a>
233
+ </td>
234
+ <td align="center">
235
+ &nbsp;
236
+ </td>
237
+ </tr>
238
+ <tr>
239
+ <td colspan="2" class="hdrRow">
240
+ Insert Multiple Columns (1/3, 2/3)
241
+ </td>
242
+ </tr>
243
+ <tr>
244
+ <td align="center">
245
+ <a href="javascript:void(0);" onclick="insertColumns('3third')";><img src="img/3third.jpg" alt="Three One Third Columns"></a>
246
+ </td>
247
+ <td align="center">
248
+ &nbsp;
249
+ </td>
250
+ </tr>
251
+ <tr>
252
+ <td align="center">
253
+ <a href="javascript:void(0);" onclick="insertColumns('1third2third')";><img src="img/1third2third.jpg" alt="One Third &amp; One Two Thirds Column"></a>
254
+ </td>
255
+ <td align="center">
256
+ &nbsp;
257
+ </td>
258
+ </tr>
259
+ <tr>
260
+ <td align="center">
261
+ <a href="javascript:void(0);" onclick="insertColumns('2third1third')";><img src="img/2third1third.jpg" alt="One Two Thirds &amp; One Third Column"></a>
262
+ </td>
263
+ <td align="center">
264
+ &nbsp;
265
+ </td>
266
+ </tr>
267
+ </table>
268
+ <table border="0" cellpadding="2" cellspacing="0">
269
+ <tr>
270
+ <td colspan="2" class="hdrRow">
271
+ Insert Clear Div
272
+ </td>
273
+ </tr>
274
+ <tr>
275
+ <td align="center">
276
+ <select id="selClearType">
277
+ <option value="left" selected="selected">left</option>
278
+ <option value="right">right</option>
279
+ <option value="both">both</option>
280
+ <option value="divider">divider</option>
281
+ </select>
282
+ </td>
283
+ <td>
284
+ <input type="button" id="insert" name="insert" value="Insert" onclick="insertClear();" />
285
+ </td>
286
+ </tr>
287
+ </table>
288
+ <table border="0" cellpadding="2" cellspacing="0">
289
+ <tr>
290
+ <td colspan="4" class="hdrRow">
291
+ Insert Custom DIV
292
+ </td>
293
+ </tr>
294
+ <tr>
295
+ <td>
296
+ <label for="txtID">ID:</label>
297
+ </td>
298
+ <td>
299
+ <input type="text" id="txtID" size="10">
300
+ </td>
301
+ <td>
302
+ <label for="txtClass">Class:</label>
303
+ </td>
304
+ <td>
305
+ <input type="text" id="txtClass" size="10">
306
+ </td>
307
+ <td rowspan="2" align="center" valign="bottom">
308
+ <input type="button" id="insert" name="insert" value="Insert" onclick="insertDiv();" />
309
+ </td>
310
+ </tr>
311
+ <tr>
312
+ <td>
313
+ <label for="txtStyle">Inline Style:</label>
314
+ </td>
315
+ <td colspan="3">
316
+ <input type="text" id="txtStyle" size="31">
317
+ </td>
318
+ </tr>
319
+ </table>
320
+
321
+ </div><!-- panel -->
322
+
323
+ <div class="mceActionPanel">
324
+ <div style="float: left">
325
+ <input type="button" id="cancel" name="cancel" value="Cancel" onclick="tinyMCEPopup.close();" />
326
+ </div>
327
+ <!--
328
+ <div style="float: right">
329
+ <input type="submit" id="insert" name="insert" value="Insert" onclick="insertAffiliateCookie();" />
330
+ </div>
331
+ -->
332
+ </div><!-- mceActionPanel -->
333
+
334
+ </form>
335
+ </body>
336
+ </html>