<?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>Lars Schenk &#187; PostTeaser</title>
	<atom:link href="http://lars-schenk.com/tag/postteaser/feed" rel="self" type="application/rss+xml" />
	<link>http://lars-schenk.com</link>
	<description>IT-Services :: Software-Development since 1980 :: Freelancer since 1988</description>
	<lastBuildDate>Thu, 10 Jun 2010 22:51:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress mit FeedWordPress und PostTeaser</title>
		<link>http://lars-schenk.com/wordpress-feedwordpress-postteaser/131</link>
		<comments>http://lars-schenk.com/wordpress-feedwordpress-postteaser/131#comments</comments>
		<pubDate>Tue, 24 Jul 2007 23:08:53 +0000</pubDate>
		<dc:creator>Lars Schenk</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[tech-recipes]]></category>
		<category><![CDATA[FeedWordPress]]></category>
		<category><![CDATA[PostTeaser]]></category>

		<guid isPermaLink="false">http://lars-schenk.com/131/131</guid>
		<description><![CDATA[Für ein WordPress basierte Projekt werden die Plugins PostTeaser und FeedWordPress eingesetzt. In dieser Kombination gibt es dabei Probleme: Die von FeedWordPress importierten Beiträge werden nicht vom PostTeaser verarbeitet, so dass sie in den Listendarstellung vollständig erscheinen anstatt angeteasert zu werden. Auch beim Editieren der via FeedWordPress importieren Beiträge gibt es Probleme: Die Absatzformatierungen gehen [...]]]></description>
			<content:encoded><![CDATA[<p>Für ein WordPress basierte Projekt werden die Plugins <a href="http://dev.wp-plugins.org/wiki/PostTeaser">PostTeaser</a> und <a href="http://projects.radgeek.com/feedwordpress">FeedWordPress</a> eingesetzt.</p>
<p>In dieser Kombination gibt es dabei Probleme: Die von FeedWordPress importierten Beiträge werden nicht vom PostTeaser verarbeitet, so dass sie in den Listendarstellung vollständig erscheinen anstatt angeteasert zu werden. Auch beim Editieren der via FeedWordPress importieren Beiträge gibt es Probleme: Die Absatzformatierungen gehen verloren. <span id="more-131"></span></p>
<p>Ich habe mir beide Plugins angeschaut und herausgefunden, dass das Problem durch das Content-Filter-Handling des FeedWordPress Plugins verursacht wird.</p>
<p>Der Autor dokumentiert sein Dilemma wie folgt:</p>
<blockquote><p>
Syndicated items are generally received in output-ready (X)HTML and<br />
should not be folded, crumpled, mutilated, or spindled by WordPress<br />
formatting filters. But we don't want to interfere with filters for<br />
any locally-authored posts, either.</p>
<p>What WordPress should really have is a way for upstream filters to<br />
stop downstream filters from running at all. Since it doesn't, and<br />
since a downstream filter can't access the original copy of the text<br />
that is being filtered, what we will do here is (1) save a copy of the<br />
original text upstream, before any other filters run, and then (2)<br />
retrieve that copy downstream, after all the other filters run, *if*<br />
this is a syndicated post.</p></blockquote>
<p>Bei meinem Anwendungsfall ist dieses Verhalten aber nicht gewünscht und nicht erforderlich. Damit also der Filter von PostTeaser greifen kann, muss das eigentlich gute Verhalten von FeedWordPress deaktiviert werden. Hierzu kommentiere ich die beiden Zeilen aus, die die entsprechenden Filter in FeedWordPress einklinken:</p>
<div class="igBar"><span id="lphp-2"><a href="#" onclick="javascript:showPlainTxt('php-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-2">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// add_filter('the_content', 'feedwordpress_preserve_syndicated_content', -10000);</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// add_filter('the_content', 'feedwordpress_restore_syndicated_content', 10000); </span></div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Surftipp: <a href="http://projects.radgeek.com/2007/02/23/feedwordpress-filter-poll/">http://projects.radgeek.com/2007/02/23/feedwordpress-filter-poll/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lars-schenk.com/wordpress-feedwordpress-postteaser/131/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
