<?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>Wordpressbloggen</title>
	<atom:link href="http://wordpressbloggen.se/feed/" rel="self" type="application/rss+xml" />
	<link>http://wordpressbloggen.se</link>
	<description>En sprillans ny installation av Wordpress!</description>
	<lastBuildDate>Wed, 27 Jan 2010 14:18:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixa flerdomänsstöd</title>
		<link>http://wordpressbloggen.se/kodtips/fixa-flerdomansstod/</link>
		<comments>http://wordpressbloggen.se/kodtips/fixa-flerdomansstod/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 14:08:31 +0000</pubDate>
		<dc:creator>Karl Wångstedt</dc:creator>
				<category><![CDATA[Kodtips]]></category>

		<guid isPermaLink="false">http://wordpressbloggen.se/?p=53</guid>
		<description><![CDATA[<h2><a href="http://wordpressbloggen.se/kodtips/fixa-flerdomansstod/">Ordna stöd för flera domäner i samma installation av Wordpress</a></h2>
<h4>I standardutförandet har Wordpress inte stöd för annat än en domän. Även WPµ har bara stöd för en domän. Det här gör livet lite roddigt om man har massor med domäner med separata WP-installationer. Speciellt vid uppgraderingar.</h4>
]]></description>
			<content:encoded><![CDATA[<h2>Ordna stöd för flera domäner i samma installation av Wordpress</h2>
<h4>I standardutförandet har Wordpress inte stöd för annat än en domän. Även WPµ har bara stöd för en domän. Det här gör livet lite roddigt om man har massor med domäner med separata WP-installationer. Speciellt vid uppgraderingar.</h4>
<p>Ett sätt som är ganska enkelt för att lägga till stöd för flera domäner i samma installation är att sätta upp WP att hantera olika databastabeller beroende på vilken domän man surfar till.</p>
<p>Nackdelen med den här metoden är att man inte kan använda installationen som en platshållare. Alla domäner man surfar in på sajten med kräver en egen installation i databasen. I mitt exempel används ett prefix till tabellerna som är unikt för varje domän, men man kan förmodligen göra på samma sätt för att länka till separata databaser istället.</p>
<p>I <code>wp-config.php</code> byter man ut</p>

<div class="wp_codebox"><table><tr id="p533"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p53code3"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$table_prefix</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'wp_'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>mot den här kodsnutten istället:</p>

<div class="wp_codebox"><table><tr id="p534"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p53code4"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$table_prefix</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'^(www\.)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$table_prefix</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'\.'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$table_prefix</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$table_prefix</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/preg_replace"><span style="color: #990000;">preg_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'\-'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$table_prefix</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$table_prefix</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$table_prefix</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'_'</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Här kommer WP läsa av domänen som man surfar till, ta bort eventuellt <code>www</code> i början av domännamnet, radera alla punkter och bindestreck och lägga ett »_« sist. Tabellerna kommer då att heta något liknande <code>wordpressbloggense_posts</code> istället för <code>wp_posts</code>.</p>
<p>På det viset kan man få en och samma installation på servern av Wordpress att hantera flera domäner. Det här gör i och för sig att alla teman och plugins blir tillgängliga för samtliga domäner. Men det underlättar rejält att ha enbart en installation att underhålla och uppgradera.</p>
<p>Originalidé från <a href="http://www.domainsmalltalk.com/2008/09/21/wordpress-multidomain-faehig/">Richard Martin</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://wordpressbloggen.se/kodtips/fixa-flerdomansstod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enclosures utan länk i artikeln</title>
		<link>http://wordpressbloggen.se/kodtips/enclosures-utan-lank-i-artikeln/</link>
		<comments>http://wordpressbloggen.se/kodtips/enclosures-utan-lank-i-artikeln/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 16:13:43 +0000</pubDate>
		<dc:creator>Karl Wångstedt</dc:creator>
				<category><![CDATA[Kodtips]]></category>

		<guid isPermaLink="false">http://wordpressbloggen.se/?p=43</guid>
		<description><![CDATA[<h2><a href="http://wordpressbloggen.se/kodtips/enclosures-utan-lank-i-artikeln/">Hindra att Wordpress raderar podcast-enclosures som inte är länkade</a></h2>
<h4>En fin funktion för podcastpublicister är att Wordpress automatiskt lägger till länkade video- och ljudfiler som enclosures i RSS:en. Men i och med version 2.8 måste filmen eller ljudfilen vara länkad i artikeltexten. Om inte så raderas länken i RSS:en också.</h4>
]]></description>
			<content:encoded><![CDATA[<h2>Hindra att Wordpress raderar podcast-enclosures som inte är länkade</h2>
<h4>En fin funktion för podcastpublicister är att Wordpress automatiskt lägger till länkade video- och ljudfiler som enclosures i RSS:en. Men i och med version 2.8 måste filmen eller ljudfilen vara länkad i artikeltexten. Om inte så raderas länken i RSS:en också.</h4>
<p>Det här är ett beteende som inte alltid är önskvärt. Om man inte vill ha en länk till själva mediafilen i artikeln, utan bara vill att den ska refereras via RSS i Itunes eller liknande mediaspelare så går inte det.</p>
<p>Om man inte ersätter de interna filtren i Wordpress vill säga.</p>
<p>I /wp-includes/functions.php finns funktionen för att radera icke länkade mediafiler från RSS:en. Funktionen heter do_enclose() och behöver skrivas om en aning. I /wp-includes/comment.php finns referensen till filtret i funktionen do_all_pings() som då behöver tas bort och ersättas med en ny.</p>
<p>Så i temats function.php behöver vi lägga till en ny version av det första filtret där den delen som kollar om mediafilen är länkad är bortkommenterad.</p>

<div class="wp_codebox"><table><tr id="p438"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</pre></td><td class="code" id="p43code8"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> KEW_do_enclose<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$content</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post_ID</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">include_once</span><span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> WPINC <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/class-IXR.php'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$log</span> <span style="color: #339933;">=</span> debug_fopen<span style="color: #009900;">&#40;</span> ABSPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'enclosures.log'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'a'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$post_links</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	debug_fwrite<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$log</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'BEGIN '</span> <span style="color: #339933;">.</span> <a href="http://www.php.net/date"><span style="color: #990000;">date</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'YmdHis'</span><span style="color: #339933;">,</span> <a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$pung</span> <span style="color: #339933;">=</span> get_enclosed<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$post_ID</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$ltrs</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'\w'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$gunk</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/#~:.?+=&amp;amp;%@!\-'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$punc</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'.:?\-'</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$any</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ltrs</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$gunk</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$punc</span><span style="color: #339933;">;</span>
&nbsp;
	<a href="http://www.php.net/preg_match_all"><span style="color: #990000;">preg_match_all</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;{\b http : [<span style="color: #006699; font-weight: bold;">$any</span>] +? (?= [<span style="color: #006699; font-weight: bold;">$punc</span>] * [^<span style="color: #006699; font-weight: bold;">$any</span>] | $)}x&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post_links_temp</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	debug_fwrite<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$log</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'Post contents:'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	debug_fwrite<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$log</span><span style="color: #339933;">,</span> <span style="color: #000088;">$content</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/*
	foreach ( $pung as $link_test ) {
		if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post
			$wpdb-&amp;gt;query( $wpdb-&amp;gt;prepare(&quot;DELETE FROM $wpdb-&amp;gt;postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)&quot;, $post_ID, $link_test . '%') );
		}
	}
*/</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$post_links_temp</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$link_test</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$link_test</span><span style="color: #339933;">,</span> <span style="color: #000088;">$pung</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// If we haven't pung it already</span>
			<span style="color: #000088;">$test</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/parse_url"><span style="color: #990000;">parse_url</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$link_test</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'query'</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$post_links</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$link_test</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #000088;">$test</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'path'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span> <span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$post_links</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$link_test</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$post_links</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$url</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$url</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #339933;">!</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_var<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&quot;SELECT post_id FROM <span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta WHERE post_id = <span style="color: #009933; font-weight: bold;">%d</span> AND meta_key = 'enclosure' AND meta_value LIKE (<span style="color: #009933; font-weight: bold;">%s</span>)&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$post_ID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$url</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'%'</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$headers</span> <span style="color: #339933;">=</span> wp_get_http_headers<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$len</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$headers</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'content-length'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$headers</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'content-type'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$allowed_types</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'video'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'audio'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span> <a href="http://www.php.net/substr"><span style="color: #990000;">substr</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$type</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <a href="http://www.php.net/strpos"><span style="color: #990000;">strpos</span></a><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$type</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$allowed_types</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
					<span style="color: #000088;">$meta_value</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$url</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #006699; font-weight: bold;">$len</span><span style="color: #000099; font-weight: bold;">\n</span><span style="color: #006699; font-weight: bold;">$type</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
					<span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>insert<span style="color: #009900;">&#40;</span><span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>postmeta<span style="color: #339933;">,</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'post_id'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$post_ID</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'meta_key'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'enclosure'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'meta_value'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$meta_value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Efter det måste vi kopiera den refererande funktionen och ändra referensen till det nya filtret ovan.</p>

<div class="wp_codebox"><table><tr id="p439"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code" id="p43code9"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> KEW_do_all_pings<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Do pingbacks</span>
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ping</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_row<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;posts}, {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta} WHERE {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;posts}.ID = {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta}.post_id AND {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta}.meta_key = '_pingme' LIMIT 1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>query<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DELETE FROM {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta} WHERE post_id = {<span style="color: #006699; font-weight: bold;">$ping</span>-&amp;gt;ID} AND meta_key = '_pingme';&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		pingback<span style="color: #009900;">&#40;</span><span style="color: #000088;">$ping</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>post_content<span style="color: #339933;">,</span> <span style="color: #000088;">$ping</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Do Enclosures</span>
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$enclosure</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_row<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;posts}, {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta} WHERE {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;posts}.ID = {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta}.post_id AND {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta}.meta_key = '_encloseme' LIMIT 1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>query<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;DELETE FROM {<span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;postmeta} WHERE post_id = <span style="color: #009933; font-weight: bold;">%d</span> AND meta_key = '_encloseme';&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$enclosure</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		KEW_do_enclose<span style="color: #009900;">&#40;</span><span style="color: #000088;">$enclosure</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>post_content<span style="color: #339933;">,</span> <span style="color: #000088;">$enclosure</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">// Do Trackbacks</span>
	<span style="color: #000088;">$trackbacks</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$wpdb</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get_col<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT ID FROM <span style="color: #006699; font-weight: bold;">$wpdb</span>-&amp;gt;posts WHERE to_ping &amp;lt;&amp;gt; '' AND post_status = 'publish'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <a href="http://www.php.net/is_array"><span style="color: #990000;">is_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$trackbacks</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$trackbacks</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$trackback</span> <span style="color: #009900;">&#41;</span>
			do_trackbacks<span style="color: #009900;">&#40;</span><span style="color: #000088;">$trackback</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//Do Update Services/Generic Pings</span>
	generic_ping<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Slutligen måste vi ta bort originalfunktionen och ersätta med den nya:</p>

<div class="wp_codebox"><table><tr id="p4310"><td class="line_numbers"><pre>1
2
</pre></td><td class="code" id="p43code10"><pre class="php" style="font-family:monospace;">remove_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_pings'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'do_all_pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'do_pings'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'KEW_do_all_pings'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://wordpressbloggen.se/kodtips/enclosures-utan-lank-i-artikeln/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Klibbiga artiklar i puffar</title>
		<link>http://wordpressbloggen.se/kodtips/klibbiga-artiklar-i-puffar/</link>
		<comments>http://wordpressbloggen.se/kodtips/klibbiga-artiklar-i-puffar/#comments</comments>
		<pubDate>Tue, 26 May 2009 08:49:07 +0000</pubDate>
		<dc:creator>Karl Wångstedt</dc:creator>
				<category><![CDATA[Gränssnitt]]></category>
		<category><![CDATA[Kodtips]]></category>

		<guid isPermaLink="false">http://wordpressbloggen.se/?p=29</guid>
		<description><![CDATA[<h2><a href="http://wordpressbloggen.se/kodtips/klibbiga-artiklar-i-puffar/">Visa en klibbig artikel endast en gång</a></h2>
<h4>Har man sajt där man lägger flera olika puffar på startsidan är det viktigt att inte lägga puffar flera gånger. Speciellt om en artikel är satt som klibbig överst i loop:en.</h4>
]]></description>
			<content:encoded><![CDATA[<h2>Visa en klibbig artikel endast en gång</h2>
<h4>Har man sajt där man lägger flera olika puffar på startsidan är det viktigt att inte lägga puffar flera gånger. Speciellt om en artikel är satt som klibbig överst i loop:en.</h4>
<p>Man kan tänka sig en startsida med en puff till en huvudartikel stort överst, följd av några mindre puffar, följt av ytterligare mindre puffar. I det läget lägger man rent tekniskt tre loop:ar efter varandra. Men i och med det uppstår då problemet att behöva kolla av om huvudartikeln är satt som klibbig, och i så fall inte lista den bland de övriga puffarna.</p>
<p>Lösningen är ganska enkel. I alla loopar som följer på den första gör man, ungefär, så här:</p>

<div class="wp_codebox"><table><tr id="p2912"><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code" id="p29code12"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sticky</span><span style="color: #339933;">=</span>get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sticky_posts'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/in_array"><span style="color: #990000;">in_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">,</span><span style="color: #000088;">$sticky</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Hoppa över posten om den är sticky</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div class=&quot;note&quot;&gt;'</span><span style="color: #339933;">;</span>
the_excerpt<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;p&gt;&lt;a href=&quot;'</span><span style="color: #339933;">.</span>the_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot; class=&quot;readmore&quot;&gt;Visa hela artikeln »'</span><span style="color: #339933;">.</span>the_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'«...&lt;/a&gt;&lt;/p&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/div&gt;&lt;!-- /note --&gt;'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://wordpressbloggen.se/kodtips/klibbiga-artiklar-i-puffar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stäng av more-taggen</title>
		<link>http://wordpressbloggen.se/kodtips/stang-av-more-taggen/</link>
		<comments>http://wordpressbloggen.se/kodtips/stang-av-more-taggen/#comments</comments>
		<pubDate>Mon, 11 May 2009 05:43:09 +0000</pubDate>
		<dc:creator>Karl Wångstedt</dc:creator>
				<category><![CDATA[Kodtips]]></category>

		<guid isPermaLink="false">http://wordpressbloggen.se/?p=3</guid>
		<description><![CDATA[<h2><a href="http://wordpressbloggen.se/kodtips/stang-av-more-taggen/">Slå av och på more-taggen</a></h2>
<h4>För att kunna visa en hel artikel på startsidan, trots att man använt &#60;!&#8211;more&#8211;&#62; för att dela av var artikelns sammanfattning ska brytas med en »läs mer«-länk måste man instruera WP att ignorera den instruktionen.</h4>
]]></description>
			<content:encoded><![CDATA[<h2>Slå av och på more-taggen</h2>
<h4>För att kunna visa en hel artikel på startsidan, trots att man använt &lt;!&#8211;more&#8211;&gt; för att dela av var artikelns sammanfattning ska brytas med en »läs mer«-länk måste man instruera WP att ignorera den instruktionen.</h4>
<p>Själv råkade jag på att det behövdes när jag skulle publicera en komplett artikel på startsidan, men ändå kunna använda &lt;!&#8211;more&#8211;&gt; precis som vanligt. Lösningen är som följer</p>

<div class="wp_codebox"><table><tr id="p314"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p3code14"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span> have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Starta loopen</span>
	<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$more</span><span style="color: #339933;">;</span> <span style="color: #000088;">$more</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Definera den globala variabeln $more till sant</span>
	 	 the_content<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	 <span style="color: #000088;">$more</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">FALSE</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Återställ $more till normalläge i slutet på loopen</span>
<span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Avsluta loopen</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://wordpressbloggen.se/kodtips/stang-av-more-taggen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Är vi i rätt artikelgrupp</title>
		<link>http://wordpressbloggen.se/kodtips/ar-vi-i-ratt-artikelgrupp/</link>
		<comments>http://wordpressbloggen.se/kodtips/ar-vi-i-ratt-artikelgrupp/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 20:20:49 +0000</pubDate>
		<dc:creator>Karl Wångstedt</dc:creator>
				<category><![CDATA[Kodtips]]></category>

		<guid isPermaLink="false">http://wordpressbloggen.se/wordpress/?p=1</guid>
		<description><![CDATA[<h2><a href="http://wordpressbloggen.se/kodtips/ar-vi-i-ratt-artikelgrupp/">Kontrollera var den efterfrågade artikeln finns</a></h2>
<h4>Allt som oftast vill man kontrollera om den artikel som efterfrågas finns i en speciell artikelgrupp (category) eller undergrupp till densamma. För att göra det behöver man traversera metadata för artiklarna och göra en koll.</h4>
]]></description>
			<content:encoded><![CDATA[<h2>Kontrollera var den efterfrågade artikeln finns</h2>
<h4>Allt som oftast vill man kontrollera om den artikel som efterfrågas finns i en speciell artikelgrupp (category) eller undergrupp till densamma. För att göra det behöver man traversera metadata för artiklarna och göra en koll.</h4>
<p>I det första exemplet gör vi fråga inuti loopen, och vi kontrollerar artikelgruppen »Webbteve« som har sökvägen (slug) »webbteve«. Distinktionen här är viktig eftersom funktionerna som anropas är noga med om det är rubriken (title) eller sökvägen som man anger.</p>

<div class="wp_codebox"><table><tr id="p117"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p1code17"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$in_subcategory</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Nollställ kontrollvariabeln</span>
<span style="color: #000088;">$category_id</span> <span style="color: #339933;">=</span> get_cat_id<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Webbteve'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Hämta ID för artikelgruppen. Får _inte_ vara slug!</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#41;</span>get_term_children<span style="color: #009900;">&#40;</span><span style="color: #000088;">$category_id</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'category'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$child_category</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Loopa igenom metadata</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>in_category<span style="color: #009900;">&#40;</span><span style="color: #000088;">$child_category</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #000088;">$in_subcategory</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Hittar vi släktskap sätter vi SANT</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$in_subcategory</span> <span style="color: #339933;">||</span> in_category<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'webbteve'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Artikelgruppen slug _måste_ anges!</span>
	<span style="color: #666666; font-style: italic;">// Nu är vi i artikelgruppen eller en undergrupp</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Om man istället vill lägga kontrollen utanför loopen, och även ange ID för artikelgruppen istället för namnet så får man göra så här:</p>

<div class="wp_codebox"><table><tr id="p118"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p1code18"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$in_subcategory</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Nollställ kontrollvariabeln</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#41;</span>get_term_children<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'category'</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$child_category</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// ID för category är &quot;1&quot;</span>
	<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>in_category<span style="color: #009900;">&#40;</span><span style="color: #000088;">$child_category</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #000088;">$in_subcategory</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$getcats</span> <span style="color: #339933;">=</span> get_the_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Hämta efterfrågad category_ID som en array</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$in_subcategory</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$getcats</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">cat_ID</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Kolla om vi är i en undergrupp eller cat_ID &quot;1&quot;.</span>
	<span style="color: #666666; font-style: italic;">// Nu är vi i artikelgruppen eller en undergrupp</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://wordpressbloggen.se/kodtips/ar-vi-i-ratt-artikelgrupp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

