Changeset 556178
- Timestamp:
- 06/11/2012 03:28:59 PM (14 years ago)
- Location:
- notify-bar/trunk
- Files:
-
- 4 edited
-
js/notify-bar-farbtastic.js (modified) (1 diff)
-
notify-bar.php (modified) (5 diffs)
-
readme.txt (modified) (4 diffs)
-
screenshot-3.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
notify-bar/trunk/js/notify-bar-farbtastic.js
r548066 r556178 10 10 11 11 jQuery(document).ready(function() { 12 jQuery('#ilctabscolorpicker-headline').hide(); 13 jQuery('#ilctabscolorpicker-headline').farbtastic('#headline_color'); 14 jQuery("#headline_color").click(function(){jQuery('#ilctabscolorpicker-headline').slideToggle()}); 15 }); 16 17 18 jQuery(document).ready(function() { 19 jQuery('#ilctabscolorpicker-message').hide(); 20 jQuery('#ilctabscolorpicker-message').farbtastic('#message_color'); 21 jQuery("#message_color").click(function(){jQuery('#ilctabscolorpicker-message').slideToggle()}); 22 }); 23 24 25 jQuery(document).ready(function() { 12 26 jQuery('#ilctabscolorpicker-link').hide(); 13 27 jQuery('#ilctabscolorpicker-link').farbtastic('#link_color'); -
notify-bar/trunk/notify-bar.php
r549120 r556178 128 128 'mbj_notify_bar_main' 129 129 ); 130 131 add_settings_field( 132 'mbj_notify_bar_headline_color', 133 'Headline color:', 134 'mbj_notify_bar_setting_headline_color', 135 'mbj_notify_bar', 136 'mbj_notify_bar_main' 137 ); 138 139 add_settings_field( 140 'mbj_notify_bar_message_color', 141 'Message color:', 142 'mbj_notify_bar_setting_message_color', 143 'mbj_notify_bar', 144 'mbj_notify_bar_main' 145 ); 130 146 131 147 add_settings_field( … … 150 166 'hide_this' => 'yes', 151 167 'background_color' => '#ffff33', 168 'headline_color' => '#000000', 169 'message_color' => '#000000', 152 170 'link_color' => '#0000ff', 153 171 'headline' => 'Type Headline Here', … … 211 229 // echo the field 212 230 echo "<input type='text' id='background_color' name='mbj_notify_bar_options[background_color]' value='$text_string' /><div id='ilctabscolorpicker-background'> </div>"; 231 } 232 233 234 /* set up and display the form element for setting the headline color */ 235 function mbj_notify_bar_setting_headline_color() { 236 $options = get_option( 'mbj_notify_bar_options' ); 237 $text_string = $options['headline_color']; 238 // echo the field 239 echo "<input type='text' id='headline_color' name='mbj_notify_bar_options[headline_color]' value='$text_string' /><div id='ilctabscolorpicker-headline'> </div>"; 240 } 241 242 243 /* set up and display the form element for setting the message color */ 244 function mbj_notify_bar_setting_message_color() { 245 $options = get_option( 'mbj_notify_bar_options' ); 246 $text_string = $options['message_color']; 247 // echo the field 248 echo "<input type='text' id='message_color' name='mbj_notify_bar_options[message_color]' value='$text_string' /><div id='ilctabscolorpicker-message'> </div>"; 213 249 } 214 250 … … 288 324 $valid['background_color'] = '#ffff33'; 289 325 } 326 327 // use regex to check that first character is # sign and then only accept 7 characters for the headline color 328 // otherwise use #000000, which is the same as default headline color 329 if (preg_match('/^#/', $input['headline_color'])) { 330 $valid['headline_color'] = substr($input['headline_color'], 0, 7); 331 } 332 else { 333 $valid['headline_color'] = '#000000'; 334 } 335 336 // use regex to check that first character is # sign and then only accept 7 characters for the message color 337 // otherwise use #000000, which is the same as default message color 338 if (preg_match('/^#/', $input['message_color'])) { 339 $valid['message_color'] = substr($input['message_color'], 0, 7); 340 } 341 else { 342 $valid['message_color'] = '#000000'; 343 } 290 344 291 345 // use regex to check that first character is # sign and then only accept 7 characters for the link color … … 333 387 $mbj_notify_bar_display_options_message = $mbj_notify_bar_display_options['message']; 334 388 $mbj_notify_bar_display_options_background_color = $mbj_notify_bar_display_options['background_color']; 389 $mbj_notify_bar_display_options_headline_color = $mbj_notify_bar_display_options['headline_color']; 390 $mbj_notify_bar_display_options_message_color = $mbj_notify_bar_display_options['message_color']; 335 391 $mbj_notify_bar_display_options_link_color = $mbj_notify_bar_display_options['link_color']; 336 392 -
notify-bar/trunk/readme.txt
r548165 r556178 5 5 Requires at least: 3.3 6 6 Tested up to: 3.3 7 Stable tag: trunk7 Stable tag: 1.1 8 8 License: GPLv2 9 9 … … 12 12 == Description == 13 13 14 This plugin adds a bar (Notify Bar) across the top of some or all pages on your website. The bar displays a headline and a paragraph, which can be used to publish important announcements such as upcoming site maintenance, downtime, approaching deadlines, or whatever seems important. The background color of the bar and the link color for the text can becan be customized with a color picker. There is also an optional jQuery slideUp feature that allows the user to click a 'Hide This' link and remove the bar after reading the message. [More Information](http://www.webworkgarage.com/notify-bar-wordpress-plugin/)14 This plugin adds a bar (Notify Bar) across the top of some or all pages on your website. The bar displays a headline and a paragraph, which can be used to publish important announcements such as upcoming site maintenance, downtime, approaching deadlines, or whatever seems important. The background color, headline color, message color and the link color can be customized with a color picker. There is also an optional jQuery slideUp feature that allows the user to click a 'Hide This' link and remove the bar after reading the message. [More Information](http://www.webworkgarage.com/notify-bar-wordpress-plugin/) 15 15 16 16 … … 29 29 = Why does the Notify Bar not look the same on all sites? = 30 30 31 The Notify Bar plugin is meant to be flexible enough to look good on a variety of websites by going pretty light on CSS and using inheriting fonts and various other properties from the site you are installing it on. For example, on most websites, the background color of the Notify Bar will stretch the full width of the page, but on some sites that might not be the case. One way this could happen would be if you have set the HTML body element of your site to have a width of less than 100%. There are other conditions that might make the Notify Bar look different across different websites, but the hope is that by inheriting the fonts from what you're using on your site and by allowing you to change the background and linkcolors, you can make the Notify Bar look nice on most any website.31 The Notify Bar plugin is meant to be flexible enough to look good on a variety of websites by going pretty light on CSS and using inheriting fonts and various other properties from the site you are installing it on. For example, on most websites, the background color of the Notify Bar will stretch the full width of the page, but on some sites that might not be the case. One way this could happen would be if you have set the HTML body element of your site to have a width of less than 100%. There are other conditions that might make the Notify Bar look different across different websites, but the hope is that by inheriting the fonts from what you're using on your site and by allowing you to set your own colors, you can make the Notify Bar look nice on most any website. 32 32 33 33 … … 62 62 == Changelog == 63 63 64 = 1.1 = 65 * Added options to customize headline color and message color 66 64 67 = 1.0 = 65 68 * Plugin Launched
Note: See TracChangeset
for help on using the changeset viewer.