Collapse-O-Matic - Version 1.3.8

Version Description

  • Expand elements contnaining content with one empty space will no longer insert empty target elements.
Download this release

Release Info

Developer baden03
Plugin Icon 128x128 Collapse-O-Matic
Version 1.3.8
Comparing to
See all releases

Code changes from version 1.4 to 1.3.8

collapse-o-matic.php CHANGED
@@ -1,16 +1,15 @@
1
  <?php
2
  /*
3
  Plugin Name: jQuery Collapse-O-Matic
4
- Plugin URI: http://plugins.twinpictures.de/plugins/collapse-o-matic/
5
- Description: Collapse-O-Matic adds an [expand] shortcode that wraps content into a lovely, jQuery collapsible div.
6
- Version: 1.4
7
- Author: twinpictures, baden03
8
- Author URI: http://twinpictures.de/
9
  License: GPL2
10
-
11
  */
12
 
13
- /* Copyright 2012 Twinpictures (www.twinpictures.de)
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License, version 2, as
@@ -26,30 +25,18 @@ License: GPL2
26
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
  */
28
 
29
- function collapsTronicInit() {
30
- wp_enqueue_script('jquery');
31
-
32
- $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
33
- if (!is_admin()){
34
- //collapse script
35
- wp_register_script('collapseomatic-js', $plugin_url.'/collapse.js', array ('jquery'), '1.3.1' );
36
- wp_enqueue_script('collapseomatic-js');
37
 
38
- //css
39
- wp_register_style( 'collapseomatic-css', $plugin_url.'/style.css', array (), '1.5.1' );
40
- wp_enqueue_style( 'collapseomatic-css' );
41
- }
42
-
43
- add_shortcode('expand', 'collapsTronic');
44
 
45
- for ($i=1; $i<30; $i++) {
46
- add_shortcode('expandsub'.$i, 'collapsTronic');
47
- }
48
-
49
- //add the filter to the sidebar widgets
50
- add_filter('widget_text', 'do_shortcode');
51
  }
52
- add_action('init', 'collapsTronicInit');
53
 
54
 
55
  function collapsTronic($atts, $content = null){
@@ -63,89 +50,40 @@ function collapsTronic($atts, $content = null){
63
  'tag' => 'span',
64
  'trigclass' => '',
65
  'targclass' => '',
66
- 'trigpos' => 'above',
67
  'rel' => '',
68
  'expanded' => '',
69
- 'excerpt' => '',
70
- 'excerptpos' => 'below-trigger',
71
- 'excerpttag' => 'div',
72
- 'excerptclass' => '',
73
  ), $atts));
74
 
75
- if($excerpt){
76
- if($excerptpos == 'above-trigger'){
77
- $nibble = '<'.$excerpttag.' class="'.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
78
- }
79
- else{
80
- $nibble = '<'.$excerpttag.' class="collapseomatic_excerpt '.$excerptclass.'">'.$excerpt.'</'.$excerpttag.'>';
81
- }
82
-
83
- }
84
  $altatt = '';
85
  if($alt){
86
- $altatt = 'alt="'.$alt.'" title="'.$alt.'"';
87
- }
88
- else{
89
- $altatt = 'title="'.$title.'"';
90
  }
91
  $relatt = '';
92
  if($rel){
93
  $relatt = 'rel="'.$rel.'"';
94
  }
95
  if($expanded){
96
- $trigclass .= ' colomat-close';
97
  }
98
- $link = "<".$tag." class='collapseomatic ".$trigclass."' id='".$id."' ".$relatt." ".$altatt.">".$title."</".$tag.">\n";
99
  if($swaptitle){
100
- $link .= "<".$tag." id='swap-".$id."' style='display:none;'>".$swaptitle."</".$tag.">\n";
101
- }
102
- $eDiv = '';
103
- if($content){
104
- $eDiv = "<div id='target-".$id."' class='collapseomatic_content ".$targclass."'>".do_shortcode($content)."</div>\n";
105
- }
106
- if($excerpt){
107
- if($excerptpos == 'above-trigger'){
108
- if($trigpos == 'below'){
109
- $retStr = $eDiv.$nibble.$link;
110
- }
111
- else{
112
- $retStr = $nibble.$link.$eDiv;
113
- }
114
- }
115
- else if($excerptpos == 'below-trigger'){
116
- if($trigpos == 'below'){
117
- $retStr = $eDiv.$link.$nibble;
118
- }
119
- else{
120
- $retStr = $link.$nibble.$eDiv;
121
- }
122
- }
123
- else{
124
- if($trigpos == 'below'){
125
- $retStr = $eDiv.$link.$nibble;
126
- }
127
- else{
128
- $retStr = $link.$eDiv.$nibble;
129
- }
130
- }
131
  }
132
  else{
133
- if($trigpos == 'below'){
134
- $retStr = $eDiv.$link;
135
- }
136
- else{
137
- $retStr = $link.$eDiv;
138
- }
139
  }
