<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>请输入一个名称！ &#187; 帖子：使用 WordPress 2.9 Embed  功能快速插入土豆视频</title>
		<link>http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/topic/142</link>
		<description>请输入一个名称！ &raquo; 帖子：使用 WordPress 2.9 Embed  功能快速插入土豆视频</description>
		<language>zh-CN</language>
		<pubDate>Sat, 31 Jul 2010 15:21:02 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[搜索]]></title>
			<description><![CDATA[在这些版面中搜索全部帖子。]]></description>
			<name>q</name>
			<link>http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/search.php</link>
		</textInput>
		<atom:link href="http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/rss/topic/142" rel="self" type="application/rss+xml" />

		<item>
						<title>使用 WordPress 2.9 Embed  功能快速插入土豆视频</title>
			<link>http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/topic/142#post-211</link>
			<pubDate>二, 19 Jan 2010 15:54:24 +0000</pubDate>
			<dc:creator>匿名</dc:creator>
			<guid isPermaLink="false">211@http://home.wpjam.com/wp-content/plugins/buddypress/bp-forums/bbpress/</guid>
			<description>&#60;p&#62;代码：&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function wp_embed_handler_tudou( $matches, $attr, $url, $rawattr ) {
	// If the user supplied a fixed width AND height, use it
	if ( !empty($rawattr[&#38;#39;width&#38;#39;]) &#38;amp;&#38;amp; !empty($rawattr[&#38;#39;height&#38;#39;]) ) {
		$width  = (int) $rawattr[&#38;#39;width&#38;#39;];
		$height = (int) $rawattr[&#38;#39;height&#38;#39;];
	} else {
		list( $width, $height ) = wp_expand_dimensions( 420, 363, $attr[&#38;#39;width&#38;#39;], $attr[&#38;#39;height&#38;#39;] );
	}

	return apply_filters( &#38;#39;embed_tudou&#38;#39;, &#38;#39;&#38;lt;object width=&#38;quot;&#38;#39; . esc_attr($width) . &#38;#39;&#38;quot; height=&#38;quot;&#38;#39; . esc_attr($height) . &#38;#39;&#38;quot;&#38;gt;&#38;lt;param name=&#38;quot;movie&#38;quot; value=&#38;quot;http://www.tudou.com/v/&#38;#39; . esc_attr($matches[1]) . &#38;#39;&#38;quot;&#38;gt;&#38;lt;/param&#38;gt;&#38;lt;param name=&#38;quot;allowFullScreen&#38;quot; value=&#38;quot;true&#38;quot;&#38;gt;&#38;lt;/param&#38;gt;&#38;lt;param name=&#38;quot;allowscriptaccess&#38;quot; value=&#38;quot;always&#38;quot;&#38;gt;&#38;lt;/param&#38;gt;&#38;lt;param name=&#38;quot;wmode&#38;quot; value=&#38;quot;opaque&#38;quot;&#38;gt;&#38;lt;/param&#38;gt;&#38;lt;embed src=&#38;quot;http://www.tudou.com/v/&#38;#39; . esc_attr($matches[1]) . &#38;#39;&#38;quot; type=&#38;quot;application/x-shockwave-flash&#38;quot; allowscriptaccess=&#38;quot;always&#38;quot; allowfullscreen=&#38;quot;true&#38;quot; wmode=&#38;quot;opaque&#38;quot; width=&#38;quot;&#38;#39; . esc_attr($width) . &#38;#39;&#38;quot; height=&#38;quot;&#38;#39; . esc_attr($height) . &#38;#39;&#38;quot;&#38;gt;&#38;lt;/embed&#38;gt;&#38;lt;/object&#38;gt;&#38;#39;, $matches, $attr, $url, $rawattr );

}

wp_embed_register_handler( &#38;#39;tudou&#38;#39;, &#38;#39;#http://www.tudou.com/programs/view/(.*?)/#i&#38;#39;, &#38;#39;wp_embed_handler_tudou&#38;#39; );&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;使用方法：&#60;/p&#62;
&#60;p&#62;在写日志的时候直接输入土豆视频的地址：&#60;/p&#62;
&#60;p&#62;如：&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://www.tudou.com/programs/view/XXXXXXX/&#34; rel=&#34;nofollow&#34;&#62;http://www.tudou.com/programs/view/XXXXXXX/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;或者&#60;/p&#62;
&#60;p&#62;[embed]http://www.tudou.com/programs/view/XXXXXXX/[/embed]&#60;/p&#62;
&#60;p&#62;其中 XXXXXXX 是视频的 ID
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
