Ticket #6998: press-this-5-21-08-5pm.diff
File press-this-5-21-08-5pm.diff, 20.1 KB (added by , 17 years ago) |
---|
-
wp-admin/press-this.php
22 22 case 'regular': 23 23 $content = $_REQUEST['content']; 24 24 if ($_REQUEST['content2']) 25 $content .= '<p>' .$_REQUEST['content2'];25 $content .= $_REQUEST['content2']; 26 26 break; 27 27 28 28 case 'quote': 29 29 $content = '<blockquote>' . $_REQUEST['content']; 30 30 if ($_REQUEST['content2']) { 31 $content .= '</blockquote>'; 32 $content = $content . '<p>' . $_REQUEST['content2'].'</p>'; 31 $content .= '</blockquote> 32 '; 33 $content = $content . $_REQUEST['content2']; 33 34 } 34 35 break; 35 36 36 37 case 'photo': 37 38 if ($_REQUEST['photo_link']) 38 $content = '< p><a href="' . $_REQUEST['photo_link'] . '" target="_new">';39 $content = '<a href="' . $_REQUEST['photo_link'] . '" target="_new">'; 39 40 40 41 $content .= '<img src="' . $_REQUEST['photo_src'] . '" alt=""/>'; 41 42 42 43 if ($_REQUEST['photo_link']) 43 $content .= '</a></p>'; 44 $content .= '</a> 45 '; 44 46 45 47 if ($_REQUEST['content']) 46 $content = $content . $_REQUEST['content'];48 $content = $content . "\n".$_REQUEST['content']; 47 49 48 50 break; 49 51 case "video": 50 52 list($garbage,$video_id) = split("v=", $_REQUEST['content']); 51 53 $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>'; 52 54 if ($_REQUEST['content2']) 53 $content .= '<p>' . $_REQUEST['content2'] . '</p>';55 $content .= "\n" . $_REQUEST['content2']; 54 56 break; 55 57 } 56 58 … … 152 154 remove_linebreaks : true, 153 155 accessibility_focus : false, 154 156 tab_focus : ":next", 155 plugins : "safari,inlinepopups" 157 plugins : "safari,inlinepopups", 158 entity_encoding : "raw" 156 159 }); 157 160 <?php } ?> 158 161 … … 161 164 tag_update_quickclicks(); 162 165 163 166 // add the quickadd form 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>');167 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="submit" class="button" id="tagadd" value="' + postL10n.add + '" tabindex="3" onclick="return false;" /><input type="hidden"/><input type="hidden"/><span class="howto">'+postL10n.separate+'</span></span>'); 165 168 166 169 jQuery('#tagadd').click( tag_flush_to_text ); 167 170 jQuery('#newtag').focus(function() { … … 191 194 <head> 192 195 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 193 196 <title><?php _e('Press This') ?></title> 197 198 <style type="text/css" media="screen"> 199 body { 200 font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; 201 margin: 0px; 202 padding: 0px; 203 } 204 @media projection, screen { 205 .ui-tabs-hide { 206 display: none; 207 } 208 } 209 @media print { 210 .ui-tabs-nav { 211 display: none; 212 } 213 } 214 215 /* Skin */ 216 div.ui-tabs-panel { 217 border: none; 218 width: 100%; 219 height: auto; 220 margin: 0; 221 padding: 0; 222 position: relative; 223 } 224 .ui-tabs-nav { 225 list-style: none; 226 border-bottom: 1px solid #C6D9E9; 227 padding-left: 8px; 228 margin-bottom: .5em; 229 margin-top: -2em; 230 231 } 232 .ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */ 233 display: block; 234 clear: both; 235 content: " "; 236 } 237 .ui-tabs-nav li { 238 float: left; 239 margin: 0; 240 height: 2em; 241 line-height: 2em; 242 } 243 .ui-tabs-nav a, .ui-tabs-nav a span { 244 display: block; 245 } 246 .ui-tabs-nav a { 247 margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */ 248 padding-left: 0; 249 color: #27537a; 250 font-weight: bold; 251 line-height: 2em; 252 text-align: center; 253 text-decoration: none; 254 white-space: nowrap; /* required in IE 6 */ 255 outline: 0; /* prevent dotted border in Firefox */ 256 padding: 0 1em; 257 } 258 .ui-tabs-nav .ui-tabs-selected a { 259 position: relative; 260 top: 1px; 261 z-index: 2; 262 margin-top: 0; 263 -moz-border-radius-topleft:4px; 264 -moz-border-radius-topright:4px; 265 -webkit-border-top-left-radius: 4px; 266 -webkit-border-top-right-radius: 4px; 267 border-style:solid; 268 border-width:1px; 269 border-color:#C6D9E9 rgb(198, 217, 233) rgb(255, 255, 255); 270 color:#D54E21; 271 272 } 273 .ui-tabs-nav .ui-tabs-selected a { 274 background: white; 275 border-bottom-width:2px; 276 margin-top: -2px; 277 } 278 279 .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 { 280 /* @ Opera, use pseudo classes otherwise it confuses cursor... */ 281 cursor: pointer; 282 283 } 284 .ui-tabs-nav a:hover, .ui-tabs-nav a:focus, .ui-tabs-nav a:active, 285 .ui-tabs-nav .ui-tabs-unselect a:hover, .ui-tabs-nav .ui-tabs-unselect a:focus, .ui-tabs-nav .ui-tabs-unselect a:active { 286 /* @ Opera, we need to be explicit again here now... */ 287 cursor: pointer; 288 } 289 .ui-tabs-loading em { 290 padding: 0 0 0 20px; 291 background: url(./images/loading.gif) no-repeat 0 50%; 292 } 293 294 /* Additional IE specific bug fixes... */ 295 * html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */ 296 display: inline-block; 297 } 298 *: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)... */ 299 display: inline-block; 300 } 301 302 #wphead { 303 border-top: none; 304 } 305 .submit input { 306 } 307 308 #wphead { 309 height: 2em; 310 padding-top: 8px; 311 } 312 313 #wphead #viewsite { 314 position: absolute; 315 margin-top: 12px; 316 margin-left: 10px; 317 } 318 319 #viewsite { 320 position: relative; 321 right: 8px; 322 top: 6px; 323 margin: 0 !important; 324 } 325 #wphead #viewsite a { 326 font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; 327 padding: 3px 4px; 328 display: block; 329 letter-spacing: normal; 330 border-width: 1px; 331 border-style: solid; 332 -moz-border-radius: 3px; 333 -khtml-border-radius: 3px; 334 -webkit-border-radius: 3px; 335 border-radius: 3px; 336 text-decoration: none; 337 } 338 339 #previewview { 340 padding-top: 8px !important; 341 padding-bottom: 8px !important; 342 } 343 h1 { 344 font-size: .75em; 345 line-height: 2.666em; 346 top: .5em; 347 right: 0; 348 margin: 0 !important; 349 padding: 0 !important; 350 width:236px; 351 background: none; 352 } 353 354 355 input.text { 356 border:0pt none; 357 outline-color:-moz-use-text-color; 358 outline-style:none; 359 outline-width:medium; 360 padding:0pt; 361 width:100%; 362 border-style:solid; 363 color:#333333; 364 } 365 .titlewrap { 366 border-style:solid; 367 border-width:1px; 368 padding:2px 3px; 369 border-color:#CCCCCC; 370 } 371 div#container { 372 373 margin: 0; 374 min-width: 500px; 375 376 } 377 378 div#posting { 379 padding-left: 16px; 380 position:absolute; 381 z-index:1; 382 width: 66%; 383 } 384 385 div#posting h2 { 386 margin: .5em 0 .25em 0 ; 387 font-size: 12px; 388 padding: 3px; 389 background: ; 390 } 391 392 div#container form { 393 margin: 0px; 394 padding: 0px; 395 } 396 397 div#categories { 398 font-size: 85%; 399 position: absolute; 400 top: 1.9em; 401 right: 16px; 402 width: 27%; 403 z-index: 2; 404 } 405 div#categories h2 { 406 font-size: 12px; 407 margin: 0; 408 padding: 0; 409 } 410 411 #categories-all { 412 overflow: auto; 413 padding: 1em; 414 height: 20em; 415 } 416 417 #categories ul { 418 list-style: none; 419 padding: 0; 420 margin: 0; 421 } 422 423 .editor-container { 424 border-width: 1px; 425 border-color: #ccc; 426 border-style: solid; 427 margin-bottom: 1em; 428 } 429 430 #tagsdiv #newtag { 431 margin-right: 5px; 432 width: 16em; 433 } 434 435 #tagchecklist { 436 margin-left: 10px; 437 438 font-size: 12px; 439 overflow: auto; 440 } 441 442 #tagchecklist strong { 443 margin-left: -8px; 444 position: absolute; 445 } 446 447 #tagchecklist span { 448 margin-right: 25px; 449 display: block; 450 float: left; 451 font-size: 11px; 452 line-height: 1.8em; 453 white-space: nowrap; 454 cursor: default; 455 } 456 457 #tagchecklist span a { 458 margin: 6px 0pt 0pt -9px; 459 cursor: pointer; 460 width: 10px; 461 height: 10px; 462 display: block; 463 float: left; 464 text-indent: -9999px; 465 overflow: hidden; 466 position: absolute; 467 } 468 469 .howto { 470 font-style: italic; 471 display: block; 472 } 473 474 #post_title { 475 width: 99%; 476 } 477 #img_container { 478 background-color: #fff; 479 margin-top:10px; overflow:auto; height:100px; 480 } 481 #img_container img { 482 width: 75px; 483 height: 75px; 484 padding: 2px; 485 background-color: #f4f4f4; 486 margin-right: 7px; 487 margin-bottom: 7px; 488 cursor: pointer; 489 } 490 491 .submitbox { 492 width: 180px; 493 float: right; 494 } 495 496 497 .submitbox .submit { 498 text-align: left; 499 padding: 12px 10px 10px 10px; 500 font-size: 11px; 501 } 502 503 .submit { 504 border-top: 1px solid #ccc; 505 padding: 1.5em 0 0 0; 506 margin: 10px 0 0 0; 507 -moz-border-radius-bottomleft: 3px; 508 -khtml-border-bottom-left-radius: 3px; 509 -webkit-border-bottom-left-radius: 3px; 510 border-bottom-left-radius: 3px; 511 -moz-border-radius-bottomright: 3px; 512 -khtml-border-bottom-right-radius: 3px; 513 -webkit-border-bottom-right-radius: 3px; 514 border-bottom-right-radius: 3px; 515 } 516 .submitbox .submit a:hover { 517 border-bottom-width: 1px; 518 border-bottom-style: solid; 519 } 520 521 .submitbox .submit input { 522 margin-bottom: 8px; 523 margin-right: 3px; 524 padding: 6px 4px; 525 border: none; 526 cursor: pointer; 527 } 528 529 .submitbox #previewview { 530 padding: 15px 10px; 531 -moz-border-radius-topleft: 3px; 532 -khtml-border-top-left-radius: 3px; 533 -webkit-border-top-left-radius: 3px; 534 border-top-left-radius: 3px; 535 -moz-border-radius-topright: 3px; 536 -khtml-border-top-right-radius: 3px; 537 -webkit-border-top-right-radius: 3px; 538 border-top-right-radius: 3px; 539 } 540 </style> 541 194 542 <script type="text/javascript" src="../wp-includes/js/tinymce/tiny_mce.js"></script> 195 543 <?php 196 544 wp_enqueue_script('jquery-ui-tabs'); … … 198 546 wp_enqueue_script('post'); 199 547 do_action('admin_print_scripts'); 200 548 do_action('admin_head'); 201 wp_admin_css('css/press-this');202 549 wp_admin_css( 'css/colors' ); 203 550 ?> 204 551 <script type="text/javascript"> 205 206 552 jQuery(document).ready(function() { 553 207 554 <?php if ( preg_match("/youtube\.com\/watch/i", $url) ) { ?> 208 555 jQuery('#container > ul').tabs({ selected: 3 }); 209 556 <?php } elseif ( preg_match("/flickr\.com/i", $url) ) { ?> … … 214 561 }); 215 562 216 563 </script> 564 565 217 566 </head> 218 567 <body> 219 568 <div id="wphead"> … … 241 590 img.style.backgroundColor = '#44f'; 242 591 } 243 592 last = img; 593 594 /*jQuery('.photolist').append('<h2><?php _e("Photo URL") ?></h2>' + 595 '<div class="titlewrap">' + 596 '<a href="#" class="remove">remove <input name="photo_src" id="photo_src[]" value ="'+ img.src +'" class="text" onkeydown="pick(0);"/></a>' + 597 '</div>');*/ 244 598 return false; 245 599 } 246 600 601 jQuery('.remove').click(function() { 602 jQuery(this).remove; 603 604 }); 247 605 jQuery(document).ready(function() { 248 606 var img, img_tag, aspect, w, h, skip, i, strtoappend = ""; 249 607 var my_src = [<?php echo get_images_from_uri($url); ?>]; … … 298 656 <input name="photo_src" id="photo_src" class="text" onkeydown="pick(0);"/> 299 657 </div> 300 658 659 <div class="photolist"></div> 660 301 661 <h2><?php _e('Link Photo to following URL') ?></h2><?php _e('(leave blank to leave the photo unlinked)') ?> 302 662 <div class="titlewrap"> 303 663 <input name="photo_link" id="photo_link" class="text" value="<?php echo attribute_escape($url);?>"/> … … 313 673 <h2><?php _e('Caption') ?></h2> 314 674 <div class="editor-container"> 315 675 <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>676 <a href="<?php echo attribute_escape($url);?>"><?php echo $title;?></a> </textarea> 317 677 </div> 318 678 319 679 <?php tag_div(); ?> … … 341 701 342 702 <h2><?php _e('Post') ?></h2> 343 703 <div class="editor-container"> 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>704 <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 705 </div> 346 706 347 707 <?php tag_div(); ?> -
wp-admin/css/press-this.css
1 body {2 font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;3 }4 /* jquery tabs css */5 6 /* Caution! Ensure accessibility in print and other media types... */7 @media projection, screen { /* Use class for showing/hiding tab content, so that visibility can be better controlled in different media types... */8 .ui-tabs-hide {9 display: none;10 }11 }12 13 /* Hide useless elements in print layouts... */14 @media print {15 .ui-tabs-nav {16 display: none;17 }18 }19 20 /* Skin */21 div.ui-tabs-panel {22 border: none;23 width: 100%;24 height: auto;25 margin: 0;26 padding: 0;27 position: relative;28 }29 .ui-tabs-nav {30 list-style: none;31 border-bottom: 1px solid #C6D9E9;32 padding-left: 8px;33 margin-bottom: .5em;34 margin-top: -2em;35 36 }37 .ui-tabs-nav:after { /* clearing without presentational markup, IE gets extra treatment */38 display: block;39 clear: both;40 content: " ";41 }42 .ui-tabs-nav li {43 float: left;44 margin: 0;45 height: 2em;46 line-height: 2em;47 }48 .ui-tabs-nav a, .ui-tabs-nav a span {49 display: block;50 }51 .ui-tabs-nav a {52 margin: 1px 0 0; /* position: relative makes opacity fail for disabled tab in IE */53 padding-left: 0;54 color: #27537a;55 font-weight: bold;56 line-height: 2em;57 text-align: center;58 text-decoration: none;59 white-space: nowrap; /* required in IE 6 */60 outline: 0; /* prevent dotted border in Firefox */61 padding: 0 1em;62 }63 .ui-tabs-nav .ui-tabs-selected a {64 position: relative;65 top: 1px;66 z-index: 2;67 margin-top: 0;68 -moz-border-radius-topleft:4px;69 -moz-border-radius-topright:4px;70 -webkit-border-top-left-radius: 4px;71 -webkit-border-top-right-radius: 4px;72 border-style:solid;73 border-width:1px;74 border-color:#C6D9E9 rgb(198, 217, 233) rgb(255, 255, 255);75 color:#D54E21;76 77 }78 79 .ui-tabs-nav .ui-tabs-selected a {80 background: white;81 border-bottom-width:2px;82 margin-top: -2px;83 }84 85 .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 {86 /* @ Opera, use pseudo classes otherwise it confuses cursor... */87 cursor: pointer;88 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 {92 /* @ Opera, we need to be explicit again here now... */93 cursor: pointer;94 }95 .ui-tabs-loading em {96 padding: 0 0 0 20px;97 background: url(../images/loading.gif) no-repeat 0 50%;98 }99 100 /* Additional IE specific bug fixes... */101 * html .ui-tabs-nav { /* auto clear, @ IE 6 & IE 7 Quirks Mode */102 display: inline-block;103 }104 *: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)... */105 display: inline-block;106 }107 108 #wphead {109 border-top: none;110 }111 .submit input {112 }113 114 #wphead {115 height: 2em;116 padding-top: 8px;117 }118 119 #wphead #viewsite {120 position: absolute;121 margin-top: 12px;122 margin-left: 10px;123 }124 125 #viewsite {126 position: relative;127 right: 8px;128 top: 6px;129 margin: 0 !important;130 }131 #wphead #viewsite a {132 font: 12px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;133 padding: 3px 4px;134 display: block;135 letter-spacing: normal;136 border-width: 1px;137 border-style: solid;138 -moz-border-radius: 3px;139 -khtml-border-radius: 3px;140 -webkit-border-radius: 3px;141 border-radius: 3px;142 text-decoration: none;143 }144 145 #previewview {146 padding-top: 8px !important;147 padding-bottom: 8px !important;148 }149 h1 {150 font-size: .75em;151 line-height: 2.666em;152 top: .5em;153 right: 0;154 margin: 0 !important;155 padding: 0 !important;156 width:236px;157 background: none;158 }159 160 161 input.text {162 border:0pt none;163 outline-color:-moz-use-text-color;164 outline-style:none;165 outline-width:medium;166 padding:0pt;167 width:100%;168 border-style:solid;169 color:#333333;170 }171 .titlewrap {172 border-style:solid;173 border-width:1px;174 padding:2px 3px;175 border-color:#CCCCCC;176 }177 div#container {178 179 margin: 0;180 min-width: 500px;181 182 }183 184 div#posting {185 padding-left: 16px;186 position:absolute;187 z-index:1;188 width: 66%;189 }190 191 div#posting h2 {192 margin: .5em 0 .25em 0 ;193 font-size: 12px;194 padding: 3px;195 background: ;196 }197 198 div#container form {199 margin: 0px;200 padding: 0px;201 }202 203 div#categories {204 font-size: 85%;205 position: absolute;206 top: 1.9em;207 right: 16px;208 width: 27%;209 z-index: 2;210 }211 div#categories h2 {212 font-size: 12px;213 margin: 0;214 padding: 0;215 }216 217 #categories-all {218 overflow: auto;219 padding: 1em;220 height: 20em;221 }222 223 #categories ul {224 list-style: none;225 padding: 0;226 margin: 0;227 }228 229 .editor-container {230 border-width: 1px;231 border-color: #ccc;232 border-style: solid;233 margin-bottom: 1em;234 }235 236 #tagsdiv #newtag {237 margin-right: 5px;238 width: 16em;239 }240 241 #tagchecklist {242 margin-left: 10px;243 244 font-size: 12px;245 overflow: auto;246 }247 248 #tagchecklist strong {249 margin-left: -8px;250 position: absolute;251 }252 253 #tagchecklist span {254 margin-right: 25px;255 display: block;256 float: left;257 font-size: 11px;258 line-height: 1.8em;259 white-space: nowrap;260 cursor: default;261 }262 263 #tagchecklist span a {264 margin: 6px 0pt 0pt -9px;265 cursor: pointer;266 width: 10px;267 height: 10px;268 display: block;269 float: left;270 text-indent: -9999px;271 overflow: hidden;272 position: absolute;273 }274 275 .howto {276 font-style: italic;277 display: block;278 }279 280 #post_title {281 width: 99%;282 }283 284 /* end quickpost css */285 #img_container {286 background-color: #fff;287 margin-top:10px; overflow:auto; height:100px;288 }289 #img_container img {290 width: 75px;291 height: 75px;292 padding: 2px;293 background-color: #f4f4f4;294 margin-right: 7px;295 margin-bottom: 7px;296 cursor: pointer;297 }298 299 .submitbox {300 width: 180px;301 float: right;302 }303 304 305 .submitbox .submit {306 text-align: left;307 padding: 12px 10px 10px 10px;308 font-size: 11px;309 }310 311 .submit {312 border-top: 1px solid #ccc;313 padding: 1.5em 0 0 0;314 margin: 10px 0 0 0;315 -moz-border-radius-bottomleft: 3px;316 -khtml-border-bottom-left-radius: 3px;317 -webkit-border-bottom-left-radius: 3px;318 border-bottom-left-radius: 3px;319 -moz-border-radius-bottomright: 3px;320 -khtml-border-bottom-right-radius: 3px;321 -webkit-border-bottom-right-radius: 3px;322 border-bottom-right-radius: 3px;323 }324 .submitbox .submit a:hover {325 border-bottom-width: 1px;326 border-bottom-style: solid;327 }328 329 .submitbox .submit input {330 margin-bottom: 8px;331 margin-right: 3px;332 padding: 6px 4px;333 border: none;334 cursor: pointer;335 }336 337 .submitbox #previewview {338 padding: 15px 10px;339 -moz-border-radius-topleft: 3px;340 -khtml-border-top-left-radius: 3px;341 -webkit-border-top-left-radius: 3px;342 border-top-left-radius: 3px;343 -moz-border-radius-topright: 3px;344 -khtml-border-top-right-radius: 3px;345 -webkit-border-top-right-radius: 3px;346 border-top-right-radius: 3px;347 }348