140
- return $retStr;
141
  }
142
 
143
- /*
144
  add_shortcode('expand', 'collapsTronic');
145
- for ($i=1; $i<30; $i++) {
146
- add_shortcode('expandsub'.$i, 'collapsTronic');
147
- }
148
- */
149
 
150
  //add the filter to the sidebar widgets
151
  add_filter('widget_text', 'do_shortcode');
1
  <?php
2
  /*
3
  Plugin Name: jQuery Collapse-O-Matic
4
+ Plugin URI: http://www.twinpictures.de/jquery-collapse-o-matic-1-3/
5
+ Description: Collapse-O-Matic adds an `[expand]` shortcode that wraps content into a lovely, jQuery collapsible div.
6
+ Version: 1.3.8
7
+ Author: Twinpictures
8
+ Author URI: http://www.twinpictures.de
9
  License: GPL2
 
10
  */
11
 
12
+ /* Copyright 2011 Twinpictures (www.twinpictures.de)
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, version 2, as
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
  */
27
 
28
+ wp_enqueue_script('jquery');
 
 
 
 
 
 
 
29
 
30
+ $plugin_url = trailingslashit( get_bloginfo('wpurl') ).PLUGINDIR.'/'. dirname( plugin_basename(__FILE__) );
31
+ if (!is_admin()){
32
+ //collapse script
33
+ wp_register_script('collapseomatic-js', $plugin_url.'/collapse.js', array ('jquery'), '1.2.3' );
34
+ wp_enqueue_script('collapseomatic-js');
 
35
 
36
+ //css
37
+ wp_register_style( 'collapseomatic-css', $plugin_url.'/style.css', array (), '1.3' );
38
+ wp_enqueue_style( 'collapseomatic-css' );
 
 
 
39
  }
 
40
 
41
 
42
  function collapsTronic($atts, $content = null){
50
  'tag' => 'span',
51
  'trigclass' => '',
52
  'targclass' => '',
 
53
  'rel' => '',
54
  'expanded' => '',
 
 
 
 
55
  ), $atts));
56
 
 
 
 
 
 
 
 
 
 
57
  $altatt = '';
58
  if($alt){
59
+ $altatt = 'alt="'.$alt.'"';
 
 
 
60
  }
61
  $relatt = '';
62
  if($rel){
63
  $relatt = 'rel="'.$rel.'"';
64
  }
65
  if($expanded){
66
+ $trigclass .= ' close';
67
  }
68
+ $link = '<'.$tag.' class="collapseomatic '.$trigclass.'" title="';
69
  if($swaptitle){
70
+ $link .= $swaptitle;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  }
72
  else{
73
+ $link .= $title;
74
+ }
75
+ $link .= '" id="'.$id.'" '.$relatt.' '.$altatt.'>'.$title.'</'.$tag.'>';
76
+ $eDiv = '';
77
+ if($content != ' '){
78
+ $eDiv = '<div id="target-'.$id.'" class="collapseomatic_content '.$targclass.'">'.do_shortcode($content).'</div>';
79
  }
80
+ return $link . $eDiv;
81
  }
82
 
 
83
  add_shortcode('expand', 'collapsTronic');
84
+ add_shortcode('expandsub1', 'collapsTronic');
85
+ add_shortcode('expandsub2', 'collapsTronic');
86
+ add_shortcode('expandsub3', 'collapsTronic');
 
87
 
88
  //add the filter to the sidebar widgets
89
  add_filter('widget_text', 'do_shortcode');
collapse.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * jQuery Collapse-O-Matic v1.3.1
3
  * http://www.twinpictures.de/collapse-o-matic/
4
  *
5
- * Copyright 2012, Twinpictures
6
  *
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
  * of this software and associated documentation files (the "Software"), to deal
@@ -25,88 +25,57 @@
25
  */
26
 
