Ultimate Tag Cloud Widget - Version 1.3.10

Version Description

  • Fixed shortcode problem where the content would appear at the top of a post/page instead of where the shortcode was placed.
  • Fixed shortcode problem where you couldn't possibly enter some values as array types, now accepting a comma separated list for $tags_list, $color_set and $authors
  • Updated spelling error in the documentation which caused some confusion
Download this release

Release Info

Developer exz
Plugin Icon wp plugin Ultimate Tag Cloud Widget
Version 1.3.10
Comparing to
See all releases

Code changes from version 1.3.9 to 1.3.10

Files changed (4) hide show
  1. readme.txt +17 -6
  2. ultimate-tag-cloud-widget.php +78 -10
  3. utcw.css +97 -1
  4. utcw.js +38 -1
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: exz
3
  Tags: widget, tags, configurable, tag cloud
4
  Requires at least: 2.8
5
- Tested up to: 3.2.1
6
- Stable tag: 1.3.9
7
  Donate link: https://flattr.com/thing/112193/Ultimate-Tag-Cloud-Widget
8
 
9
  This plugin aims to be the most configurable tag cloud widget out there, able to suit all your wierd tag cloud needs.
@@ -57,6 +57,12 @@ This is a new plugin, haven't had any questions yet. If you have any, be sure to
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
60
  = 1.3.9 =
61
 
62
  * Added shortcode [utcw]
@@ -126,6 +132,10 @@ This is a new plugin, haven't had any questions yet. If you have any, be sure to
126
 
127
  == Upgrade Notice ==
128
 
 
 
 
 
129
  = 1.3.9 =
130
 
131
  * Added shortcode
@@ -214,13 +224,13 @@ This is the list of all the options that you can set, which works both in the sh
214
  * size_to (integer)
215
  * max (integer)
216
  * reverse (boolean)
217
- * authors (array of user IDs, integers)
218
- * tag_list (array of taxonomies, IDs or names to be included or excluded)
219
- * tag_list_type (include or exclude, defines how to handle the tag_list)
220
  * minimum (integer)
221
  * days_old (integer)
222
  * page_tags (boolean)
