<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code Library &#187; Live Writer</title>
	<atom:link href="http://www.ucosoft.com/tag/live-writer/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ucosoft.com</link>
	<description>Free Source Code and Program Tips</description>
	<lastBuildDate>Mon, 19 Jul 2010 04:51:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Image Upload in WordPress via Live Writer</title>
		<link>http://www.ucosoft.com/image-upload-in-wordpress-via-live-writer.html</link>
		<comments>http://www.ucosoft.com/image-upload-in-wordpress-via-live-writer.html#comments</comments>
		<pubDate>Fri, 13 Apr 2007 14:50:31 +0000</pubDate>
		<dc:creator>support</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Live Writer]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.ucosoft.com/archives/78.html</guid>
		<description><![CDATA[WordPress has been updated to version 2.1.2, and many friends found that they can&#8217;t upload images via Windows Live Writer if with PHP 5.2. When publishing a post with a image in it, you will receive an error: &#8220;Image Upload Not Surpport by Weblog&#8221;. And in the wp-content/upload folder, the images exist there but the]]></description>
			<content:encoded><![CDATA[<p>WordPress has been updated to version 2.1.2, and many friends found that they can&#8217;t upload images via Windows Live Writer if with PHP 5.2. When publishing a post with a image in it, you will receive an error: &#8220;Image Upload Not Surpport by Weblog&#8221;. And in the wp-content/upload folder, the images exist there but the file names is wrong.</p>
<p>But when it was&nbsp;WordPress version 2.0, it works well.</p>
<p>How do you&nbsp;get this to work? </p>
<p>The first solution is to degrade the PHP version to 4.2.x. If you host your webserivice on Dreamhost, it&#8217;s a good solution. </p>
<p>But sometime you can&#8217;t change your PHP version, and now, <strong>rockyzh</strong> post a solution <a href="http://blog.kingtch.com/2007/02/01/55/upload-image-with-windows-live-writer-2.html">here</a>: </p>
<p>Modify from line 138 of wp-includes/class-IXR.php as below:<br />
<coolcode lang="php" linenum="no"><br />
function parse() {<br />
        // first remove the XML declaration<br />
       $rx = &#8216;/<?xml.*encoding=[\'"](.*?)[\'"].*?>/m&#8217;;<br />
       if (preg_match($rx, $this->message, $m)) {<br />
               $encoding = strtoupper($m[1]);<br />
       } else {<br />
               $encoding = &#8220;UTF-8&#8243;;<br />
       }<br />
//        $this->message = preg_replace(&#8216;/<\?xml(.*)?\?'.'>/&#8217;, &#8220;, $this->message);<br />
//        if (trim($this->message) == â€) {<br />
//            return false;<br />
//        }<br />
        $this->_parser = xml_parser_create($encoding);<br />
</coolcode></p>
<p>I have not tested the solution, some one&nbsp;reports&nbsp;it working but some others said no.</p>

	Tags: <strong><a href="http://www.ucosoft.com/tag/live-writer" title="Live Writer" rel="tag">Live Writer</a>, <a href="http://www.ucosoft.com/tag/php" title="PHP" rel="tag">PHP</a>, <a href="http://www.ucosoft.com/tag/wordpress" title="WordPress" rel="tag">WordPress</a></strong><br />

	<ul class="st-related-posts">
	<li><a href="http://www.ucosoft.com/change-the-default-editor-to-editormonkey.html" title="Change the default editor to EditorMonkey (November 21, 2006)">Change the default editor to EditorMonkey</a> (0)</li>
	<li><a href="http://www.ucosoft.com/speed-up-loading-of-pages.html" title="Speed up loading of pages (November 21, 2006)">Speed up loading of pages</a> (1)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.ucosoft.com/image-upload-in-wordpress-via-live-writer.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