27
  jQuery(document).ready(function() {
28
-
29
- //force collapse
30
- jQuery('.force_content_collapse').each(function(index) {
31
- jQuery(this).css('display', 'none');
32
- });
33
-
34
  //inital collapse
35
- jQuery('.collapseomatic:not(.colomat-close)').each(function(index) {
36
  var thisid = jQuery(this).attr('id');
37
  jQuery('#target-'+thisid).css('display', 'none');
38
  });
39
 
40
- //Display the collapse wrapper... use to reverse the show-all on no JavaScript degredation.
41
- jQuery('.content_collapse_wrapper').each(function(index) {
42
- jQuery(this).css('display', 'inline');
43
- });
44
-
45
  jQuery('.collapseomatic').hover(function () {
46
- jQuery(this).addClass("colomat-hover");
47
  },
48
  function () {
49
- jQuery(this).removeClass("colomat-hover");
50
  }
51
  );
52
 
53
  jQuery('.collapseomatic').click(function() {
54
- //alert('phones ringin dude');
55
- var id = jQuery(this).attr('id');
56
- if(id.indexOf('bot-') != '-1'){
57
- id = id.substr(4);
58
- jQuery('#'+id).toggleClass('colomat-close');
59
- }
60
- else{
61
- jQuery(this).toggleClass('colomat-close');
62
- }
63
- //check if the title needs to be swapped out
64
- if(jQuery("#swap-"+id).length > 0){
65
- var orightml = jQuery(this).html();
66
- var swaphtml = jQuery("#swap-"+id).html();
67
- jQuery(this).html(swaphtml);
68
- jQuery("#swap-"+id).html(orightml);
69
-
70
- //is cufon involved? if so, do that thing
71
- if(swaphtml.indexOf("<cufon") != -1){
72
- var trigelem = jQuery(this).get(0).tagName;
73
- Cufon.replace(trigelem);
74
- }
75
- }
76
-
77
- jQuery('#target-'+id).slideToggle('fast', function() {
78
- // Animation complete.
79
- });
80
 
81
  //deal with grouped items if needed
82
  if(jQuery(this).attr('rel') !== undefined){
83
  var rel = jQuery(this).attr('rel');
84
- if(rel.indexOf('-highlander') != '-1'){
85
- closeOtherMembers(rel, id);
86
- }
87
- else{
88
- closeOtherGroups(rel);
89
- }
90
  }
91
  });
92
 
93
  function closeOtherGroups(rel){
94
  jQuery('.collapseomatic[rel!="' + rel +'"]').each(function(index) {
95
  //add close class if open
96
- if(jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
97
- jQuery(this).removeClass('colomat-close');
98
  var id = jQuery(this).attr('id');
99
  jQuery('#target-'+id).slideToggle('fast', function() {
100
  // Animation complete.
101
  });
102
-
103
- //check if there are nested children that need to be collapsed
104
- var ancestors = jQuery('.collapseomatic', '#target-'+id);
105
- ancestors.each(function(index) {
106
- jQuery(this).removeClass('colomat-close');
107
- var thisid = jQuery(this).attr('id');
108
- jQuery('#target-'+thisid).css('display', 'none');
109
- })
110
  }
111
  });
112
  }
@@ -114,21 +83,12 @@ jQuery(document).ready(function() {
114
  function closeOtherMembers(rel, id){
115
  jQuery('.collapseomatic[rel="' + rel +'"]').each(function(index) {
116
  //add close class if open
117
- if(jQuery(this).attr('id') != id && jQuery(this).hasClass('colomat-close') && jQuery(this).attr('rel') !== undefined){
118
- //collapse the element
119
- jQuery(this).removeClass('colomat-close');
120
  var thisid = jQuery(this).attr('id');
121
  jQuery('#target-'+thisid).slideToggle('fast', function() {
122
  // Animation complete.
123
  });
124
-
125
- //check if there are nested children that need to be collapsed
126
- var ancestors = jQuery('.collapseomatic', '#target-'+id);
127
- ancestors.each(function(index) {
128
- jQuery(this).removeClass('colomat-close');
129
- var thisid = jQuery(this).attr('id');
130
- jQuery('#target-'+thisid).css('display', 'none');
131
- })
132
  }
133
  });
134
  }
@@ -141,102 +101,22 @@ jQuery(document).ready(function() {
141
  }
142
 
143
  jQuery('.expandall').click(function() {
144
- if(jQuery(this).attr('rel') !== undefined){
145
- var rel = jQuery(this).attr('rel');
146
- jQuery('.collapseomatic[rel="' + rel +'"].collapseomatic:not(.colomat-close)').each(function(index) {
147
- jQuery(this).addClass('colomat-close');
148
- var thisid = jQuery(this).attr('id');
149
-
150
- if(jQuery("#swap-"+thisid).length > 0){
151
- var orightml = jQuery(this).html();
152
- var swaphtml = jQuery("#swap-"+thisid).html();
153
- jQuery(this).html(swaphtml);
154
- jQuery("#swap-"+thisid).html(orightml);
155
-
156
- //is cufon involved? if so, do that thing
157
- if(swaphtml.indexOf("<cufon") != -1){
158
- var trigelem = jQuery(this).get(0).tagName;
159
- Cufon.replace(trigelem);
160
- }
161
- }
162
-
163
- jQuery('#target-'+thisid).slideToggle('fast', function() {
164
- // Animation complete.
165
- });
166
- });
167
- }
168
- else{
169
- jQuery('.collapseomatic:not(.colomat-close)').each(function(index) {
170
- jQuery(this).addClass('colomat-close');
171
- var thisid = jQuery(this).attr('id');
172
-
173
- if(jQuery("#swap-"+thisid).length > 0){
174
- var orightml = jQuery(this).html();
175
- var swaphtml = jQuery("#swap-"+thisid).html();
176
- jQuery(this).html(swaphtml);
177
- jQuery("#swap-"+thisid).html(orightml);
178
-
179
- //is cufon involved? if so, do that thing
180
- if(swaphtml.indexOf("<cufon") != -1){
181
- var trigelem = jQuery(this).get(0).tagName;
182
- Cufon.replace(trigelem);
183
- }
184
- }
185
-
186
- jQuery('#target-'+thisid).slideToggle('fast', function() {
187
- // Animation complete.
188
- });
189
- });
190
- }
191
  });
192
 
193
  jQuery('.collapseall').click(function() {
194
- if(jQuery(this).attr('rel') !== undefined){
195
- var rel = jQuery(this).attr('rel');
196
- jQuery('.collapseomatic[rel="' + rel +'"].collapseomatic.colomat-close').each(function(index) {
197
- jQuery(this).removeClass('colomat-close');
198
- var thisid = jQuery(this).attr('id');
199
-
200
- if(jQuery("#swap-"+thisid).length > 0){
201
- var orightml = jQuery(this).html();
202
- var swaphtml = jQuery("#swap-"+thisid).html();
203
- jQuery(this).html(swaphtml);
204
- jQuery("#swap-"+thisid).html(orightml);
205
-
206
- //is cufon involved? if so, do that thing
207
- if(swaphtml.indexOf("<cufon") != -1){
208
- var trigelem = jQuery(this).get(0).tagName;
209
- Cufon.replace(trigelem);
210
- }
211
- }
212
-
213
- jQuery('#target-'+thisid).slideToggle('fast', function() {
214
- // Animation complete.
215
- });
216
- });
217
- }
218
- else{
219
- jQuery('.collapseomatic.colomat-close').each(function(index) {
220
- jQuery(this).removeClass('colomat-close');
221
- var thisid = jQuery(this).attr('id');
222
-
223
- if(jQuery("#swap-"+thisid).length > 0){
224
- var orightml = jQuery(this).html();
225
- var swaphtml = jQuery("#swap-"+thisid).html();
226
- jQuery(this).html(swaphtml);
227
- jQuery("#swap-"+thisid).html(orightml);
228
-
229
- //is cufon involved? if so, do that thing
230
- if(swaphtml.indexOf("<cufon") != -1){
231
- var trigelem = jQuery(this).get(0).tagName;
232
- Cufon.replace(trigelem);
233
- }
234
- }
235
-
236
- jQuery('#target-'+thisid).slideToggle('fast', function() {
237
- // Animation complete.
238
- });
239
- });
240
- }
241
  });
242
  });
1
  /*!
2
+ * jQuery Collapse-O-Matic v1.2.3
3
  * http://www.twinpictures.de/collapse-o-matic/
4
  *
5
+ * Copyright 2011, Twinpictures
6
  *
7
  * Permission is hereby granted, free of charge, to any person obtaining a copy
8
  * of this software and associated documentation files (the "Software"), to deal
25
  */
26
 
27
  jQuery(document).ready(function() {
28
+
 
 
 
 
 
29
  //inital collapse
30
+ jQuery('.collapseomatic:not(.close)').each(function(index) {
31
  var thisid = jQuery(this).attr('id');
32
  jQuery('#target-'+thisid).css('display', 'none');
33
  });
34
 
 
 
 
 
 
35
  jQuery('.collapseomatic').hover(function () {
36
+ jQuery(this).addClass("hover");
37
  },
38
  function () {
39
+ jQuery(this).removeClass("hover");
40
  }
41
  );
42
 
43
  jQuery('.collapseomatic').click(function() {
44
+ //alert('phones ringin dude');
45
+ jQuery(this).toggleClass('close');
46
+ //check if the title needs to be swapped out
47
+ var title = jQuery(this).attr('title');
48
+ var htmlstr = jQuery(this).html();
49
+ if(title != htmlstr){
50
+ jQuery(this).attr('title', htmlstr);
51
+ jQuery(this).html(title);
52
+ }
53
+ var id = jQuery(this).attr('id');
54
+ jQuery('#target-'+id).slideToggle('fast', function() {
55
+ // Animation complete.
56
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
  //deal with grouped items if needed
59
  if(jQuery(this).attr('rel') !== undefined){
60
  var rel = jQuery(this).attr('rel');
61
+ if(rel.indexOf('-highlander') != '-1'){
62
+ closeOtherMembers(rel, id);
63
+ }
64
+ else{
65
+ closeOtherGroups(rel);
66
+ }
67
  }
68
  });
69
 
70
  function closeOtherGroups(rel){
71
  jQuery('.collapseomatic[rel!="' + rel +'"]').each(function(index) {
72
  //add close class if open
73
+ if(jQuery(this).hasClass('close') && jQuery(this).attr('rel') !== undefined){
74
+ jQuery(this).removeClass('close');
75
  var id = jQuery(this).attr('id');
76
  jQuery('#target-'+id).slideToggle('fast', function() {
77
  // Animation complete.
78
  });
 
 
 
 
 
 
 
 
79
  }
80
  });
81
  }
83
  function closeOtherMembers(rel, id){
84
  jQuery('.collapseomatic[rel="' + rel +'"]').each(function(index) {
85
  //add close class if open
86
+ if(jQuery(this).attr('id') != id && jQuery(this).hasClass('close') && jQuery(this).attr('rel') !== undefined){
87
+ jQuery(this).removeClass('close');
 
88
  var thisid = jQuery(this).attr('id');
89
  jQuery('#target-'+thisid).slideToggle('fast', function() {
90
  // Animation complete.
91
  });
 
 
 
 
 
 
 
 
92
  }
93
  });
94
  }
101
  }
102
 
103
  jQuery('.expandall').click(function() {
104
+ jQuery('.collapseomatic:not(.close)').each(function(index) {
105
+ jQuery(this).addClass('close');
106
+ var thisid = jQuery(this).attr('id');
107
+ jQuery('#target-'+thisid).slideToggle('fast', function() {
108
+ // Animation complete.
109
+ });
110
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  });
112
 
113
  jQuery('.collapseall').click(function() {
114
+ jQuery('.collapseomatic.close').each(function(index) {
115
+ jQuery(this).removeClass('close');
116
+ var thisid = jQuery(this).attr('id');
117
+ jQuery('#target-'+thisid).slideToggle('fast', function() {
118
+ // Animation complete.
119
+ });
120
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
121
  });
122
  });
images/arrow-down-dark.png ADDED
Binary file
images/arrow-up-dark.png ADDED
Binary file
images/arrows.psd ADDED
Binary file
readme.txt CHANGED
@@ -1,38 +1,38 @@
1
  === jQuery Collapse-O-Matic ===
2
 
3
- Contributors: twinpictures, baden03
4
- Donate link: http://plugins.twinpictures.de/plugins/collapse-o-matic/
5
- Tags: collapse, expand, collapsible, expandable, expandable content, collapsable content, shortcode, hidden, hide, display, accordion, accordion, jQuery, javascript, roll-your-own, twinpictures
6
  Requires at least: 2.8
7
- Tested up to: 3.3.1
8
- Stable tag: 1.4
9
 
10
- Remove clutter, save space: display and hide additional content in a SEO friendly way by warpping content in an [expand] shortcode.
11
 
12
  == Description ==
13
 
14
- Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery expanding and collapsing div. A <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options and attribute demos</a> are available, as well as <a href='http://wordpress.org/tags/jquery-collapse-o-matic'>free community</a> and <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/support/'>premium support</a>. This plug-in was inspired by DrLebowski's Collapsing Objects.
15
 
16
  == Installation ==
17
 
18
- 1. Old-school: upload the `collapse-o-matic` folder to the `/wp-content/plug-ins/` directory via FTP. Hipster: Ironically add collapse-o-matic via the WordPress Plug-ins menu.
19
- 1. Activate the Plug-in
20
- 1. Add a the shortcode to your post like so: `[expand title="Displayed Title Goes Here"]Hidden content goes here[/expand]`
21
- 1. Test that the this plug-in meets your demanding needs.
22
  1. Tweak the CSS to match your flavor.
23
- 1. Rate the plug-in and verify if it works at wordpress.org.
24
- 1. Leave a comment regarding bugs, feature request, cocktail recipes at http://wordpress.org/tags/jquery-collapse-o-matic/
25
 
26
  == Frequently Asked Questions ==
27
 
28
  = I am a Social Netwookiee, do you have a Facebook page? =
29
  Yes, yes... <a href='http://www.facebook.com/twinpictures'>Twinpictures is on Facebook</a>.
30
 
31
- = Does Twinpictures do the Twitter? =
32
- Ah yes! <a href='http://twitter.com/#!/twinpictures'>@Twinpictures</a> does the twitter tweeting around here.
33
 
34
  = How does one use the shortcode, exactly? =
35
- A <a href='http://plugins.twinpictures.de/plugins/collapse-o-matic/documentation/'>complete listing of shortcode options</a> has been provided to answer this exact question.
36
 
37
  = Is Galato the same as Ice Cream? =
38
  No. Not even close.
@@ -44,58 +44,16 @@ No. Not even close.
44
 
45
  == Changelog ==
46
 
47
- = 1.4 =
48
- * Relaunched of plugin page on Twinpictures' Plugin Oven
49
-
50
- = 1.3.18 =
51
- * Added alternate style sheet for sites with dark backgrounds.
52
-
53
- = 1.3.17 =
54
- * Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.
55
-
56
- = 1.3.16.1 =
57
- * Added noarrows class for better integration of images as triggers.
58
-
59
- = 1.3.16 =
60
- * Bug Fix for the new trigpos attribute, stupid, stupid, stupid
61
-
62
- = 1.3.15 =
63
- * Added trigpos attribute to position the trigger below the target.
64
-
65
- = 1.3.14 =
66
- * Fixed the Enqueue error (thanks pborg & lancehudson)
67
- * Expand All and Collapse All will now also trigger swap titles
68
- * Added force_content_collapse class trigger to hide all targets w/o tirggers (roll-your-own)
69
- * Added content_collapse_wrapper class trigger that keeps targets hidden if no JavaScript is present.
70
-
71
- = 1.3.13 =
72
- * Added the ability to place a second trigger link inside the expanding content area.
73
-
74
- = 1.3.12 =
75
- * Added the 'tracy patch' that will collapse all nested items if the parent is collapsed via highlander grouping.
76
-
77
- = 1.3.11 =
78
- * Added excerpt feature and all related attributes.
79
-
80
- = 1.3.10 =
81
- * Swaptitle system rebuilt to support images and cufon.
82
- * Updated CSS the over generalized names close and hover to more plug-in specific colomat-close and colomat-hover
83
- * removed !important from CSS arrow definitions to make it easier to redefine arrows.
84
-
85
- = 1.3.9 =
86
- * Swaptitle will not be triggered if either <img> or <cufon> tags are used in trigger titles
87
- * Added rel grouping to the collapse/expand-all triggers to target only elements of a single group.
88
-
89
  = 1.3.8 =
90
- * Expand elements containing content with one empty space will no longer insert empty target elements.
91
 
92
  = 1.3.7 =
93
  * Added expandsub1 - expandsub3 shortcodes for nested expand elements.
94
- * Added collapse/expand-all triggers.
95
  * Better looking 24bit arrows.
96
 
97
  = 1.3.6 =
98
- * Plug-in now degrades gracefully if JS is disabled. Added swaptitle attribute to change the title on expand/collapse.
99
 
100
  = 1.3.5 =
101
  * Random ID's now start with letters, for valid xhtml.
@@ -104,73 +62,36 @@ No. Not even close.
104
  * Changed '-member' to '-highlander' because it sounds better.
105
 
106
  = 1.3.3 =
107
- * Added the ability to have only one member of a group expanded by adding '-member' to the rel attribute value.
108
 
109
  = 1.3.2 =
110
- * Added Expanded attribute that sets the default position expanded open.
111
  * Added style that moves arrows to the right of the text.
112
 
113
  = 1.3.1 =
114
  * Added the hover style to pimp the element style when moused over.
115
 
116
  = 1.3 =
117
- * Added the rel attribute to deal with grouping collapse elements.
118
  * Added the trigclass and targclass attributes.
119
  * Added the alt attribute to define the title's hover-over text.
120
 
121
  = 1.2 =
122
  * Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
123
  * Style will support various element tags... span, div, h1, h2... etc.
124
- * Style separates the arrow icons, so there is no background bleed-over on extra-long trigger titles.
125
 
126
  = 1.1 =
127
  * Optimized Code
128
  * Shortcode now works in Sidebar
129
  * Expand Titles now have title tags that match the title, not just some random number
130
- * Shortcode can include a user-defined ID instead of a generated random number
131
  * Added auto expand feature if an anchor tag is used in the URL
132
 
133
  = 1.0 =
134
- * The plug-in came to be.
135
 
136
  == Upgrade Notice ==
137
-
138
- = 1.4 =
139
- * Improved support and FAQs on Plugin Oven support page
140
-
141
- = 1.3.18 =
142
- * Added alternate style sheet for sites with dark backgrounds.
143
-
144
- = 1.3.17 =
145
- * Improved nesting collapse function for sub-levels and added support for nesting 30 levels deep.
146
-
147
- = 1.3.16.1 =
148
- * Added noarrows class for better integration of images as triggers.
149
-
150
- = 1.3.16 =
151
- * Bug Fix for the new trigpos attribute, stupid, stupid, stupid
152
-
153
- = 1.3.15 =
154
- Added trigpos attribute to position the trigger below the target.
155
-
156
- = 1.3.14 =
157
- Fixed Enqueue error and swap title on expand/collpase all. Expanded roll-your-own features.
158
-
159
- = 1.3.13 =
160
- Added the ability to place a second trigger link inside the expanding content area.
161
-
162
- = 1.3.12 =
163
- Now when Highlander Grouping collapses an element, it will automatically collapse nested elements as well.
164
-
165
- = 1.3.11 =
166
- Added excerpt feature that allows a juicy bit of nibble text to be displayed above and below the trigger text&mdash;as well as below the target text.
167
-
168
- = 1.3.10 =
169
- Rebuilt swaptitle to support images and cufon text. Change CSS names to be more plug-in specific.
170
-
171
- = 1.3.9 =
172
- Title triggers that contain <img> or <cufon> tags will not trigger swaptitle. Added rel grouping option to expand/collapse-all triggers.
173
-
174
  = 1.3.8 =
175
  Expand elements that have content containing only one space will not insert target elements.
176
 
@@ -178,7 +99,7 @@ Expand elements that have content containing only one space will not insert targ
178
  New expandsub1 - expandsub3 shortcodes for nested expand elements. Collapse/Expand all triggers. Improved arrow icons.
179
 
180
  = 1.3.6 =
181
- Plug-in degrades gracefully when JS is disabled. Title can now have expand/collapse states using swaptitle attribute.
182
 
183
  = 1.3.5 =
184
  Random ID's are now valid xhtml.
@@ -199,10 +120,10 @@ Hover style added.
199
  Collapse-O-Matic has been significantly advanced. Elements can now be grouped together.
200
 
201
  = 1.2 =
202
- Style has been updated for ultimate flexibility. Shortcode can now be written as `[expand title="title goes here" id="optional-id-goes-here" tag="optional-html-tag-goes-here"]content goes here[/expand]`.
203
 
204
  = 1.1 =
205
- Shortcode now works in sidebars. Shortcode must be written as `[expand title="title goes here" id="optional-id-goes-here"]content goes here[/expand]`.
206
 
207
  = 1.0 =
208
  Where once there was not, there now is.
1
  === jQuery Collapse-O-Matic ===
2
 
3
+ Contributors: Twinpictures, DrLebowski
4
+ Donate link: http://www.twinpictures.de/collapse-o-matic/
5
+ Tags: collapse, expand, collapsible, expandable, content, shortcode, hidden, jQuery, javascript, twinpictures
6
  Requires at least: 2.8
7
+ Tested up to: 3.1
8
+ Stable tag: 1.3.8
9
 
10
+ Collapse-O-Matic adds an `[expand]` shortcode that wraps any object or content--including other shortcodes--into a lovely jQuery collapsible div.
11
 
12
  == Description ==
13
 
14
+ Collapse-O-Matic adds an `[expand title="trigger text"]hidden content[/expand]` shortcode that will wrap any content, including other shortcodes, into a lovely jQuery collapsible div. A <a href='http://www.twinpictures.de/jquery-collapse-o-matic-1-3/'>complete listing of shortcode options</a> and attribute demos are available. This plugin was inspired by DrLebowski's Collapsing Objects.
15
 
16
  == Installation ==
17
 
18
+ 1. Old-school: upload the `collapse-o-matic` folder to the `/wp-content/plugins/` directory via FTP. Hipster: Ironically add collapse-o-matic via the WordPress Plugins menu.
19
+ 1. Activate the Plugin
20
+ 1. Add a the shortcode to your post like so: `[expand title=Displayed Title Goes Here]Hidden content goes here[/expand]`
21
+ 1. Test that the this plugin meets your demanding needs.
22
  1. Tweak the CSS to match your flavor.
23
+ 1. Rate the plugin and verify if it works at wordpress.org.
24
+ 1. Leave a comment regarding bugs, feature request, cocktail recipes at http://www.twinpictures.de/jquery-collapse-o-matic-1-3/
25
 
26
  == Frequently Asked Questions ==
27
 
28
  = I am a Social Netwookiee, do you have a Facebook page? =
29
  Yes, yes... <a href='http://www.facebook.com/twinpictures'>Twinpictures is on Facebook</a>.
30
 
31
+ = Does Twinpictures do the Twiter? =
32
+ Ah yes! <a href='twitter.com/switzerbaden'>@SwitzerBaden at Twitter</a> does the tweeting around here.
33
 
34
  = How does one use the shortcode, exactly? =
35
+ A <a href='http://www.twinpictures.de/jquery-collapse-o-matic-1-3/'>complete listing of shortcode options</a> has been provided to answer this exact question.
36
 
37
  = Is Galato the same as Ice Cream? =
38
  No. Not even close.
44
 
45
  == Changelog ==
46
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  = 1.3.8 =
48
+ * Expand elements contnaining content with one empty space will no longer insert empty target elements.
49
 
50
  = 1.3.7 =
51
  * Added expandsub1 - expandsub3 shortcodes for nested expand elements.
52
+ * Added collapseall and expandall triggers.
53
  * Better looking 24bit arrows.
54
 
55
  = 1.3.6 =
56
+ * Plugin now degrades gracefully if JS is disabled. Added swaptitle attribute to change the title on expand/collapse.
57
 
58
  = 1.3.5 =
59
  * Random ID's now start with letters, for valid xhtml.
62
  * Changed '-member' to '-highlander' because it sounds better.
63
 
64
  = 1.3.3 =
65
+ * Added the ability to have only one member of a group expanded by ading '-member' to the rel attribute value.
66
 
67
  = 1.3.2 =
68
+ * Added Expanded attribute that sets the default positon expanded open.
69
  * Added style that moves arrows to the right of the text.
70
 
71
  = 1.3.1 =
72
  * Added the hover style to pimp the element style when moused over.
73
 
74
  = 1.3 =
75
+ * Added the rel attribute to deal with grouping collpase elements.
76
  * Added the trigclass and targclass attributes.
77
  * Added the alt attribute to define the title's hover-over text.
78
 
79
  = 1.2 =
80
  * Expanded the shortcode to include an optional tag attribute. The system defaults to wrapping the trigger in a span tag.
81
  * Style will support various element tags... span, div, h1, h2... etc.
82
+ * Style seperates the arrow icons, so there is no background bleed-over on extra-long trigger titles.
83
 
84
  = 1.1 =
85
  * Optimized Code
86
  * Shortcode now works in Sidebar
87
  * Expand Titles now have title tags that match the title, not just some random number
88
+ * Shorcode can include a user-defined ID instead of a generated random number
89
  * Added auto expand feature if an anchor tag is used in the URL
90
 
91
  = 1.0 =
92
+ * The plugin came to be.
93
 
94
  == Upgrade Notice ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  = 1.3.8 =
96
  Expand elements that have content containing only one space will not insert target elements.
97
 
99
  New expandsub1 - expandsub3 shortcodes for nested expand elements. Collapse/Expand all triggers. Improved arrow icons.
100
 
101
  = 1.3.6 =
102
+ Plugin degrades gracefully when JS is disabled. Title can now have expand/collapse states using swaptitle attribute.
103
 
104
  = 1.3.5 =
105
  Random ID's are now valid xhtml.
120
  Collapse-O-Matic has been significantly advanced. Elements can now be grouped together.
121
 
122
  = 1.2 =
123
+ Style has been updated for ultimate flexibility. Shorcode can now be written as `[expand title="title goes here" id="optional-id-goes-here" tag="optional-html-tag-goes-here"]content goes here[/expand]`.
124
 
125
  = 1.1 =
126
+ Shortcode now works in sidebars. Shorcode must be written as `[expand title="title goes here" id="optional-id-goes-here"]content goes here[/expand]`.
127
 
128
  = 1.0 =
129
  Where once there was not, there now is.
style-dark.css DELETED
@@ -1,35 +0,0 @@
1
- .collapseomatic {
2
- background-image: url(images/arrow-down-dark.png);
3
- background-repeat: no-repeat;
4
- padding: 0 0 10px 16px;
5
- /*border: 1px dotted blue;*/
6
- cursor: pointer;
7
- }
8
- .arrowright {
9
- background-position: top right;
10
- padding: 0 16px 10px 0;
11
- }
12
- .noarrow {
13
- background-image: none !important;
14
- padding: 0 0 10px 0;
15
- }
16
- .colomat-hover {
17
- text-decoration: underline;
18
- }
19
- .colomat-close {
20
- background-image: url(images/arrow-up-dark.png);
21
- }
22
- .collapseomatic_excerpt, .collapseomatic_content {
23
- margin-top: 0px;
24
- margin-left: 16px;
25
- padding: 0px;
26
- }
27
- .content_collapse_wrapper {
28
- display: none;
29
- }
30
- .collapseall, .expandall {
31
- cursor: pointer;
32
- }
33
- .collapseall:hover, .expandall:hover {
34
- text-decoration: underline;
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style.css CHANGED
@@ -1,35 +1,29 @@
1
  .collapseomatic {
2
- background-image: url(images/arrow-down.png);
3
  background-repeat: no-repeat;
4
  padding: 0 0 10px 16px;
5
- /*border: 1px dotted blue;*/
6
  cursor: pointer;
7
  }
8
  .arrowright {
9
  background-position: top right;
10
  padding: 0 16px 10px 0;
11
  }
12
- .noarrow {
13
- background-image: none !important;
14
- padding: 0 0 10px 0;
15
- }
16
- .colomat-hover {
17
  text-decoration: underline;
18
  }
19
- .colomat-close {
20
- background-image: url(images/arrow-up.png);
21
  }
22
- .collapseomatic_excerpt, .collapseomatic_content {
23
  margin-top: 0px;
24
  margin-left: 16px;
25
  padding: 0px;
26
  }
27
- .content_collapse_wrapper {
28
- display: none;
29
- }
30
  .collapseall, .expandall {
31
  cursor: pointer;
32
  }
 
33
  .collapseall:hover, .expandall:hover {
34
  text-decoration: underline;
35
- }
1
  .collapseomatic {
2
+ background-image: url(images/arrow-down.png) !important;
3
  background-repeat: no-repeat;
4
  padding: 0 0 10px 16px;
 
5
  cursor: pointer;
6
  }
7
  .arrowright {
8
  background-position: top right;
9
  padding: 0 16px 10px 0;
10
  }
11
+ .hover {
 
 
 
 
12
  text-decoration: underline;
13
  }
14
+ .close {
15
+ background-image: url(images/arrow-up.png) !important;
16
  }
17
+ .collapseomatic_content {
18
  margin-top: 0px;
19
  margin-left: 16px;
20
  padding: 0px;
21
  }
22
+
 
 
23
  .collapseall, .expandall {
24
  cursor: pointer;
25
  }
26
+
27
  .collapseall:hover, .expandall:hover {
28
  text-decoration: underline;
29
+ }