223
- * color_set (array of hex colors, like #fff or #ffffff)
224
  * letter_spacing (integer)
225
  * word_spacing (integer)
226
  * tag_spacing (integer)
@@ -251,6 +261,7 @@ This is the list of all the options that you can set, which works both in the sh
251
  * separator (string)
252
  * prefix (string)
253
  * suffix (string)
 
254
 
255
  All options are optional, default values can be found in the widget php file. Valid values for order, taxonomy, color and case can be found in the arrays $utcw_allowed_orders, taxonomys, colors and cases respectively.
256
 
2
  Contributors: exz
3
  Tags: widget, tags, configurable, tag cloud
4
  Requires at least: 2.8
5
+ Tested up to: 3.3
6
+ Stable tag: 1.3.10
7
  Donate link: https://flattr.com/thing/112193/Ultimate-Tag-Cloud-Widget
8
 
9
  This plugin aims to be the most configurable tag cloud widget out there, able to suit all your wierd tag cloud needs.
57
 
58
  == Changelog ==
59
 
60
+ = 1.3.10 =
61
+
62
+ * Fixed shortcode problem where the content would appear at the top of a post/page instead of where the shortcode was placed.
63
+ * Fixed shortcode problem where you couldn't possibly enter some values as array types, now accepting a comma separated list for $tags_list, $color_set and $authors
64
+ * Updated spelling error in the documentation which caused some confusion
65
+
66
  = 1.3.9 =
67
 
68
  * Added shortcode [utcw]
132
 
133
  == Upgrade Notice ==
134
 
135
+ = 1.3.10 =
136
+
137
+ * Some shortcode bugfixes
138
+
139
  = 1.3.9 =
140
 
141
  * Added shortcode
224
  * size_to (integer)
225
  * max (integer)
226
  * reverse (boolean)
227
+ * authors (array of user IDs or CSV, integers)
228
+ * tags_list (array of taxonomies or CSV, IDs or names to be included or excluded)
229
+ * tags_list_type (include or exclude, defines how to handle the tag_list)
230
  * minimum (integer)
231
  * days_old (integer)
232
  * page_tags (boolean)
233
+ * color_set (array of hex colors or CSV, like #fff or #ffffff)
234
  * letter_spacing (integer)
235
  * word_spacing (integer)
236
  * tag_spacing (integer)
261
  * separator (string)
262
  * prefix (string)
263
  * suffix (string)
264
+ * return (boolean)
265
 
266
  All options are optional, default values can be found in the widget php file. Valid values for order, taxonomy, color and case can be found in the arrays $utcw_allowed_orders, taxonomys, colors and cases respectively.
267
 
ultimate-tag-cloud-widget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ultimate tag cloud widget
4
  Plugin URI: http://www.0x539.se/wordpress/ultimate-tag-cloud-widget/
5
  Description: This plugin aims to be the most configurable tag cloud widget out there, able to suit all your wierd tag cloud needs.
6
- Version: 1.3.9
7
  Author: Rickard Andersson
8
  Author URI: http://www.0x539.se
9
  License: GPLv2
@@ -62,6 +62,8 @@ DEFINE("UTCW_DEFAULT_LINE_HEIGHT", "inherit");
62
  DEFINE("UTCW_DEFAULT_SEPARATOR", " ");
63
  DEFINE("UTCW_DEFAULT_PREFIX", "");
64
  DEFINE("UTCW_DEFAULT_SUFFIX", "");
 
 
65
 
66
  // Allowed values for miscellanious options in the widget
67
  $utcw_allowed_orders = array('random', 'name', 'slug', 'id', 'color', 'count');
@@ -76,8 +78,6 @@ $utcw_allowed_border_styles = array('none', 'dotted', 'dashed', 'solid', 'doub
76
  * Ultimate tag cloud widget class
77
  * @package UTCW
78
  * @author Rickard Andersson <rickard@0x539.se>
79
- * @todo Separator between tabs
80
- * @todo Improve include/exclude tags setting
81
  */
82
  class UTCW extends WP_Widget {
83
 
@@ -260,7 +260,7 @@ class UTCW extends WP_Widget {
260
  /**
261
  * do_utcw - Prints markup for the widget
262
  * @param array $args An array with widget settings. See {@link http://wordpress.org/extend/plugins/ultimate-tag-cloud-widget/other_notes/} for details on which options you can set.
263
- * @return void
264
  */
265
  function do_utcw($args) {
266
 
@@ -285,9 +285,6 @@ function do_utcw($args) {
285
  $max = is_numeric($max) ? $max : UTCW_DEFAULT_MAX;
286
  $reverse = is_bool($reverse) ? $reverse : UTCW_DEFAULT_REVERSE;
287
  $minimum = is_numeric($minimum) ? $minimum : UTCW_DEFAULT_MINIMUM;
288
- $authors = is_array($authors) ? $authors : array();
289
- $tags_list = is_array($tags_list) ? $tags_list : array();
290
- $color_set = is_array($color_set) ? $color_set : array();
291
  $letter_spacing = is_numeric($letter_spacing) ? $letter_spacing . "px" : UTCW_DEFAULT_LETTER_SPACING;
292
  $word_spacing = is_numeric($word_spacing) ? $word_spacing . "px" : UTCW_DEFAULT_WORD_SPACING;
293
  $tag_spacing = is_numeric($tag_spacing) ? $tag_spacing . "px" : UTCW_DEFAULT_TAG_SPACING;
@@ -322,6 +319,54 @@ function do_utcw($args) {
322
  $hover_italic = in_array($hover_italic, $utcw_allowed_booleans) ? $hover_italic : UTCW_DEFAULT_HOVER_ITALIC;
323
  $hover_border_style = in_array($hover_border_style, $utcw_allowed_border_styles) ? $hover_border_style : UTCW_DEFAULT_HOVER_BORDER_STYLE;
324
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  // Fallback values
326
  $counts = array();
327
  $tag_array = array();
@@ -352,7 +397,7 @@ function do_utcw($args) {
352
  if (count($authors) > 0) {
353
  $sql[] = "AND post_author IN (" . implode(",", $authors) . ")";
354
  }
355
-
356
  // Setting include or exclude directive
357
  if (count($tags_list) > 0) {
358
 
@@ -519,6 +564,10 @@ function do_utcw($args) {
519
  default:
520
  $text_transform = '';
521
  }
 
 
 
 
522
 
523
  // Print the tag cloud content
524
  echo $before_widget;
@@ -600,7 +649,7 @@ function do_utcw($args) {
600
 
601
  echo "</div>";
602
 
603
- if ($debug === true) {
604
  echo "<!-- Ultimate Tag Cloud Debug information: "; var_dump($args);
605
  echo "\n\n SQL Query:" . $query;
606
  echo "\n\n Tag Data: "; var_dump($tag_data);
@@ -608,6 +657,25 @@ function do_utcw($args) {
608
  }
609
 
610
  echo $after_widget;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
611
  }
612
 
613
  /**
@@ -650,7 +718,7 @@ function utcw_init() {
650
  wp_enqueue_script('utcw-js');
651
  wp_enqueue_style('utcw-css');
652
 
653
- add_shortcode('utcw', 'do_utcw');
654
  }
655
  add_action('init', 'utcw_init');
656
 
3
  Plugin Name: Ultimate tag cloud widget
4
  Plugin URI: http://www.0x539.se/wordpress/ultimate-tag-cloud-widget/
5
  Description: This plugin aims to be the most configurable tag cloud widget out there, able to suit all your wierd tag cloud needs.
6
+ Version: 1.3.10
7
  Author: Rickard Andersson
8
  Author URI: http://www.0x539.se
9
  License: GPLv2
62
  DEFINE("UTCW_DEFAULT_SEPARATOR", " ");
63
  DEFINE("UTCW_DEFAULT_PREFIX", "");
64
  DEFINE("UTCW_DEFAULT_SUFFIX", "");
65
+ DEFINE("UTCW_DEFAULT_BG_COLOR", "transparent");
66
+
67
 
68
  // Allowed values for miscellanious options in the widget
69
  $utcw_allowed_orders = array('random', 'name', 'slug', 'id', 'color', 'count');
78
  * Ultimate tag cloud widget class
79
  * @package UTCW
80
  * @author Rickard Andersson <rickard@0x539.se>
 
 
81
  */
82
  class UTCW extends WP_Widget {
83
 
260
  /**
261
  * do_utcw - Prints markup for the widget
262
  * @param array $args An array with widget settings. See {@link http://wordpress.org/extend/plugins/ultimate-tag-cloud-widget/other_notes/} for details on which options you can set.
263
+ * @return void|string
264
  */
265
  function do_utcw($args) {
266
 
285
  $max = is_numeric($max) ? $max : UTCW_DEFAULT_MAX;
286
  $reverse = is_bool($reverse) ? $reverse : UTCW_DEFAULT_REVERSE;
287
  $minimum = is_numeric($minimum) ? $minimum : UTCW_DEFAULT_MINIMUM;
 
 
 
288
  $letter_spacing = is_numeric($letter_spacing) ? $letter_spacing . "px" : UTCW_DEFAULT_LETTER_SPACING;
289
  $word_spacing = is_numeric($word_spacing) ? $word_spacing . "px" : UTCW_DEFAULT_WORD_SPACING;
290
  $tag_spacing = is_numeric($tag_spacing) ? $tag_spacing . "px" : UTCW_DEFAULT_TAG_SPACING;
319
  $hover_italic = in_array($hover_italic, $utcw_allowed_booleans) ? $hover_italic : UTCW_DEFAULT_HOVER_ITALIC;
320
  $hover_border_style = in_array($hover_border_style, $utcw_allowed_border_styles) ? $hover_border_style : UTCW_DEFAULT_HOVER_BORDER_STYLE;
321
 
322
+ $return = (isset($return) && $return == true);
323
+
324
+ // Auhtors can be given as a comma separated list from the shortcode,
325
+ // try to explode it and validate the values
326
+ if (isset($authors)) {
327
+ if (!is_array($authors)) {
328
+ $authors = explode(",", $authors);
329
+
330
+ foreach ($authors as $key => $author) {
331
+ if (!is_numeric($author)) {
332
+ unset($authors[ $key ]);
333
+ }
334
+ }
335
+ }
336
+ } else {
337
+ $authors = array();
338
+ }
339
+
340
+ // Same for $tags_list
341
+ if (isset($tags_list)) {
342
+ if (!is_array($tags_list)) {
343
+ $tags_list = explode(",", $tags_list);
344
+
345
+ foreach ($tags_list as $key => $tl) {
346
+ if (!is_numeric($tl)) {
347
+ unset($tags_list[ $key ]);
348
+ }
349
+ }
350
+ }
351
+ } else {
352
+ $tags_list = array();
353
+ }
354
+
355
+ // Same for $color_set but with different validation
356
+ if (isset($color_set)) {
357
+ if (!is_array($color_set)) {
358
+ $color_set = explode(",", $color_set);
359
+
360
+ foreach ($color_set as $key => $cs) {
361
+ if (!preg_match('/#([a-f0-9]{6}|[a-f0-9]{3})/i', $cs)) {
362
+ unset($color_set[ $key ]);
363
+ }
364
+ }
365
+ }
366
+ } else {
367
+ $color_set = array();
368
+ }
369
+
370
  // Fallback values
371
  $counts = array();
372
  $tag_array = array();
397
  if (count($authors) > 0) {
398
  $sql[] = "AND post_author IN (" . implode(",", $authors) . ")";
399
  }
400
+
401
  // Setting include or exclude directive
402
  if (count($tags_list) > 0) {
403
 
564
  default:
565
  $text_transform = '';
566
  }
567
+
568
+ if ($return === true) {
569
+ ob_start();
570
+ }
571
 
572
  // Print the tag cloud content
573
  echo $before_widget;
649
 
650
  echo "</div>";
651
 
652
+ if ($debug == true) {
653
  echo "<!-- Ultimate Tag Cloud Debug information: "; var_dump($args);
654
  echo "\n\n SQL Query:" . $query;
655
  echo "\n\n Tag Data: "; var_dump($tag_data);
657
  }
658
 
659
  echo $after_widget;
660
+
661
+ if ($return === true) {
662
+ $markup = ob_get_contents();
663
+ ob_end_clean();
664
+ return $markup;
665
+ }
666
+ }
667
+
668
+ /**
669
+ * Function for using the widget with a shortcode
670
+ * @param array $args
671
+ * @return string
672
+ */
673
+ function do_utcw_shortcode($args) {
674
+
675
+ // Shortcodes should return values, not echo out
676
+ $args['return'] = true;
677
+
678
+ return do_utcw($args);
679
  }
680
 
681
  /**
718
  wp_enqueue_script('utcw-js');
719
  wp_enqueue_style('utcw-css');
720
 
721
+ add_shortcode('utcw', 'do_utcw_shortcode');
722
  }
723
  add_action('init', 'utcw_init');
724
 
utcw.css CHANGED
@@ -1 +1,97 @@
1
- .utcw-tab-button{border-top:solid 1px #dfdfdf;border-left:solid 1px #dfdfdf;border-right:solid 1px #dfdfdf;border-bottom:0;margin:0;-webkit-border-top-left-radius:3px;-webkit-border-top-right-radius:3px;-moz-border-radius-topleft:3px;-moz-border-radius-topright:3px;border-top-left-radius:3px;border-top-right-radius:3px;padding:2px;background:transparent;opacity:.5;cursor:pointer;-webkit-transition:opacity .1s ease-in}.utcw-tab-button:hover{opacity:1}.utcw-help{float:right;display:block;width:14px;height:14px;border:solid 1px transparent;-webkit-border-radius:14px;-moz-border-radius:14px;-khtml-border-radius:14px;border-radius:14px;text-align:center;color:#fff;font-weight:bold;background-color:#6295fb;background-image:-webkit-gradient(linear,left top,left bottom,from(#6295fb),to(#3265cb));background-image:-webkit-linear-gradient(top,#6295fb,#3265cb);background-image:-moz-linear-gradient(top,#6295fb,#3265cb);background-image:-ms-linear-gradient(top,#6295fb,#3265cb);background-image:-o-linear-gradient(top,#6295fb,#3265cb);background-image:linear-gradient(top,#6295fb,#3265cb);cursor:pointer}.utcw-help:hover{color:#fff}.tooltip{color:#000;width:200px;text-align:center;border:solid 1px #6295fb;-webkit-border-radius:9px;-moz-border-radius:9px;-khtml-border-radius:9px;border-radius:9px}.tooltip ul{list-style-type:circle;margin:10px 0}.tooltip li{margin:0 0 0 20px}.utcw h3{margin:0}.utcw-active{font-weight:bold;opacity:1}fieldset.utcw{padding:10px;border:solid 1px #dfdfdf;margin-bottom:25px}fieldset.utcw legend{letter-spacing:2px;font-size:16px}.utcw-hidden{display:none}div.widget_utcw{word-wrap:break-word}.utcw .fullwidth{width:100%}fieldset.utcw label.two-col{width:120px;display:inline-block}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .utcw-tab-button {
2
+ border-top: solid 1px #dfdfdf;
3
+ border-left: solid 1px #dfdfdf;
4
+ border-right: solid 1px #dfdfdf;
5
+ border-bottom: none;
6
+ margin: 0;
7
+ -webkit-border-top-left-radius: 3px;
8
+ -webkit-border-top-right-radius: 3px;
9
+ -moz-border-radius-topleft: 3px;
10
+ -moz-border-radius-topright: 3px;
11
+ border-top-left-radius: 3px;
12
+ border-top-right-radius: 3px;
13
+ padding: 2px;
14
+ background: transparent;
15
+ opacity: 0.5;
16
+ cursor: pointer;
17
+ -webkit-transition: opacity 0.1s ease-in;
18
+ }
19
+ .utcw-tab-button:hover {
20
+ opacity: 1;
21
+ }
22
+ .utcw-help {
23
+ float: right;
24
+ display: block;
25
+ width: 14px;
26
+ height: 14px;
27
+ border: solid 1px transparent;
28
+ -webkit-border-radius: 14px;
29
+ -moz-border-radius: 14px;
30
+ -khtml-border-radius: 14px;
31
+ border-radius: 14px;
32
+ text-align: center;
33
+ color: #fff;
34
+ font-weight: bold;
35
+
36
+
37
+ background-color: #6295fb;
38
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#6295fb), to(#3265cb));
39
+ background-image: -webkit-linear-gradient(top, #6295fb, #3265cb);
40
+ background-image: -moz-linear-gradient(top, #6295fb, #3265cb);
41
+ background-image: -ms-linear-gradient(top, #6295fb, #3265cb);
42
+ background-image: -o-linear-gradient(top, #6295fb, #3265cb);
43
+ background-image: linear-gradient(top, #6295fb, #3265cb);
44
+
45
+ cursor: pointer;
46
+ }
47
+ .utcw-help:hover {
48
+ color: #fff;
49
+ }
50
+ .tooltip {
51
+ color:#000;
52
+ width: 200px;
53
+ text-align:center;
54
+ border:solid 1px #6295fb;
55
+ -webkit-border-radius:9px;
56
+ -moz-border-radius:9px;
57
+ -khtml-border-radius:9px;
58
+ border-radius:9px;
59
+ }
60
+ .tooltip ul {
61
+ list-style-type: circle;
62
+ margin: 10px 0;
63
+ }
64
+ .tooltip li {
65
+ margin: 0 0 0 20px;
66
+ }
67
+ .utcw h3 {
68
+ margin: 0;
69
+ }
70
+
71
+ .utcw-active {
72
+ font-weight: bold;
73
+ opacity: 1;
74
+ }
75
+
76
+ fieldset.utcw {
77
+ padding: 10px;
78
+ border: solid 1px #dfdfdf;
79
+ margin-bottom: 25px;
80
+ }
81
+ fieldset.utcw legend {
82
+ letter-spacing: 2px;
83
+ font-size: 16px;
84
+ }
85
+ .utcw-hidden {
86
+ display:none;
87
+ }
88
+ div.widget_utcw {
89
+ word-wrap: break-word;
90
+ }
91
+ .utcw .fullwidth {
92
+ width: 100%;
93
+ }
94
+ fieldset.utcw label.two-col {
95
+ width: 120px;
96
+ display: inline-block;
97
+ }
utcw.js CHANGED
@@ -4,4 +4,41 @@
4
  * URI: http://www.wayfarerweb.com/wtooltip.php
5
  * Released with the MIT License: http://www.wayfarerweb.com/mit.php
6
  */
7
- (function(a){a.fn.wTooltip=function(f,r){f=a.extend({content:null,ajax:null,follow:true,auto:true,fadeIn:0,fadeOut:0,appendTip:document.body,degrade:false,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(t,p,o){},callAfter:function(t,p,o){},clickAction:function(p,o){a(p).hide()},delay:0,timeout:0},f||{});if(!f.style&&typeof f.style!="object"){f.style={};f.style.zIndex="1000"}else{f.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},f.style||{})}if(typeof r=="function"){f.callAfter=r||f.callAfter}f.style.display="none",f.style.position="absolute";var m,l,q,c,k={},b=true,e=false,n=false,s=document.createElement("div"),g=(typeof document.body.style.maxWidth=="undefined")?true:false,j=(typeof a.talk=="function"&&typeof a.listen=="function")?true:false;if(f.id){s.id=f.id}if(f.className){s.className=f.className}f.degrade=(f.degrade&&g)?true:false;for(var d in f.style){s.style[d]=f.style[d]}function i(o){if(o){if(f.degrade){a(s).html(f.content.replace(/<\/?[^>]+>/gi,""))}else{a(s).html(f.content)}}}if(f.ajax){a.get(f.ajax,function(o){if(o){f.content=o}i(f.content)})}function h(p){function t(u){if(m&&!f.content){m=""}}function o(){if(!e&&f.auto){clearInterval(c);if(f.fadeOut){a(s).fadeOut(f.fadeOut,function(){t(p)})}else{t(p);s.style.display="none"}}if(typeof f.callAfter=="function"){f.callAfter(s,p,f)}if(j){f=a.listen(f)}}if(f.timeout>0){q=setTimeout(function(){o()},f.timeout)}else{o()}}a(s).hover(function(){e=true},function(){e=false;h(k)});if(j){f.key=s;f.plugin="wTooltip";f.channel="wayfarer";a.talk(f)}i(f.content&&!f.ajax);a(s).appendTo(f.appendTip);return this.each(function(){a(this).hover(function(){var p=this;clearTimeout(q);if((this.title||this.titleMemKeep)&&!f.degrade&&!f.content){m=this.title||this.titleMemKeep;if(this.title){this.titleMemKeep=this.title;this.title=""}}if(f.content&&f.degrade){this.title=s.innerHTML}function o(){if(typeof f.callBefore=="function"){f.callBefore(s,p,f)}if(j){f=a.listen(f)}var t;if(f.content){if(!f.degrade){t="block"}}else{if(m&&!f.degrade){a(s).html(unescape(m));t="block";m=""}else{t="none"}}if(f.auto){if(t=="block"&&f.fadeIn){a(s).fadeIn(f.fadeIn)}else{s.style.display=t}}}if(f.delay>0){l=setTimeout(function(){o()},f.delay)}else{o()}},function(){clearTimeout(l);var o=this;b=true;if(!f.follow||n||((f.offsetX<0&&(0-f.offsetX<a(s).outerWidth()))&&(f.offsetY>0&&0-f.offsetY<a(s).outerHeight()))){setTimeout(function(){c=setInterval(function(){h(o)},1)},1)}else{h(this)}});a(this).mousemove(function(v){k=this;if(f.follow||b){var y=a(window).scrollTop(),z=a(window).scrollLeft(),w=v.clientY+y+f.offsetY,t=v.clientX+z+f.offsetX,x=a(f.appendTip).outerHeight(),p=a(f.appendTip).innerHeight(),o=a(window).width()+z-a(s).outerWidth(),u=a(window).height()+y-a(s).outerHeight();w=(x>p)?w-(x-p):w;n=(w>u||t>o)?true:false;if(t-z<=0&&f.offsetX<0){t=z}else{if(t>o){t=o}}if(w-y<=0&&f.offsetY<0){w=y}else{if(w>u){w=u}}s.style.top=w+"px";s.style.left=t+"px";b=false}});if(typeof f.clickAction=="function"){a(this).click(function(){f.clickAction(s,this)})}})}})(jQuery);var utcwActiveTab = [];var wTooltipStyle={border:"solid 1px #6295fb",background:"#fff",color:"#000",padding:"5px",zIndex:1E3};(function(a){a(document).ready(function(){a("input[id$=-color_none], input[id$=-color_random], input[id$=-color_set], input[id$=-color_span]").live("click",function(){a("div[id$='set_chooser']").addClass("utcw-hidden");a("div[id$='span_chooser']").addClass("utcw-hidden");a(this).val()=="set"?a("div[id$='set_chooser']").removeClass("utcw-hidden"):a(this).val()=="span"&&a("div[id$='span_chooser']").removeClass("utcw-hidden")});a(".utcw-tab-button").live("click",function(){$this=a(this);$this.parent().find(".utcw-tab-button").removeClass("utcw-active");$this.addClass("utcw-active");$this.parent().find("fieldset.utcw").addClass("hidden");a("#"+$this.data("tab")).removeClass("hidden");utcwActiveTab[$this.data("id")]=$this.data("tab");return false})})})(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * URI: http://www.wayfarerweb.com/wtooltip.php
5
  * Released with the MIT License: http://www.wayfarerweb.com/mit.php
6
  */
7
+ (function(a){a.fn.wTooltip=function(f,r){f=a.extend({content:null,ajax:null,follow:true,auto:true,fadeIn:0,fadeOut:0,appendTip:document.body,degrade:false,offsetY:10,offsetX:1,style:{},className:null,id:null,callBefore:function(t,p,o){},callAfter:function(t,p,o){},clickAction:function(p,o){a(p).hide()},delay:0,timeout:0},f||{});if(!f.style&&typeof f.style!="object"){f.style={};f.style.zIndex="1000"}else{f.style=a.extend({border:"1px solid gray",background:"#edeef0",color:"#000",padding:"10px",zIndex:"1000",textAlign:"left"},f.style||{})}if(typeof r=="function"){f.callAfter=r||f.callAfter}f.style.display="none",f.style.position="absolute";var m,l,q,c,k={},b=true,e=false,n=false,s=document.createElement("div"),g=(typeof document.body.style.maxWidth=="undefined")?true:false,j=(typeof a.talk=="function"&&typeof a.listen=="function")?true:false;if(f.id){s.id=f.id}if(f.className){s.className=f.className}f.degrade=(f.degrade&&g)?true:false;for(var d in f.style){s.style[d]=f.style[d]}function i(o){if(o){if(f.degrade){a(s).html(f.content.replace(/<\/?[^>]+>/gi,""))}else{a(s).html(f.content)}}}if(f.ajax){a.get(f.ajax,function(o){if(o){f.content=o}i(f.content)})}function h(p){function t(u){if(m&&!f.content){m=""}}function o(){if(!e&&f.auto){clearInterval(c);if(f.fadeOut){a(s).fadeOut(f.fadeOut,function(){t(p)})}else{t(p);s.style.display="none"}}if(typeof f.callAfter=="function"){f.callAfter(s,p,f)}if(j){f=a.listen(f)}}if(f.timeout>0){q=setTimeout(function(){o()},f.timeout)}else{o()}}a(s).hover(function(){e=true},function(){e=false;h(k)});if(j){f.key=s;f.plugin="wTooltip";f.channel="wayfarer";a.talk(f)}i(f.content&&!f.ajax);a(s).appendTo(f.appendTip);return this.each(function(){a(this).hover(function(){var p=this;clearTimeout(q);if((this.title||this.titleMemKeep)&&!f.degrade&&!f.content){m=this.title||this.titleMemKeep;if(this.title){this.titleMemKeep=this.title;this.title=""}}if(f.content&&f.degrade){this.title=s.innerHTML}function o(){if(typeof f.callBefore=="function"){f.callBefore(s,p,f)}if(j){f=a.listen(f)}var t;if(f.content){if(!f.degrade){t="block"}}else{if(m&&!f.degrade){a(s).html(unescape(m));t="block";m=""}else{t="none"}}if(f.auto){if(t=="block"&&f.fadeIn){a(s).fadeIn(f.fadeIn)}else{s.style.display=t}}}if(f.delay>0){l=setTimeout(function(){o()},f.delay)}else{o()}},function(){clearTimeout(l);var o=this;b=true;if(!f.follow||n||((f.offsetX<0&&(0-f.offsetX<a(s).outerWidth()))&&(f.offsetY>0&&0-f.offsetY<a(s).outerHeight()))){setTimeout(function(){c=setInterval(function(){h(o)},1)},1)}else{h(this)}});a(this).mousemove(function(v){k=this;if(f.follow||b){var y=a(window).scrollTop(),z=a(window).scrollLeft(),w=v.clientY+y+f.offsetY,t=v.clientX+z+f.offsetX,x=a(f.appendTip).outerHeight(),p=a(f.appendTip).innerHeight(),o=a(window).width()+z-a(s).outerWidth(),u=a(window).height()+y-a(s).outerHeight();w=(x>p)?w-(x-p):w;n=(w>u||t>o)?true:false;if(t-z<=0&&f.offsetX<0){t=z}else{if(t>o){t=o}}if(w-y<=0&&f.offsetY<0){w=y}else{if(w>u){w=u}}s.style.top=w+"px";s.style.left=t+"px";b=false}});if(typeof f.clickAction=="function"){a(this).click(function(){f.clickAction(s,this)})}})}})(jQuery);
8
+
9
+ var utcwActiveTab = [];
10
+ var wTooltipStyle={border:"solid 1px #6295fb",background:"#fff",color:"#000",padding:"5px",zIndex:1E3};
11
+
12
+ (function($){
13
+
14
+ $(document).ready(function() {
15
+
16
+ $("input[id$=-color_none], input[id$=-color_random], input[id$=-color_set], input[id$=-color_span]").live('click', function() {
17
+
18
+ $("div[id$='set_chooser']").addClass('utcw-hidden');
19
+ $("div[id$='span_chooser']").addClass('utcw-hidden');
20
+
21
+ if ($(this).val() == 'set') {
22
+ $("div[id$='set_chooser']").removeClass('utcw-hidden');
23
+ } else if ($(this).val() == 'span') {
24
+ $("div[id$='span_chooser']").removeClass('utcw-hidden');
25
+ }
26
+ })
27
+
28
+ $(".utcw-tab-button").live('click', function() {
29
+
30
+ $this = $(this);
31
+
32
+ $this.parent().find(".utcw-tab-button").removeClass("utcw-active");
33
+ $this.addClass("utcw-active");
34
+
35
+ $this.parent().find("fieldset.utcw").addClass("hidden");
36
+ $("#" + $this.data('tab') ).removeClass("hidden");
37
+
38
+ utcwActiveTab[ $this.data('id') ] = $this.data('tab');
39
+
40
+ return false;
41
+ })
42
+ });
43
+ })(jQuery);
44
+