-
+ D05289E8D9E133516721C644F670A08A5FA301EC93B56E85A969362C6006818969114E0D52DE064B40EEAE8A462C1E42ECA71E63B521D4A9F379B597AA6EFC6D
mp-wp/wp-admin/press-this.php
(0 . 0)(1 . 563)
55727 <?php
55728 /**
55729 * Press This Display and Handler.
55730 *
55731 * @package WordPress
55732 * @subpackage Press_This
55733 */
55734
55735 /** WordPress Administration Bootstrap */
55736 require_once('admin.php');
55737
55738 if ( ! current_user_can('publish_posts') ) wp_die( __( 'Cheatin’ uh?' ) );
55739
55740 /**
55741 * Replace forward slash with backslash and slash.
55742 *
55743 * @package WordPress
55744 * @subpackage Press_This
55745 * @since 2.6.0
55746 *
55747 * @param string $string
55748 * @return string
55749 */
55750 function preg_quote2($string) {
55751 return str_replace('/', '\/', preg_quote($string));
55752 }
55753
55754 /**
55755 * Convert characters.
55756 *
55757 * @package WordPress
55758 * @subpackage Press_This
55759 * @since 2.6.0
55760 *
55761 * @param string $text
55762 * @return string
55763 */
55764 function aposfix($text) {
55765 $translation_table[chr(34)] = '"';
55766 $translation_table[chr(38)] = '&';
55767 $translation_table[chr(39)] = ''';
55768 return preg_replace("/&(?![A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/","&" , strtr($text, $translation_table));
55769 }
55770
55771 /**
55772 * Press It form handler.
55773 *
55774 * @package WordPress
55775 * @subpackage Press_This
55776 * @since 2.6.0
55777 *
55778 * @return int Post ID
55779 */
55780 function press_it() {
55781 // define some basic variables
55782 $quick['post_status'] = 'draft'; // set as draft first
55783 $quick['post_category'] = $_REQUEST['post_category'];
55784 $quick['tags_input'] = $_REQUEST['tags_input'];
55785 $quick['post_title'] = $_REQUEST['title'];
55786 $quick['post_content'] = '';
55787
55788 // insert the post with nothing in it, to get an ID
55789 $post_ID = wp_insert_post($quick, true);
55790 $content = $_REQUEST['content'];
55791
55792 if($_REQUEST['photo_src'])
55793 foreach( (array) $_REQUEST['photo_src'] as $key => $image)
55794 // see if files exist in content - we don't want to upload non-used selected files.
55795 if( strpos($_REQUEST['content'], $image) !== false ) {
55796 $upload = media_sideload_image($image, $post_ID, $_REQUEST['photo_description'][$key]);
55797
55798 // Replace the POSTED content <img> with correct uploaded ones.
55799 // escape quote for matching
55800 $quoted = preg_quote2($image);
55801 if( !is_wp_error($upload) ) $content = preg_replace('/<img ([^>]*)src=(\"|\')'.$quoted.'(\2)([^>\/]*)\/*>/is', $upload, $content);
55802 }
55803
55804 // set the post_content and status
55805 $quick['post_status'] = isset($_REQUEST['publish']) ? 'publish' : 'draft';
55806 $quick['post_content'] = $content;
55807 // error handling for $post
55808 if ( is_wp_error($post_ID)) {
55809 wp_die($id);
55810 wp_delete_post($post_ID);
55811 // error handling for media_sideload
55812 } elseif ( is_wp_error($upload)) {
55813 wp_die($upload);
55814 wp_delete_post($post_ID);
55815 } else {
55816 $quick['ID'] = $post_ID;
55817 wp_update_post($quick);
55818 }
55819 return $post_ID;
55820 }
55821
55822 // For submitted posts.
55823 if ( 'post' == $_REQUEST['action'] ) {
55824 check_admin_referer('press-this');
55825 $post_ID = press_it();
55826 $posted = $post_ID;
55827 }
55828
55829 // Set Variables
55830 $title = wp_specialchars(aposfix(stripslashes($_GET['t'])));
55831 $selection = trim( aposfix( stripslashes($_GET['s']) ) );
55832 if ( ! empty($selection) ) {
55833 $selection = preg_replace('/(\r?\n|\r)/', '</p><p>', $selection);
55834 $selection = '<p>'.str_replace('<p></p>', '', $selection).'</p>';
55835 }
55836 $url = clean_url($_GET['u']);
55837 $image = $_GET['i'];
55838
55839 if($_REQUEST['ajax']) {
55840 switch ($_REQUEST['ajax']) {
55841 case 'video': ?>
55842 <script type="text/javascript" charset="utf-8">
55843 jQuery('.select').click(function() {
55844 append_editor(jQuery('#embed-code').val());
55845 jQuery('#extra_fields').hide();
55846 jQuery('#extra_fields').html('');
55847 });
55848 jQuery('.close').click(function() {
55849 jQuery('#extra_fields').hide();
55850 jQuery('#extra_fields').html('');
55851 });
55852 </script>
55853 <div class="postbox">
55854 <h2><label for="embed-code"><?php _e('Embed Code') ?></label></h2>
55855 <div class="inside">
55856 <textarea name="embed-code" id="embed-code" rows="8" cols="40"><?php echo format_to_edit($selection, true); ?></textarea>
55857 <p id="options"><a href="#" class="select button"><?php _e('Insert Video'); ?></a> <a href="#" class="close button"><?php _e('Cancel'); ?></a></p>
55858 </div>
55859 </div>
55860 <?php break;
55861
55862 case 'photo_thickbox': ?>
55863 <script type="text/javascript" charset="utf-8">
55864 jQuery('.cancel').click(function() {
55865 tb_remove();
55866 });
55867 jQuery('.select').click(function() {
55868 image_selector();
55869 });
55870 </script>
55871 <h3 class="tb"><label for="this_photo_description"><?php _e('Description') ?></label></h3>
55872 <div class="titlediv">
55873 <div class="titlewrap">
55874 <input id="this_photo_description" name="photo_description" class="tbtitle text" onkeypress="if(event.keyCode==13) image_selector();" value="<?php echo attribute_escape($title);?>"/>
55875 </div>
55876 </div>
55877
55878 <p class="centered"><input type="hidden" name="this_photo" value="<?php echo attribute_escape($image); ?>" id="this_photo" />
55879 <a href="#" class="select"><img src="<?php echo clean_url($image); ?>" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p>
55880
55881 <p id="options"><a href="#" class="select button"><?php _e('Insert Image'); ?></a> <a href="#" class="cancel button"><?php _e('Cancel'); ?></a></p>
55882
55883
55884 <?php break;
55885
55886 case 'photo_thickbox_url': ?>
55887 <script type="text/javascript" charset="utf-8">
55888 jQuery('.cancel').click(function() {
55889 tb_remove();
55890 });
55891
55892 jQuery('.select').click(function() {
55893 image_selector();
55894 });
55895 </script>
55896 <h3 class="tb"><label for="this_photo"><?php _e('URL') ?></label></h3>
55897 <div class="titlediv">
55898 <div class="titlewrap">
55899 <input id="this_photo" name="this_photo" class="tbtitle text" onkeypress="if(event.keyCode==13) image_selector();" />
55900 </div>
55901 </div>
55902
55903
55904 <h3 class="tb"><label for="photo_description"><?php _e('Description') ?></label></h3>
55905 <div id="titlediv">
55906 <div class="titlewrap">
55907 <input id="this_photo_description" name="photo_description" class="tbtitle text" onkeypress="if(event.keyCode==13) image_selector();" value="<?php echo attribute_escape($title);?>"/>
55908 </div>
55909 </div>
55910
55911 <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p>
55912 <?php break;
55913 case 'photo_images':
55914 /**
55915 * Retrieve all image URLs from given URI.
55916 *
55917 * @package WordPress
55918 * @subpackage Press_This
55919 * @since 2.6.0
55920 *
55921 * @param string $uri
55922 * @return string
55923 */
55924 function get_images_from_uri($uri) {
55925 if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
55926 return "'".$uri."'";
55927 $content = wp_remote_fopen($uri);
55928 if ( false === $content )
55929 return '';
55930 $host = parse_url($uri);
55931 $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))[^<>\'\"]*(\2)([^>\/]*)\/*>/is';
55932 preg_match_all($pattern, $content, $matches);
55933 if ( empty($matches[0]) )
55934 return '';
55935 $sources = array();
55936 foreach ($matches[3] as $src) {
55937 // if no http in url
55938 if(strpos($src, 'http') === false)
55939 // if it doesn't have a relative uri
55940 if( strpos($src, '../') === false && strpos($src, './') === false && strpos($src, '/') === 0)
55941 $src = 'http://'.str_replace('//','/', $host['host'].'/'.$src);
55942 else
55943 $src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src);
55944 $sources[] = clean_url($src);
55945 }
55946 return "'" . implode("','", $sources) . "'";
55947 }
55948 $url = urldecode($url);
55949 $url = str_replace(' ', '%20', $url);
55950 echo 'new Array('.get_images_from_uri($url).')';
55951
55952 break;
55953
55954 case 'photo_js': ?>
55955 // gather images and load some default JS
55956 var last = null
55957 var img, img_tag, aspect, w, h, skip, i, strtoappend = "";
55958 var my_src = eval(
55959 jQuery.ajax({
55960 type: "GET",
55961 url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>",
55962 cache : false,
55963 async : false,
55964 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>",
55965 dataType : "script"
55966 }).responseText
55967 );
55968 if(my_src.length == 0) {
55969 var my_src = eval(
55970 jQuery.ajax({
55971 type: "GET",
55972 url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>",
55973 cache : false,
55974 async : false,
55975 data: "ajax=photo_images&u=<?php echo urlencode($url); ?>",
55976 dataType : "script"
55977 }).responseText
55978 );
55979 if(my_src.length == 0) {
55980 strtoappend = '<?php _e('Unable to retrieve images or no images on page.'); ?>';
55981 }
55982 }
55983
55984 for (i = 0; i < my_src.length; i++) {
55985 img = new Image();
55986 img.src = my_src[i];
55987 img_attr = 'id="img' + i + '"';
55988 skip = false;
55989
55990 maybeappend = '<a href="?ajax=photo_thickbox&i=' + encodeURIComponent(img.src) + '&u=<?php echo urlencode($url); ?>&height=400&width=500" title="" class="thickbox"><img src="' + img.src + '" ' + img_attr + '/></a>';
55991
55992 if (img.width && img.height) {
55993 if (img.width >= 30 && img.height >= 30) {
55994 aspect = img.width / img.height;
55995 scale = (aspect > 1) ? (71 / img.width) : (71 / img.height);
55996
55997 w = img.width;
55998 h = img.height;
55999
56000 if (scale < 1) {
56001 w = parseInt(img.width * scale);
56002 h = parseInt(img.height * scale);
56003 }
56004 img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"';
56005 strtoappend += maybeappend;
56006 }
56007 } else {
56008 strtoappend += maybeappend;
56009 }
56010 }
56011
56012 function pick(img, desc) {
56013 if (img) {
56014 if('object' == typeof jQuery('.photolist input') && jQuery('.photolist input').length != 0) length = jQuery('.photolist input').length;
56015 if(length == 0) length = 1;
56016 jQuery('.photolist').append('<input name="photo_src[' + length + ']" value="' + img +'" type="hidden"/>');
56017 jQuery('.photolist').append('<input name="photo_description[' + length + ']" value="' + desc +'" type="hidden"/>');
56018 insert_editor( "\n\n" + encodeURI('<p style="text-align: center;"><a href="<?php echo $url; ?>"><img src="' + img +'" alt="' + desc + '" /></a></p>'));
56019 }
56020 return false;
56021 }
56022
56023 function image_selector() {
56024 tb_remove();
56025 desc = jQuery('#this_photo_description').val();
56026 src = jQuery('#this_photo').val();
56027 pick(src, desc);
56028 jQuery('#extra_fields').hide();
56029 jQuery('#extra_fields').html('');
56030 return false;
56031 }
56032
56033 jQuery(document).ready(function() {
56034 jQuery('#extra_fields').html('<div class="postbox"><h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
56035 jQuery('.close').click(function() {
56036 jQuery('#extra_fields').hide();
56037 jQuery('#extra_fields').html('');
56038 });
56039 jQuery('.refresh').click(function() {
56040 show('photo');
56041 });
56042 jQuery('#img_container').html(strtoappend);
56043 jQuery('#photo_add_url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500');
56044 tb_init('#extra_fields .thickbox');
56045
56046
56047 });
56048 <?php break;
56049 }
56050 die;
56051 }
56052
56053 ?>
56054 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
56055 <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>>
56056 <head>
56057 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
56058 <title><?php _e('Press This') ?></title>
56059
56060 <?php
56061 add_thickbox();
56062 wp_enqueue_style('press-this');
56063 wp_enqueue_style('press-this-ie');
56064 wp_enqueue_style( 'colors' );
56065 wp_enqueue_script( 'post' );
56066 wp_enqueue_script('editor');
56067
56068 do_action('admin_print_styles');
56069 do_action('admin_print_scripts');
56070 do_action('admin_head');
56071
56072 if ( user_can_richedit() ) {
56073 add_filter( 'teeny_mce_before_init', create_function( '$a', '$a["height"] = "400"; $a["onpageload"] = ""; $a["mode"] = "textareas"; $a["editor_selector"] = "mceEditor"; return $a;' ) );
56074 wp_tiny_mce( true );
56075 }
56076 ?>
56077 <script type="text/javascript">
56078 jQuery('#tags-input').hide();
56079 tag_update_quickclicks();
56080 // add the quickadd form
56081 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>');
56082
56083 jQuery('#tagadd').click( tag_flush_to_text );
56084 jQuery('#newtag').focus(function() {
56085 if ( this.value == postL10n.addTag )
56086 jQuery(this).val( '' ).removeClass( 'form-input-tip' );
56087 });
56088 jQuery('#newtag').blur(function() {
56089 if ( this.value == '' )
56090 jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' );
56091 });
56092 // auto-save tags on post save/publish
56093 jQuery('#publish').click( tag_save_on_publish );
56094 jQuery('#save').click( tag_save_on_publish );
56095 function insert_plain_editor(text) {
56096 edCanvas = document.getElementById('content');
56097 edInsertContent(edCanvas, text);
56098 }
56099 function set_editor(text) {
56100 if ( '' == text || '<p></p>' == text ) text = '<p><br /></p>';
56101 if ( tinyMCE.activeEditor ) tinyMCE.execCommand('mceSetContent', false, text);
56102 }
56103 function insert_editor(text) {
56104 if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) {
56105 tinyMCE.execCommand('mceInsertContent', false, '<p>' + decodeURI(tinymce.DOM.decode(text)) + '</p>', {format : 'raw'});
56106 } else {
56107 insert_plain_editor(decodeURI(text));
56108 }
56109 }
56110 function append_editor(text) {
56111 if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) {
56112 tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'}) + '<p>' + text + '</p>');
56113 tinyMCE.execCommand('mceCleanup');
56114 } else {
56115 insert_plain_editor(text);
56116 }
56117 }
56118
56119 function show(tab_name) {
56120 jQuery('#extra_fields').html('');
56121 jQuery('#extra_fields').show();
56122 switch(tab_name) {
56123 case 'video' :
56124 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo attribute_escape($selection); ?>'}, function() {
56125 <?php
56126 $content = '';
56127 if ( preg_match("/youtube\.com\/watch/i", $url) ) {
56128 list($domain, $video_id) = split("v=", $url);
56129 $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>';
56130
56131 } elseif ( preg_match("/vimeo\.com\/[0-9]+/i", $url) ) {
56132 list($domain, $video_id) = split(".com/", $url);
56133 $content = '<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /> <embed src="http://www.vimeo.com/moogaloop.swf?clip_id=' . $video_id . '&server=www.vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>';
56134
56135 if ( trim($selection) == '' )
56136 $selection = '<p><a href="http://www.vimeo.com/' . $video_id . '?pg=embed&sec=' . $video_id . '">' . $title . '</a> on <a href="http://vimeo.com?pg=embed&sec=' . $video_id . '">Vimeo</a></p>';
56137
56138 } elseif ( strpos( $selection, '<object' ) !== false ) {
56139 $content = $selection;
56140 }
56141 ?>
56142 jQuery('#embed-code').prepend('<?php echo htmlentities($content); ?>');
56143 });
56144 return false;
56145 break;
56146 case 'photo' :
56147 jQuery('#extra_fields').before('<p id="waiting"><img src="images/loading.gif" alt="" /> <?php echo js_escape( __( 'Loading...' ) ); ?></p>');
56148 jQuery.ajax({
56149 type: "GET",
56150 cache : false,
56151 url: "<?php echo clean_url($_SERVER['PHP_SELF']); ?>",
56152 data: "ajax=photo_js&u=<?php echo urlencode($url)?>",
56153 dataType : "script",
56154 success : function() {
56155 jQuery('#waiting').remove();
56156 }
56157 });
56158 return false;
56159 break;
56160 }
56161 }
56162 jQuery(document).ready(function() {
56163 //resize screen
56164 window.resizeTo(720,570);
56165 // set button actions
56166 jQuery('#photo_button').click(function() { show('photo'); return false; });
56167 jQuery('#video_button').click(function() { show('video'); return false; });
56168 // auto select
56169 <?php if ( preg_match("/youtube\.com\/watch/i", $url) ) { ?>
56170 show('video');
56171 <?php } elseif ( preg_match("/vimeo\.com\/[0-9]+/i", $url) ) { ?>
56172 show('video');
56173 <?php } elseif ( preg_match("/flickr\.com/i", $url) ) { ?>
56174 show('photo');
56175 <?php } ?>
56176 jQuery('#title').unbind();
56177 jQuery('#publish, #save').click(function() { jQuery('#saving').css('display', 'inline'); });
56178 });
56179 </script>
56180 </head>
56181 <body class="press-this">
56182 <div id="wphead"></div>
56183 <form action="press-this.php?action=post" method="post">
56184 <div id="poststuff" class="metabox-holder">
56185 <div id="side-info-column">
56186 <div class="sleeve">
56187 <h1 id="viewsite"><a class="button" href="<?php echo get_option('home'); ?>/" target="_blank"><?php bloginfo('name'); ?> › <?php _e('Press This') ?></a></span></h1>
56188
56189 <?php wp_nonce_field('press-this') ?>
56190 <input type="hidden" name="post_type" id="post_type" value="text"/>
56191 <input type="hidden" name="autosave" id="autosave" />
56192 <input type="hidden" id="original_post_status" name="original_post_status" value="draft" />
56193 <input type="hidden" id="prev_status" name="prev_status" value="draft" />
56194
56195 <!-- This div holds the photo metadata -->
56196 <div class="photolist"></div>
56197
56198 <div id="categorydiv" class="stuffbox">
56199 <h2><?php _e('Categories') ?></h2>
56200 <div class="inside">
56201
56202 <div id="categories-all" class="ui-tabs-panel">
56203 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
56204 <?php wp_category_checklist($post->ID, false, false, $popular_ids) ?>
56205 </ul>
56206 </div>
56207
56208 <div id="category-adder" class="wp-hidden-children">
56209 <a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a>
56210 <p id="category-add" class="wp-hidden-child">
56211 <label class="hidden" for="newcat"><?php _e( 'Add New Category' ); ?></label><input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" tabindex="3" aria-required="true"/>
56212 <label class="hidden" for="newcat_parent"><?php _e('Parent category'); ?>:</label><?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
56213 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _e( 'Add' ); ?>" tabindex="3" />
56214 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
56215 <span id="category-ajax-response"></span>
56216 </p>
56217 </div>
56218 </div>
56219 </div>
56220
56221 <div class="stuffbox">
56222 <h2><?php _e('Tags') ?></h2>
56223 <div class="inside">
56224
56225 <div id="jaxtag">
56226 <label class="hidden" for="newtag"><?php _e('Tags'); ?></label>
56227 <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 ); ?>" />
56228 </div>
56229 <div id="tagchecklist"></div>
56230 </div>
56231 </div>
56232 <div id="submitdiv" class="postbox">
56233 <h2><?php _e('Publish') ?></h2>
56234 <div class="inside">
56235 <p>
56236 <input class="button" type="submit" name="draft" value="<?php _e('Save Draft') ?>" id="save" />
56237 <input class="button-primary" type="submit" name="publish" value="<?php _e('Publish') ?>" id="publish" />
56238 <img src="images/loading-publish.gif" alt="" id="saving" style="display:none;"/>
56239 </p>
56240 </div>
56241 </div>
56242 </div>
56243 </div>
56244
56245 <div class="posting">
56246 <?php if ( isset($posted) && intval($posted) ) { $post_ID = intval($posted); ?>
56247 <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $post_ID ); ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div>
56248 <?php } ?>
56249
56250 <div id="titlediv">
56251 <div class="titlewrap">
56252 <input name="title" id="title" class="text" value="<?php echo attribute_escape($title);?>"/>
56253 </div>
56254 </div>
56255
56256 <div id="extra_fields" style="display: none"></div>
56257
56258 <div class="postdivrich">
56259 <ul id="actions">
56260 <li id="photo_button">
56261 Add: <a title="<?php _e('Insert an Image'); ?>" href="#">
56262 <img alt="<?php _e('Insert an Image'); ?>" src="images/media-button-image.gif"/></a>
56263 </li>
56264 <li id="video_button">
56265 <a title="<?php _e('Embed a Video'); ?>" href="#"><img alt="<?php _e('Embed a Video'); ?>" src="images/media-button-video.gif"/></a>
56266 </li>
56267 <?php if( user_can_richedit() ) { ?>
56268 <li id="switcher">
56269 <?php wp_print_scripts( 'quicktags' ); ?>
56270 <?php add_filter('the_editor_content', 'wp_richedit_pre'); ?>
56271 <a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
56272 <a id="edButtonPreview" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
56273 <div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
56274 </li>
56275 <?php } ?>
56276 </ul>
56277 <div id="quicktags"></div>
56278 <div class="editor-container">
56279 <textarea name="content" id="content" style="width:100%;" class="mceEditor" rows="15">
56280 <?php if ($selection) echo wp_richedit_pre(htmlspecialchars_decode($selection)); ?>
56281 <?php if ($url) { echo '<p>'; if($selection) _e('via '); echo "<a href='$url'>$title</a>."; echo '</p>'; } ?>
56282 </textarea>
56283 </div>
56284 </div>
56285 </div>
56286 </div>
56287 </form>
56288 </body>
56289 </html>