Ticket #6998: press-this.diff
File press-this.diff, 33.3 KB (added by , 17 years ago) |
---|
-
wp-admin/press-this.php
1 1 <?php 2 2 require_once('admin.php'); 3 3 4 if ( ! current_user_can('publish_posts') ) 5 wp_die( __( 'Cheatin’ uh?' )); 4 if ( ! current_user_can('publish_posts') ) wp_die( __( 'Cheatin’ uh?' )); 6 5 6 if ( 'post' == $_REQUEST['action'] ) { 7 check_admin_referer('press-this'); 8 $post_ID = press_it(); ?> 9 <script>if(confirm("<?php _e('Your post is saved. Do you want to view the post?') ?>")) {window.opener.location.replace("<?php echo get_permalink($post_ID);?>");}window.close();</script> 10 <?php 11 die; 12 } 13 7 14 function press_it() { 8 15 $quick['post_status'] = 'publish'; 9 16 $quick['post_category'] = $_REQUEST['post_category']; … … 15 22 case 'regular': 16 23 $content = $_REQUEST['content']; 17 24 if ($_REQUEST['content2']) 18 $content .= '<p>' . $_REQUEST['content2']; 25 $content .= '<p>' . $_REQUEST['content2']; 19 26 break; 20 27 21 28 case 'quote': 22 29 $content = '<blockquote>' . $_REQUEST['content']; 23 30 if ($_REQUEST['content2']) { 24 31 $content .= '</blockquote>'; 25 $content = $content . '<p>' . $_REQUEST['content2'] ;32 $content = $content . '<p>' . $_REQUEST['content2'].'</p>'; 26 33 } 27 34 break; 28 35 29 36 case 'photo': 30 37 if ($_REQUEST['photo_link']) 31 $content = '< a href="' . $_REQUEST['photo_link'] . '" target="_new">';38 $content = '<p><a href="' . $_REQUEST['photo_link'] . '" target="_new">'; 32 39 33 $content .= '<img src="' . $_REQUEST['photo_src'] . '" style="float:left;padding:5px;">';40 $content .= '<img src="' . $_REQUEST['photo_src'] . '" alt=""/>'; 34 41 35 42 if ($_REQUEST['photo_link']) 36 $content .= '</a> ';43 $content .= '</a></p>'; 37 44 38 45 if ($_REQUEST['content']) 39 $content = $content . '<br clear="all">' . $_REQUEST['content'];46 $content = $content . $_REQUEST['content']; 40 47 41 48 break; 42 49 case "video": 43 50 list($garbage,$video_id) = split("v=", $_REQUEST['content']); 44 51 $content = '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/' . $video_id . '"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/' . $video_id . '" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>'; 45 52 if ($_REQUEST['content2']) 46 $content .= '< /br><p>' . $_REQUEST['content2'] . '</p>';47 break; 53 $content .= '<p>' . $_REQUEST['content2'] . '</p>'; 54 break; 48 55 } 49 56 50 57 $quick['post_content'] = $content; … … 57 64 return $post_ID; 58 65 } 59 66 60 function tag_div() { 61 ?> 62 <h2><?php _e('Tags') ?></h2> 63 <div id="tagsdiv"> 64 <div class="inside"> 65 <p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p> 66 <div id="tagchecklist"></div> 67 </div> 68 </div> 69 <?php 67 function tag_div() { ?> 68 <p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p> 69 <div id="tagchecklist"></div> 70 <?php 70 71 } 71 72 72 73 function category_div() { 73 74 ?> 74 <div id="categories"> 75 <h2><?php _e('Categories') ?></h2> 76 <div id="categories-all"> 77 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 78 <?php wp_category_checklist() ?> 79 </ul> 80 </div> 81 </div> 75 <div id="categories"> 76 <div class="submitbox" id="submitpost"> 77 <div id="previewview"> <h2><?php _e('Categories') ?></h2></div> 78 <div class="inside"> 79 <div id="categories-all"> 80 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear"> 81 <?php wp_category_checklist() ?> 82 </ul> 83 </div> 84 </div> 85 <p class="submit"> 86 <input type="submit" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/> 87 <img src="/images/bookmarklet_loader.gif" alt="" id="photo_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/> 88 </p> 89 </div> 82 90 <?php 83 91 } 84 92 85 93 function get_images_from_uri($uri) { 94 86 95 $content = wp_remote_fopen($uri); 87 if ( false === $content ) 88 return ''; 96 if ( false === $content ) return ''; 89 97 90 98 $pattern = '/<img[^>]+src=[\'"]([^\'" >]+?)[\'" >]/is'; 91 99 preg_match_all($pattern, $content, $matches); 92 if ( empty($matches[1]) ) 93 return ''; 94 95 /* 96 $from_host = parse_url($uri); 97 $from_host = $from_host['host']; 98 $from_host = explode('.', $from_host); 99 $count = count($from_host); 100 $from_host = $from_host[$count - 2] . '.' . $from_host[$count - 1]; 101 */ 102 100 if ( empty($matches[1]) ) return ''; 101 103 102 $sources = array(); 104 103 foreach ($matches[1] as $src) { 105 104 if ( false !== strpos($src, '&') ) 106 105 continue; 107 108 /* 109 $img_host = parse_url($src); 110 $img_host = $img_host['host']; 111 if ( false === strpos($img_host, $from_host) ) 112 continue; 113 */ 114 106 107 $host = parse_url($_GET['u'], PHP_URL_HOST); 108 109 if (strpos($src, 'http://') === false) { 110 $src = 'http://'.str_replace('//','/', $host.'/'.$src); 111 } 112 115 113 $sources[] = $src; 116 114 } 117 115 return "'" . implode("','", $sources) . "'"; 118 116 } 119 117 120 function press_this_js_init() { 121 if ( user_can_richedit() ) { 122 $language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); 123 ?> 118 function press_this_js_init() { ?> 119 <?php if ( user_can_richedit() ) { 120 $language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); 121 // Add TinyMCE languages 122 @include_once( dirname(__FILE__).'/../wp-includes/js/tinymce/langs/wp-langs.php' ); 123 if ( isset($strings) ) echo $strings; ?> 124 (function() { 125 var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "<?php echo $language; ?>"; 126 127 sl.markDone(base + '/langs/' + ln + '.js'); 128 sl.markDone(base + '/themes/advanced/langs/' + ln + '.js'); 129 sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js'); 130 })(); 131 124 132 tinyMCE.init({ 125 133 mode: "textareas", 126 134 editor_selector: "mceEditor", … … 147 155 plugins : "safari,inlinepopups" 148 156 }); 149 157 <?php } ?> 158 150 159 jQuery('#tags-input').hide(); 160 151 161 tag_update_quickclicks(); 162 152 163 // add the quickadd form 153 164 jQuery('#jaxtag').prepend('<span id="ajaxtag"><input type="text" name="newtag" id="newtag" class="form-input-tip" size="16" autocomplete="off" value="'+postL10n.addTag+'" /><input type="button" class="button" id="tagadd" value="' + postL10n.add + '" tabindex="3" /><input type="hidden"/><input type="hidden"/><span class="howto">'+postL10n.separate+'</span></span>'); 165 154 166 jQuery('#tagadd').click( tag_flush_to_text ); 155 167 jQuery('#newtag').focus(function() { 156 168 if ( this.value == postL10n.addTag ) … … 170 182 // Clean up the data being passed in 171 183 $title = wp_specialchars(stripslashes($_GET['t'])); 172 184 $selection = wp_specialchars(stripslashes($_GET['s'])); 173 $url = clean_url($_GET['u']); 185 $url = clean_url($_GET['u']); 174 186 175 187 if ( empty($_GET['tab']) ) { 176 188 ?> … … 178 190 <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 179 191 <head> 180 192 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 181 <title><?php _e('Quick Post') ?></title> 182 193 <title><?php _e('Press This') ?></title> 183 194 <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script> 184 185 195 <?php 186 196 wp_enqueue_script('jquery-ui-tabs'); 187 197 wp_enqueue_script('thickbox'); 188 198 wp_enqueue_script('post'); 189 do_action('admin_print_scripts'); do_action('admin_head'); 199 do_action('admin_print_scripts'); 200 do_action('admin_head'); 190 201 wp_admin_css('css/press-this'); 191 202 wp_admin_css( 'css/colors' ); 192 203 ?> 193 204 <script type="text/javascript"> 194 <?php if ( user_can_richedit() ) {195 $language = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) );196 // Add TinyMCE languages197 @include_once( dirname(__FILE__).'/../wp-includes/js/tinymce/langs/wp-langs.php' );198 if ( isset($strings) ) echo $strings;199 ?>200 205 201 (function() {202 var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "<?php echo $language; ?>";203 204 sl.markDone(base + '/langs/' + ln + '.js');205 sl.markDone(base + '/themes/advanced/langs/' + ln + '.js');206 sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js');207 })();208 209 tinyMCE.init({210 mode: "textareas",211 editor_selector: "mceEditor",212 language : "<?php echo $language; ?>",213 width: "100%",214 theme : "advanced",215 theme_advanced_buttons1 : "bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,undo,redo,link,unlink",216 theme_advanced_buttons2 : "",217 theme_advanced_buttons3 : "",218 theme_advanced_toolbar_location : "top",219 theme_advanced_toolbar_align : "left",220 theme_advanced_statusbar_location : "bottom",221 theme_advanced_resizing : true,222 theme_advanced_resize_horizontal : false,223 skin : "wp_theme",224 dialog_type : "modal",225 relative_urls : false,226 remove_script_host : false,227 convert_urls : false,228 apply_source_formatting : false,229 remove_linebreaks : true,230 accessibility_focus : false,231 tab_focus : ":next",232 plugins : "safari,inlinepopups"233 });234 <?php } ?>235 236 206 jQuery(document).ready(function() { 237 <?php if ( preg_match("/youtube\.com\/watch/i", $ _GET['u']) ) { ?>207 <?php if ( preg_match("/youtube\.com\/watch/i", $url) ) { ?> 238 208 jQuery('#container > ul').tabs({ selected: 3 }); 239 <?php } elseif ( preg_match("/flickr\.com/i", $ _GET['u']) ) { ?>209 <?php } elseif ( preg_match("/flickr\.com/i", $url) ) { ?> 240 210 jQuery('#container > ul').tabs({ selected: 1 }); 241 211 <?php } else { ?> 242 212 jQuery('#container > ul').tabs(); … … 246 216 </script> 247 217 </head> 248 218 <body> 249 250 <?php 251 if ( 'post' == $_REQUEST['action'] ) { 252 check_admin_referer('press-this'); 253 $post_ID = press_it(); 254 ?> 255 <script>if(confirm("<?php _e('Your post is saved. Do you want to view the post?') ?>")) {window.opener.location.replace("<?php echo get_permalink($post_ID);?>");}window.close();</script> 256 </body></html> 257 <?php 258 die; 259 } 260 ?> 219 <div id="wphead"> 220 <h1><span id="viewsite"><a href="<?php echo get_option('home'); ?>/">Visit: <?php bloginfo('name'); ?></a></span></h1> 221 </div> 261 222 <div id="container"> 262 223 <ul> 263 <li><a href="<?php echo clean_url(add_query_arg('tab', 'text', stripslashes($_SERVER['REQUEST_URI']))) ?>">< span><?php _e('Text/Link') ?></span></a></li>264 <li><a href="<?php echo clean_url(add_query_arg('tab', 'photo', stripslashes($_SERVER['REQUEST_URI']))) ?>">< span><?php _e('Photo') ?></span></a></li>265 <li><a href="<?php echo clean_url(add_query_arg('tab', 'quote', stripslashes($_SERVER['REQUEST_URI']))) ?>">< span><?php _e('Quote') ?></span></a></li>266 <li><a href="<?php echo clean_url(add_query_arg('tab', 'video', stripslashes($_SERVER['REQUEST_URI']))) ?>">< span><?php _e('Video') ?></span></a></li>224 <li><a href="<?php echo clean_url(add_query_arg('tab', 'text', stripslashes($_SERVER['REQUEST_URI']))) ?>"><?php _e('Text') ?></a></li> 225 <li><a href="<?php echo clean_url(add_query_arg('tab', 'photo', stripslashes($_SERVER['REQUEST_URI']))) ?>"><?php _e('Photo') ?></a></li> 226 <li><a href="<?php echo clean_url(add_query_arg('tab', 'quote', stripslashes($_SERVER['REQUEST_URI']))) ?>"><?php _e('Quote') ?></a></li> 227 <li><a href="<?php echo clean_url(add_query_arg('tab', 'video', stripslashes($_SERVER['REQUEST_URI']))) ?>"><?php _e('Video') ?></a></li> 267 228 </ul> 229 268 230 </div> 269 270 231 </body> 271 232 </html> 272 <?php 273 exit; 274 } elseif ( 'photo' == $_GET['tab'] ) { 275 ?> 233 <?php exit; } elseif ( 'photo' == $_GET['tab'] ) { ?> 276 234 <script type="text/javascript"> 277 235 <?php press_this_js_init(); ?> 278 236 var last = null; … … 285 243 last = img; 286 244 return false; 287 245 } 246 288 247 jQuery(document).ready(function() { 289 248 var img, img_tag, aspect, w, h, skip, i, strtoappend = ""; 290 249 var my_src = [<?php echo get_images_from_uri($url); ?>]; … … 317 276 strtoappend += '<a href="' + img.src + '" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>' 318 277 } 319 278 } 279 320 280 jQuery('#img_container').html(strtoappend); 321 281 322 282 tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox 323 283 }); 324 284 </script> 325 326 285 <form action="press-this.php?action=post" method="post" id="photo_form"> 327 286 <?php wp_nonce_field('press-this') ?> 328 287 <input type="hidden" name="source" value="bookmarklet"/> 329 288 <input type="hidden" name="post_type" value="photo"/> 330 289 <div id="posting"> 331 <h2><?php _e('Post Title') ?></h2> 290 291 <h2><?php _e('Title') ?></h2> 292 <div class="titlewrap"> 332 293 <input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/> 333 334 <h2><?php _e('Caption') ?></h2>335 <div class="editor-container">336 <textarea name="content" id="photo_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo $selection;?>337 <br><a href="<?php echo $url;?>"><?php echo $title;?></a></textarea>338 294 </div> 339 295 340 296 <h2><?php _e('Photo URL') ?></h2> 297 <div class="titlewrap"> 341 298 <input name="photo_src" id="photo_src" class="text" onkeydown="pick(0);"/> 342 343 <style type="text/css">344 #img_container img {345 width: 75px;346 height: 75px;347 padding: 2px;348 background-color: #f4f4f4;349 margin-right: 7px;350 margin-bottom: 7px;351 cursor: pointer;352 }353 </style>354 <div id="img_container" style="border:solid 1px #ccc; background-color:#f4f4f4; padding:5px; width:370px; margin-top:10px; overflow:auto; height:100px;">355 299 </div> 356 300 357 301 <h2><?php _e('Link Photo to following URL') ?></h2><?php _e('(leave blank to leave the photo unlinked)') ?> 302 <div class="titlewrap"> 358 303 <input name="photo_link" id="photo_link" class="text" value="<?php echo attribute_escape($url);?>"/> 304 </div> 305 306 <small>Click images to select:</small> 307 <div class="titlewrap"> 308 <div id="img_container"> 309 </div> 310 </div> 311 312 313 <h2><?php _e('Caption') ?></h2> 314 <div class="editor-container"> 315 <textarea name="content" id="photo_post_two" style="" class="mceEditor"><?php echo $selection;?> 316 <a href="<?php echo attribute_escape($url);?>"><?php echo $title;?></a></textarea> 317 </div> 359 318 360 319 <?php tag_div(); ?> 361 362 <div> 363 <input type="submit" value="<?php _e('Create Photo') ?>" style="margin-top:15px;" onclick="document.getElementById('photo_saving').style.display = '';"/> 364 365 <a href="#" onclick="if (confirm('<?php _e('Are you sure?') ?>')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel') ?></a> 366 <img src="/images/bookmarklet_loader.gif" alt="" id="photo_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/> 367 </div> 320 368 321 </div> 369 <?php category_div() ?>322 <?php category_div() ?> 370 323 </form> 371 324 <?php 372 325 exit; … … 381 334 <input type="hidden" name="source" value="bookmarklet"/> 382 335 <input type="hidden" name="post_type" value="regular"/> 383 336 <div id="posting"> 384 <h2><?php _e('Post Title') ?></h2> 337 <h2><?php _e('Title') ?></h2> 338 <div class="titlewrap"> 385 339 <input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/> 386 340 </div> 341 387 342 <h2><?php _e('Post') ?></h2> 388 343 <div class="editor-container"> 389 <textarea name="content" id="regular_post_two" style="height:170px;width:100%;" class="mceEditor"><?php echo $selection;?> <br><a href="<?php echo $url;?>"><?php echo $title;?></a></textarea>390 </div> 344 <textarea name="content" id="regular_post_two" style="height:170px;width:100%;" class="mceEditor"><?php echo $selection;?><a href="<?php echo $url;?>"><?php echo $title;?></a></textarea> 345 </div> 391 346 392 347 <?php tag_div(); ?> 393 394 <div> 395 <input type="submit" value="<?php _e('Create Post') ?>" style="margin-top:15px;" onclick="document.getElementById('regular_saving').style.display = '';"/> 396 <a href="#" onclick="if (confirm('<?php _e('Are you sure?') ?>')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel') ?></a> 397 <img src="/images/bookmarklet_loader.gif" alt="" id="regular_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/> 398 </div> 348 399 349 </div> 400 350 <?php category_div() ?> 401 351 </form> … … 412 362 <input type="hidden" name="source" value="bookmarklet"/> 413 363 <input type="hidden" name="post_type" value="quote"/> 414 364 <div id="posting"> 415 <h2><?php _e('Post Title') ?></h2> 365 <h2><?php _e('Title') ?></h2> 366 <div class="titlewrap"> 416 367 <input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape(sprintf(__('Quote by %s'), $title)); ?>"/> 417 368 </div> 369 418 370 <h2><?php _e('Quote') ?></h2> 419 371 <div class="editor-container"> 420 372 <textarea name="content" id="quote_post_one" style="height:130px;width:100%;" class="mceEditor"><?php echo $selection;?></textarea> … … 422 374 423 375 <h2><?php _e('Source <span class="optional">(optional)</span>') ?></h2> 424 376 <div class="editor-container"> 425 <textarea name="content2" id="quote_post_two" style="height:130px;width:100%;" class="mceEditor">< br><a href="<?php echo $url;?>"><?php echo $title;?></a></textarea>377 <textarea name="content2" id="quote_post_two" style="height:130px;width:100%;" class="mceEditor"><cite><a href="<?php echo $url;?>"><?php echo $title;?></a></cite></textarea> 426 378 </div> 427 379 428 380 <?php tag_div(); ?> 429 430 <div>431 <input type="submit" value="<?php echo attribute_escape(__('Create Quote')) ?>" style="margin-top:15px;" onclick="document.getElementById('quote_saving').style.display = '';"/> 432 <a href="#" onclick="if (confirm('<?php _e('Are you sure?') ?>')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel') ?></a> 433 <img src="/images/bookmarklet_loader.gif" alt="" id="quote_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/>434 </div>435 381 </div> 436 382 <?php category_div() ?> 437 383 </form> … … 448 394 <input type="hidden" name="source" value="bookmarklet"/> 449 395 <input type="hidden" name="post_type" value="video"/> 450 396 <div id="posting"> 451 <h2><?php _e('Post Title') ?></h2> 397 398 <h2><?php _e('Video Title') ?></h2> 399 <div class="titlewrap"> 452 400 <input name="post_title" id="post_title" class="text" value="<?php echo attribute_escape($title);?>"/> 453 454 <?php 401 </div> 402 <?php 455 403 if ( preg_match("/youtube\.com\/watch/i", $url) ) { 456 404 list($domain, $video_id) = split("v=", $url); 457 405 ?> 458 406 <input type="hidden" name="content" value="<?php echo attribute_escape($url); ?>" /> 459 <img src="http://img.youtube.com/vi/<?php echo $video_id; ?>/default.jpg" align="right" style="border:solid 1px #aaa;" width="130" height="97"/> <br clear="all" />407 <img src="http://img.youtube.com/vi/<?php echo $video_id; ?>/default.jpg" align="right" style="border:solid 1px #aaa;" width="130" height="97"/> 460 408 <?php } else { ?> 409 461 410 <h2><?php _e('Embed Code') ?></h2> 462 411 <textarea name="content" id="video_post_one" style="height:80px;width:100%;"></textarea> 463 412 <?php } ?> … … 465 414 <h2><?php _e('Caption <span class="optional">(optional)</span>') ?></h2> 466 415 467 416 <div class="editor-container"> 468 <textarea name="content2" id="video_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo $selection; ?><br><a href="<?php echo $url;?>"><?php echo $title;?></a></textarea>417 <textarea name="content2" id="video_post_two" style="height:130px;width:100%;" class="mceEditor"><?php echo $selection; ?> <a href="<?php echo $url; ?>"><?php echo $title;?></a></textarea> 469 418 </div> 470 419 471 420 <?php tag_div(); ?> 472 473 <div>474 <input type="submit" value="<?php _e('Create Video') ?>" style="margin-top:15px;" onclick="document.getElementById('video_saving').style.display = '';"/> 475 <a href="#" onclick="if (confirm('<?php _e('Are you sure?') ?>')) { self.close(); } else { return false; }" style="color:#007BFF;"><?php _e('Cancel'); ?></a> 476 <img src="/images/bookmarklet_loader.gif" alt="" id="video_saving" style="width:16px; height:16px; vertical-align:-4px; display:none;"/>477 </div>478 421 </div> 479 422 <?php category_div() ?> 480 423 </form> 481 424 <?php 482 425 exit; 483 426 } 484 ?> 427 ?> 428 No newline at end of file -
wp-admin/css/press-this.css
1 /* jquery tabs css */2 1 3 /* Caution! Ensure accessibility in print and other media types... */4 @media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */5 .ui-tabs-hide {6 display: none;7 }8 }9 10 /* Hide useless elements in print layouts... */11 @media print {12 .ui-tabs-nav {13 display: none;14 }15 }16 17 /* Skin */18 .ui-tabs-nav, .ui-tabs-panel {19 font-family: "Trebuchet MS", Trebuchet, Verdana, Helvetica, Arial, sans-serif;20 font-size: 12px;21 }22 .ui-tabs-nav {23 list-style: none;24 margin: 0;25 padding: 0 0 0 4px;26 }27 .ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */28 display: block;29 clear: both;30 content: " ";31 }32 .ui-tabs-nav li {33 float: left;34 margin: 0 0 0 1px;35 min-width: 84px; /* be nice to Opera */36 }37 .ui-tabs-nav a, .ui-tabs-nav a span {38 display: block;39 padding: 0 10px;40 background: url(../images/tab.png) no-repeat;41 }42 .ui-tabs-nav a {43 margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */44 padding-left: 0;45 color: #27537a;46 font-weight: bold;47 line-height: 1.2;48 text-align: center;49 text-decoration: none;50 white-space: nowrap; /* required in IE 6 */51 outline: 0; /* prevent dotted border in Firefox */52 }53 .ui-tabs-nav .ui-tabs-selected a {54 position: relative;55 top: 1px;56 z-index: 2;57 margin-top: 0;58 color: #000;59 }60 .ui-tabs-nav a span {61 width: 64px; /* IE 6 treats width as min-width */62 min-width: 64px;63 height: 18px; /* IE 6 treats height as min-height */64 min-height: 18px;65 padding-top: 6px;66 padding-right: 0;67 }68 *>.ui-tabs-nav a span { /* hide from IE 6 */69 width: auto;70 height: auto;71 }72 .ui-tabs-nav .ui-tabs-selected a span {73 padding-bottom: 1px;74 }75 .ui-tabs-nav .ui-tabs-selected a, .ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active {76 background-position: 100% -150px;77 }78 .ui-tabs-nav a, .ui-tabs-nav .ui-tabs-disabled a:hover, .ui-tabs-nav .ui-tabs-disabled a:focus, .ui-tabs-nav .ui-tabs-disabled a:active {79 background-position: 100% -100px;80 }81 .ui-tabs-nav .ui-tabs-selected a span, .ui-tabs-nav a:hover span, .ui-tabs-nav a:focus span, .ui-tabs-nav a:active span {82 background-position: 0 -50px;83 }84 .ui-tabs-nav a span, .ui-tabs-nav .ui-tabs-disabled a:hover span, .ui-tabs-nav .ui-tabs-disabled a:focus span, .ui-tabs-nav .ui-tabs-disabled a:active span {85 background-position: 0 0;86 }87 .ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, .ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { /* @ Opera, use pseudo classes otherwise it confuses cursor... */88 cursor: text;89 }90 .ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active,91 .ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { /* @ Opera, we need to be explicit again here now... */92 cursor: pointer;93 }94 .ui-tabs-disabled {95 opacity: .4;96 filter: alpha(opacity=40);97 }98 .ui-tabs-panel {99 border-top: 1px solid #97a5b0;100 padding: 1em 8px;101 background: #fff; /* declare background color for container to avoid distorted fonts in IE while fading */102 }103 .ui-tabs-loading em {104 padding: 0 0 0 20px;105 background: url(../images/loading.gif) no-repeat 0 50%;106 }107 108 /* Additional IE specific bug fixes... */109 * html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */110 display: inline-block;111 }112 *:first-child+html .ui-tabs-nav { /* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */113 display: inline-block;114 }115 116 /* end jquery tabs css */117 /* jquery thickbox css */118 /* ----------------------------------------------------------------------------------------------------------------*/119 2 /* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/ 120 /* ----------------------------------------------------------------------------------------------------------------*/121 3 *{padding: 0; margin: 0;} 122 4 123 /* ----------------------------------------------------------------------------------------------------------------*/124 5 /* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ 125 /* ----------------------------------------------------------------------------------------------------------------*/126 6 #TB_window { 127 font: 12px Arial, Helvetica, sans-serif;128 color: #333333;129 7 } 130 8 131 9 #TB_secondLine { 132 font: 10px Arial, Helvetica, sans-serif;133 color:#666666;134 10 } 135 11 136 #TB_window a:link {color: #666666;}137 #TB_window a:visited {color: #666666;}138 #TB_window a:hover {color: #000;}139 #TB_window a:active {color: #666666;}140 #TB_window a:focus{color: #666666;}141 142 /* ----------------------------------------------------------------------------------------------------------------*/143 /* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/144 /* ----------------------------------------------------------------------------------------------------------------*/145 12 #TB_overlay { 146 13 position: fixed; 147 14 z-index:100; … … 277 144 /* end jquery thickbox css */ 278 145 279 146 /* quickpost css */ 280 div#container { 281 background-color: #fff; 282 padding: 0px 15px 0px 15px; 147 148 149 150 151 body { 152 font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; 153 } 154 /* jquery tabs css */ 155 156 /* Caution! Ensure accessibility in print and other media types... */ 157 @media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */ 158 .ui-tabs-hide { 159 display: none; 160 } 161 } 162 163 /* Hide useless elements in print layouts... */ 164 @media print { 165 .ui-tabs-nav { 166 display: none; 167 } 168 } 169 170 /* Skin */ 171 div.ui-tabs-panel { 172 border: none; 173 width: 100%; 174 height: auto; 175 margin: 0; 176 padding: 0; 177 position: relative; 178 } 179 .ui-tabs-nav { 180 list-style: none; 181 border-bottom: 1px solid #C6D9E9; 182 padding-left: 8px; 183 margin-bottom: .5em; 184 margin-top: -2em; 185 186 } 187 .ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ 188 display: block; 189 clear: both; 190 content: " "; 191 } 192 .ui-tabs-nav li { 193 float: left; 194 margin: 0; 195 height: 2em; 196 line-height: 2em; 197 } 198 .ui-tabs-nav a, .ui-tabs-nav a span { 199 display: block; 200 } 201 .ui-tabs-nav a { 202 margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ 203 padding-left: 0; 204 color: #27537a; 205 font-weight: bold; 206 line-height: 2em; 207 text-align: center; 208 text-decoration: none; 209 white-space: nowrap; /* required in IE 6 */ 210 outline: 0; /* prevent dotted border in Firefox */ 211 padding: 0 1em; 212 } 213 .ui-tabs-nav .ui-tabs-selected a { 214 position: relative; 215 top: 1px; 216 z-index: 2; 217 margin-top: 0; 218 -moz-border-radius-topleft:4px; 219 -moz-border-radius-topright:4px; 220 -webkit-border-top-left-radius: 4px; 221 -webkit-border-top-right-radius: 4px; 222 border-style:solid; 223 border-width:1px; 224 border-color:#C6D9E9 rgb(198, 217, 233) rgb(255, 255, 255); 225 color:#D54E21; 283 226 284 227 } 285 228 286 div#container h2 { 287 margin: 15px 0px 0px 0px; 288 font-size: 15px; 229 .ui-tabs-nav .ui-tabs-selected a { 230 background: white; 231 border-bottom-width:2px; 232 margin-top: -2px; 289 233 } 290 234 291 div#container h2 span.optional { 292 font-size: 10px; 293 color: #bbb; 294 font-style: italic; 295 font-weight: normal; 235 .ui-tabs-nav .ui-tabs-selected a:link, .ui-tabs-nav .ui-tabs-selected a:visited, .ui-tabs-nav .ui-tabs-disabled a:link, .ui-tabs-nav .ui-tabs-disabled a:visited { 236 /* @ Opera, use pseudo classes otherwise it confuses cursor... */ 237 cursor: pointer; 238 296 239 } 240 .ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active, 241 .ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { 242 /* @ Opera, we need to be explicit again here now... */ 243 cursor: pointer; 244 } 245 .ui-tabs-loading em { 246 padding: 0 0 0 20px; 247 background: url(../images/loading.gif) no-repeat 0 50%; 248 } 297 249 298 div#container form { 299 margin: 0px; 300 padding: 0px;250 /* Additional IE specific bug fixes... */ 251 * html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */ 252 display: inline-block; 301 253 } 254 *:first-child+html .ui-tabs-nav { /* @ IE 7 Standards Mode - do not group selectors, otherwise IE 6 will ignore complete rule (because of the unknown + combinator)... */ 255 display: inline-block; 256 } 302 257 303 div#categories { 304 float:right; 305 width:30%; 306 padding: 0px 5px 0px 5px; 258 #wphead { 259 border-top: none; 307 260 } 261 .submit input { 262 } 308 263 309 div#posting { 310 float:left; 311 width:65%; 312 padding: 0px 5px 0px 5px; 264 #wphead { 265 height: 2em; 266 padding-top: 8px; 313 267 } 314 268 315 textarea, input.text{316 font: Normal 12px 'Lucida Grande', Verdana, Helvetica, sans-serif;317 border: solid 1px #ccc;318 background-color: #f4f4f4;269 #wphead #viewsite { 270 position: absolute; 271 margin-top: 12px; 272 margin-left: 10px; 319 273 } 320 274 275 #viewsite { 276 position: relative; 277 right: 8px; 278 top: 6px; 279 margin: 0 !important; 280 } 281 #wphead #viewsite a { 282 font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; 283 padding: 3px 4px; 284 display: block; 285 letter-spacing: normal; 286 border-width: 1px; 287 border-style: solid; 288 -moz-border-radius: 3px; 289 -khtml-border-radius: 3px; 290 -webkit-border-radius: 3px; 291 border-radius: 3px; 292 text-decoration: none; 293 } 294 295 #previewview { 296 padding-top: 8px !important; 297 padding-bottom: 8px !important; 298 } 299 h1 { 300 font-size: .75em; 301 line-height: 2.666em; 302 top: .5em; 303 right: 0; 304 margin: 0 !important; 305 padding: 0 !important; 306 width:236px; 307 background: none; 308 } 309 310 321 311 input.text { 322 width: 99%; 312 border:0pt none; 313 outline-color:-moz-use-text-color; 314 outline-style:none; 315 outline-width:medium; 316 padding:0pt; 317 width:100%; 318 border-style:solid; 319 color:#333333; 320 } 321 .titlewrap { 322 border-style:solid; 323 border-width:1px; 324 padding:2px 3px; 325 border-color:#CCCCCC; 326 } 327 div#container { 328 329 margin: 0; 330 min-width: 500px; 331 332 } 333 334 div#posting { 335 padding-left: 16px; 336 position:absolute; 337 z-index:1; 338 width: 66%; 339 } 340 341 div#posting h2 { 342 margin: .5em 0 .25em 0 ; 343 font-size: 12px; 323 344 padding: 3px; 345 background: ; 324 346 } 325 347 326 body { 327 background-color: #fff; 348 div#container form { 328 349 margin: 0px; 329 padding: 5px; 330 font: Normal 13px 'Lucida Grande', Verdana, Helvetica, sans-serif; 350 padding: 0px; 331 351 } 332 352 333 a { 334 color: #007BFF; 353 div#categories { 354 font-size: 85%; 355 position: absolute; 356 top: 1.9em; 357 right: 16px; 358 width: 27%; 359 z-index: 2; 335 360 } 361 div#categories h2 { 362 font-size: 12px; 363 margin: 0; 364 padding: 0; 365 } 336 366 337 367 #categories-all { 338 368 overflow: auto; 339 height: 30em; 369 padding: 1em; 370 height: 20em; 340 371 } 341 372 342 373 #categories ul { … … 349 380 border-width: 1px; 350 381 border-color: #ccc; 351 382 border-style: solid; 383 margin-bottom: 1em; 352 384 } 353 385 354 386 #tagsdiv #newtag { … … 395 427 display: block; 396 428 } 397 429 398 /* end quickpost css */ 399 No newline at end of file 430 #post_title { 431 width: 99%; 432 } 433 434 /* end quickpost css */ 435 #img_container { 436 background-color: #fff; 437 margin-top:10px; overflow:auto; height:100px; 438 } 439 #img_container img { 440 width: 75px; 441 height: 75px; 442 padding: 2px; 443 background-color: #f4f4f4; 444 margin-right: 7px; 445 margin-bottom: 7px; 446 cursor: pointer; 447 } 448 449 .submitbox { 450 width: 180px; 451 float: right; 452 } 453 454 455 .submitbox .submit { 456 text-align: left; 457 padding: 12px 10px 10px 10px; 458 font-size: 11px; 459 } 460 461 .submit { 462 border-top: 1px solid #ccc; 463 padding: 1.5em 0 0 0; 464 margin: 10px 0 0 0; 465 -moz-border-radius-bottomleft: 3px; 466 -khtml-border-bottom-left-radius: 3px; 467 -webkit-border-bottom-left-radius: 3px; 468 border-bottom-left-radius: 3px; 469 -moz-border-radius-bottomright: 3px; 470 -khtml-border-bottom-right-radius: 3px; 471 -webkit-border-bottom-right-radius: 3px; 472 border-bottom-right-radius: 3px; 473 } 474 .submitbox .submit a:hover { 475 border-bottom-width: 1px; 476 border-bottom-style: solid; 477 } 478 479 .submitbox .submit input { 480 margin-bottom: 8px; 481 margin-right: 3px; 482 padding: 6px 4px; 483 border: none; 484 cursor: pointer; 485 } 486 487 .submitbox #previewview { 488 padding: 15px 10px; 489 -moz-border-radius-topleft: 3px; 490 -khtml-border-top-left-radius: 3px; 491 -webkit-border-top-left-radius: 3px; 492 border-top-left-radius: 3px; 493 -moz-border-radius-topright: 3px; 494 -khtml-border-top-right-radius: 3px; 495 -webkit-border-top-right-radius: 3px; 496 border-top-right-radius: 3px; 497 } 498