<?xml version="1.0" encoding="UTF-8"?><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>Comments on: Latest Post from each Category plugin for WordPress</title>
	<atom:link href="http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/</link>
	<description>WordPress Plugins, PHP Scripts, Tools, and Tutorials</description>
	<pubDate>Sat, 26 Jul 2008 23:49:19 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: hello</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-409477</link>
		<dc:creator>hello</dc:creator>
		<pubDate>Tue, 22 Jul 2008 01:57:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-409477</guid>
		<description>Hi, I like to find out is it possible to display the script not within the template file. Instead, I like it to display in another directory, and not within my blog directory. Pls advice</description>
		<content:encoded><![CDATA[<p>Hi, I like to find out is it possible to display the script not within the template file. Instead, I like it to display in another directory, and not within my blog directory. Pls advice</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: boatwehousep</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-403784</link>
		<dc:creator>boatwehousep</dc:creator>
		<pubDate>Fri, 18 Jul 2008 08:11:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-403784</guid>
		<description>cube this black site apple</description>
		<content:encoded><![CDATA[<p>cube this black site apple</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: exinco</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-377871</link>
		<dc:creator>exinco</dc:creator>
		<pubDate>Tue, 01 Jul 2008 02:20:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-377871</guid>
		<description>[Quote]
2) In a template file, insert the following code:[/Quote]

What do you mean by 'template file'? is it folder, .txt, .php, indext.php, single.php and so on.</description>
		<content:encoded><![CDATA[<p>[Quote]<br />
2) In a template file, insert the following code:[/Quote]</p>
<p>What do you mean by &#8216;template file&#8217;? is it folder, .txt, .php, indext.php, single.php and so on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: speedman</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-361768</link>
		<dc:creator>speedman</dc:creator>
		<pubDate>Sun, 22 Jun 2008 04:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-361768</guid>
		<description>tree frog sun tom boy white free yahoo clean speed green this elephant</description>
		<content:encoded><![CDATA[<p>tree frog sun tom boy white free yahoo clean speed green this elephant</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shop Network</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-351246</link>
		<dc:creator>Shop Network</dc:creator>
		<pubDate>Sun, 15 Jun 2008 17:55:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-351246</guid>
		<description>How would one go about including the first one or two posts from each particular category in the site's RSS feed?</description>
		<content:encoded><![CDATA[<p>How would one go about including the first one or two posts from each particular category in the site&#8217;s RSS feed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abel</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-339308</link>
		<dc:creator>Abel</dc:creator>
		<pubDate>Fri, 06 Jun 2008 18:53:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-339308</guid>
		<description>Hi Admin,

This plugin is exactly what my client needs. :)

I'm trying to exclude a category using the tip of Jesse last 8-16-06 (code below) but it doesn't seem to work anymore for Wordpress 2.5 . 

I'd appreciate any help. Thanks!


&lt;code&gt;
-In the script, find this line:
  AND post_status = 'publish' 
-Right above it, add this line:
  AND {$table_prefix}categories.cat_ID  3
  (Where 3 is the category ID) 
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi Admin,</p>
<p>This plugin is exactly what my client needs. <img src='http://www.dagondesign.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m trying to exclude a category using the tip of Jesse last 8-16-06 (code below) but it doesn&#8217;t seem to work anymore for Wordpress 2.5 . </p>
<p>I&#8217;d appreciate any help. Thanks!</p>
<p><pre><code>
-In the script, find this line:
  AND post_status = 'publish' 
-Right above it, add this line:
  AND {$table_prefix}categories.cat_ID  3
  (Where 3 is the category ID) 
</code></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Clegg</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-331370</link>
		<dc:creator>Matt Clegg</dc:creator>
		<pubDate>Sun, 01 Jun 2008 20:42:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-331370</guid>
		<description>Hi,

I have:

added an option to remove category from output
remove duplicate posts
fixed invalid html tags
optimsed html / php /sql for speed

If you want to download my updated version of the code (1.7mattc) goto: http://mattclegg.com/blog/wordpress/latest-post-from-each-category-plugin-17-mattc

mattc</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have:</p>
<p>added an option to remove category from output<br />
remove duplicate posts<br />
fixed invalid html tags<br />
optimsed html / php /sql for speed</p>
<p>If you want to download my updated version of the code (1.7mattc) goto: <a href="http://mattclegg.com/blog/wordpress/latest-post-from-each-category-plugin-17-mattc" rel="nofollow">http://mattclegg.com/blog/wordpress/latest-post-from-each-category-plugin-17-mattc</a></p>
<p>mattc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toma</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-322115</link>
		<dc:creator>toma</dc:creator>
		<pubDate>Mon, 26 May 2008 14:50:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-322115</guid>
		<description>sorry to post twice in a row, but here's a fix for anyone not scared to modify the code. just search for any instance of:
&lt;code&gt;AND post_date &lt; NOW()&lt;/code&gt;
and replace it with
&lt;code&gt;AND post_date &lt; ( NOW() + 86400 )&lt;/code&gt;
this lets the script look ahead in the future up to a day from now, which would compensate for any time differences and let you post from your own time zone without issue.</description>
		<content:encoded><![CDATA[<p>sorry to post twice in a row, but here&#8217;s a fix for anyone not scared to modify the code. just search for any instance of:<br />
<code>AND post_date &lt; NOW()</code><br />
and replace it with<br />
<code>AND post_date &lt; ( NOW() + 86400 )</code><br />
this lets the script look ahead in the future up to a day from now, which would compensate for any time differences and let you post from your own time zone without issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toma</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-322109</link>
		<dc:creator>toma</dc:creator>
		<pubDate>Mon, 26 May 2008 14:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-322109</guid>
		<description>I'm also having the problem with a delay between posting and this script picking it up. I think I've found out what the problem is however and I have a workaround. I live on the east coast, but my site is hosted on a server on the west coast. If I set the timezone to UTC -8 then the posts show up immediately. I think the script must compare the current time on the server to see what is new, but it can't see posts from a few hours ahead of the server's current time so it ignores them. If this was changed somehow so that it recognized posts that were posted after the current time then no one would have this issue.</description>
		<content:encoded><![CDATA[<p>I&#8217;m also having the problem with a delay between posting and this script picking it up. I think I&#8217;ve found out what the problem is however and I have a workaround. I live on the east coast, but my site is hosted on a server on the west coast. If I set the timezone to UTC -8 then the posts show up immediately. I think the script must compare the current time on the server to see what is new, but it can&#8217;t see posts from a few hours ahead of the server&#8217;s current time so it ignores them. If this was changed somehow so that it recognized posts that were posted after the current time then no one would have this issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ALPESH DAJI</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-264659</link>
		<dc:creator>ALPESH DAJI</dc:creator>
		<pubDate>Mon, 21 Apr 2008 06:40:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-264659</guid>
		<description>Can u tell me how do i configure your script so that it will look like the same shown in www.revenews.com

Please check and let me know 

Thank You in Advance</description>
		<content:encoded><![CDATA[<p>Can u tell me how do i configure your script so that it will look like the same shown in <a href="http://www.revenews.com" rel="nofollow">http://www.revenews.com</a></p>
<p>Please check and let me know </p>
<p>Thank You in Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: huzeyd</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-216174</link>
		<dc:creator>huzeyd</dc:creator>
		<pubDate>Sat, 22 Mar 2008 15:57:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-216174</guid>
		<description>Hi, thanks for plugin but i have a problem, i want show more posts from all category but this plugin shows a posts from every category how can i do it or if it is possible can you write a mini code for it, please. Thanks...</description>
		<content:encoded><![CDATA[<p>Hi, thanks for plugin but i have a problem, i want show more posts from all category but this plugin shows a posts from every category how can i do it or if it is possible can you write a mini code for it, please. Thanks&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mortia</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-210529</link>
		<dc:creator>mortia</dc:creator>
		<pubDate>Sun, 16 Mar 2008 09:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-210529</guid>
		<description>(Reposting because it seems I didn't need to html-quote everything, please delete the preceding comment.  Thanks.)

This simple patch adds a new option, that switches off the â€˜per categoryâ€™ part and just shows all recent posts, using the same formatting etc. I know that kind of subverts the purpose of the plugin, but it was what I needed to do. ;-)

&lt;code&gt;
Index: dd-lastest-from-each.php
===================================================================
--- dd-lastest-from-each.php	(revision 532)
+++ dd-lastest-from-each.php	(working copy)
@@ -19,6 +19,7 @@
 add_option('ddle_date_format', 'F jS, Y');
 add_option('ddle_excerpts', FALSE);
 add_option('ddle_chars', 200);
+add_option('ddle_all_posts', FALSE);
 add_option('ddle_comment_link', FALSE);
 add_option('ddle_comment_num', FALSE);
 add_option('ddle_comments_none', FALSE);
@@ -49,6 +50,7 @@
 		update_option('ddle_date_format', 'F jS, Y');
 		update_option('ddle_excerpts', FALSE);
 		update_option('ddle_chars', 200);
+		update_option('ddle_all_posts', FALSE);
 		update_option('ddle_comment_link', FALSE);
 		update_option('ddle_comment_num', FALSE);
 		update_option('ddle_comments_none', FALSE);
@@ -67,6 +69,7 @@
 		update_option('ddle_date_format', (string) $_POST["ddle_date_format"]);
 		update_option('ddle_excerpts', (bool) $_POST["ddle_excerpts"]);
 		update_option('ddle_chars', (string) $_POST["ddle_chars"]);
+		update_option('ddle_all_posts', (bool) $_POST["ddle_all_posts"]);
 		update_option('ddle_comment_link', (bool) $_POST["ddle_comment_link"]);
 		update_option('ddle_comment_num', (bool) $_POST["ddle_comment_num"]);
 		update_option('ddle_comments_none', (bool) $_POST["ddle_comments_none"]);
@@ -178,6 +181,13 @@
 		(0 = unlimited)
 	&lt;/td&gt;&lt;/tr&gt;
 
+	&lt;tr valign="top"&gt;&lt;td width="35%" align="right"&gt;
+              Include all posts
+	&lt;/td&gt;&lt;td align="left"&gt;
+		&lt;input type="checkbox" name="ddle_all_posts" value="checkbox" &lt;?php if (get_option('ddle_all_posts')) echo "checked='checked'"; ?&gt;/&gt;
+              &lt;br/&gt;(This option disables the 'from each category' part of the plugin.)
+	&lt;/td&gt;&lt;/tr&gt;
+
 	
 	&lt;/table&gt;
 	&lt;/fieldset&gt;
@@ -213,8 +223,8 @@
 	$ddle_comment_num = (bool)get_option('ddle_comment_num');
 	$ddle_comments_none = (bool)get_option('ddle_comments_none');
 	$ddle_limit = (int)get_option('ddle_limit');
+        $ddle_all_posts = (bool)get_option('ddle_all_posts');
 
-
 	$hide_check = '';
 	if ($ddle_hide_protected) {
 		$hide_check = " AND post_password = '' ";
@@ -292,11 +302,15 @@
 		}
 
 
+        if (!$ddle_all_posts) {
 
-	$used_cats = array();;
-	$i = 0;
-	foreach ($last_posts as $posts) {
+            /* scan through and remove all but the first post from each
+               category, unless we're including all posts. */
 
+            $used_cats = array();;
+            $i = 0;
+            foreach ($last_posts as $posts) {
+
 		if (in_array($posts-&gt;cat_name, $used_cats)) {
 			unset($last_posts[$i]);
 		} else {
@@ -304,7 +318,8 @@
 		}
 
 		$i++;
-	}
+            }
+        }
 	$last_posts = array_values($last_posts);
 
 
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>(Reposting because it seems I didn&#8217;t need to html-quote everything, please delete the preceding comment.  Thanks.)</p>
<p>This simple patch adds a new option, that switches off the â€˜per categoryâ€™ part and just shows all recent posts, using the same formatting etc. I know that kind of subverts the purpose of the plugin, but it was what I needed to do. <img src='http://www.dagondesign.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><pre><code>
Index: dd-lastest-from-each.php
===================================================================
--- dd-lastest-from-each.php	(revision 532)
+++ dd-lastest-from-each.php	(working copy)
@@ -19,6 +19,7 @@
 add_option('ddle_date_format', 'F jS, Y');
 add_option('ddle_excerpts', FALSE);
 add_option('ddle_chars', 200);
+add_option('ddle_all_posts', FALSE);
 add_option('ddle_comment_link', FALSE);
 add_option('ddle_comment_num', FALSE);
 add_option('ddle_comments_none', FALSE);
@@ -49,6 +50,7 @@
 		update_option('ddle_date_format', 'F jS, Y');
 		update_option('ddle_excerpts', FALSE);
 		update_option('ddle_chars', 200);
+		update_option('ddle_all_posts', FALSE);
 		update_option('ddle_comment_link', FALSE);
 		update_option('ddle_comment_num', FALSE);
 		update_option('ddle_comments_none', FALSE);
@@ -67,6 +69,7 @@
 		update_option('ddle_date_format', (string) $_POST["ddle_date_format"]);
 		update_option('ddle_excerpts', (bool) $_POST["ddle_excerpts"]);
 		update_option('ddle_chars', (string) $_POST["ddle_chars"]);
+		update_option('ddle_all_posts', (bool) $_POST["ddle_all_posts"]);
 		update_option('ddle_comment_link', (bool) $_POST["ddle_comment_link"]);
 		update_option('ddle_comment_num', (bool) $_POST["ddle_comment_num"]);
 		update_option('ddle_comments_none', (bool) $_POST["ddle_comments_none"]);
@@ -178,6 +181,13 @@
 		(0 = unlimited)
 	&lt;/td&gt;&lt;/tr&gt;
 
+	&lt;tr valign="top"&gt;&lt;td width="35%" align="right"&gt;
+              Include all posts
+	&lt;/td&gt;&lt;td align="left"&gt;
+		&lt;input type="checkbox" name="ddle_all_posts" value="checkbox" &lt;?php if (get_option('ddle_all_posts')) echo "checked='checked'"; ?&gt;/&gt;
+              &lt;br/&gt;(This option disables the 'from each category' part of the plugin.)
+	&lt;/td&gt;&lt;/tr&gt;
+
 	
 	&lt;/table&gt;
 	&lt;/fieldset&gt;
@@ -213,8 +223,8 @@
 	$ddle_comment_num = (bool)get_option('ddle_comment_num');
 	$ddle_comments_none = (bool)get_option('ddle_comments_none');
 	$ddle_limit = (int)get_option('ddle_limit');
+        $ddle_all_posts = (bool)get_option('ddle_all_posts');
 
-
 	$hide_check = '';
 	if ($ddle_hide_protected) {
 		$hide_check = " AND post_password = '' ";
@@ -292,11 +302,15 @@
 		}
 
 
+        if (!$ddle_all_posts) {
 
-	$used_cats = array();;
-	$i = 0;
-	foreach ($last_posts as $posts) {
+            /* scan through and remove all but the first post from each
+               category, unless we're including all posts. */
 
+            $used_cats = array();;
+            $i = 0;
+            foreach ($last_posts as $posts) {
+
 		if (in_array($posts-&gt;cat_name, $used_cats)) {
 			unset($last_posts[$i]);
 		} else {
@@ -304,7 +318,8 @@
 		}
 
 		$i++;
-	}
+            }
+        }
 	$last_posts = array_values($last_posts);
 
 
</code></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mortia</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-210527</link>
		<dc:creator>mortia</dc:creator>
		<pubDate>Sun, 16 Mar 2008 09:47:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-210527</guid>
		<description>This simple patch adds a new option, that switches off the 'per category' part and just shows all recent posts, using the same formatting etc.  I know that kind of subverts the purpose of the plugin, but it was what I needed to do. ;-)

&lt;code&gt;
Index: dd-lastest-from-each.php
===================================================================
--- dd-lastest-from-each.php	(revision 532)
+++ dd-lastest-from-each.php	(working copy)
@@ -19,6 +19,7 @@
 add_option('ddle_date_format', 'F jS, Y');
 add_option('ddle_excerpts', FALSE);
 add_option('ddle_chars', 200);
+add_option('ddle_all_posts', FALSE);
 add_option('ddle_comment_link', FALSE);
 add_option('ddle_comment_num', FALSE);
 add_option('ddle_comments_none', FALSE);
@@ -49,6 +50,7 @@
 		update_option('ddle_date_format', 'F jS, Y');
 		update_option('ddle_excerpts', FALSE);
 		update_option('ddle_chars', 200);
+		update_option('ddle_all_posts', FALSE);
 		update_option('ddle_comment_link', FALSE);
 		update_option('ddle_comment_num', FALSE);
 		update_option('ddle_comments_none', FALSE);
@@ -67,6 +69,7 @@
 		update_option('ddle_date_format', (string) $_POST["ddle_date_format"]);
 		update_option('ddle_excerpts', (bool) $_POST["ddle_excerpts"]);
 		update_option('ddle_chars', (string) $_POST["ddle_chars"]);
+		update_option('ddle_all_posts', (bool) $_POST["ddle_all_posts"]);
 		update_option('ddle_comment_link', (bool) $_POST["ddle_comment_link"]);
 		update_option('ddle_comment_num', (bool) $_POST["ddle_comment_num"]);
 		update_option('ddle_comments_none', (bool) $_POST["ddle_comments_none"]);
@@ -178,6 +181,13 @@
 		(0 = unlimited)
 	&#60;/td&#62;&#60;/tr&#62;
 
+	&#60;tr valign="top"&#62;&#60;td width="35%" align="right"&#62;
+              Include all posts
+	&#60;/td&#62;&#60;td align="left"&#62;
+		&#60;input type="checkbox" name="ddle_all_posts" value="checkbox" &#60;?php if (get_option('ddle_all_posts')) echo "checked='checked'"; ?&#62;/&#62;
+              &#60;br/&#62;(This option disables the 'from each category' part of the plugin.)
+	&#60;/td&#62;&#60;/tr&#62;
+
 	
 	&#60;/table&#62;
 	&#60;/fieldset&#62;
@@ -213,8 +223,8 @@
 	$ddle_comment_num = (bool)get_option('ddle_comment_num');
 	$ddle_comments_none = (bool)get_option('ddle_comments_none');
 	$ddle_limit = (int)get_option('ddle_limit');
+        $ddle_all_posts = (bool)get_option('ddle_all_posts');
 
-
 	$hide_check = '';
 	if ($ddle_hide_protected) {
 		$hide_check = " AND post_password = '' ";
@@ -292,11 +302,15 @@
 		}
 
 
+        if (!$ddle_all_posts) {
 
-	$used_cats = array();;
-	$i = 0;
-	foreach ($last_posts as $posts) {
+            /* scan through and remove all but the first post from each
+               category, unless we're including all posts. */
 
+            $used_cats = array();;
+            $i = 0;
+            foreach ($last_posts as $posts) {
+
 		if (in_array($posts-&#62;cat_name, $used_cats)) {
 			unset($last_posts[$i]);
 		} else {
@@ -304,7 +318,8 @@
 		}
 
 		$i++;
-	}
+            }
+        }
 	$last_posts = array_values($last_posts);
 

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This simple patch adds a new option, that switches off the &#8216;per category&#8217; part and just shows all recent posts, using the same formatting etc.  I know that kind of subverts the purpose of the plugin, but it was what I needed to do. <img src='http://www.dagondesign.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><pre><code>
Index: dd-lastest-from-each.php
===================================================================
--- dd-lastest-from-each.php	(revision 532)
+++ dd-lastest-from-each.php	(working copy)
@@ -19,6 +19,7 @@
 add_option('ddle_date_format', 'F jS, Y');
 add_option('ddle_excerpts', FALSE);
 add_option('ddle_chars', 200);
+add_option('ddle_all_posts', FALSE);
 add_option('ddle_comment_link', FALSE);
 add_option('ddle_comment_num', FALSE);
 add_option('ddle_comments_none', FALSE);
@@ -49,6 +50,7 @@
 		update_option('ddle_date_format', 'F jS, Y');
 		update_option('ddle_excerpts', FALSE);
 		update_option('ddle_chars', 200);
+		update_option('ddle_all_posts', FALSE);
 		update_option('ddle_comment_link', FALSE);
 		update_option('ddle_comment_num', FALSE);
 		update_option('ddle_comments_none', FALSE);
@@ -67,6 +69,7 @@
 		update_option('ddle_date_format', (string) $_POST["ddle_date_format"]);
 		update_option('ddle_excerpts', (bool) $_POST["ddle_excerpts"]);
 		update_option('ddle_chars', (string) $_POST["ddle_chars"]);
+		update_option('ddle_all_posts', (bool) $_POST["ddle_all_posts"]);
 		update_option('ddle_comment_link', (bool) $_POST["ddle_comment_link"]);
 		update_option('ddle_comment_num', (bool) $_POST["ddle_comment_num"]);
 		update_option('ddle_comments_none', (bool) $_POST["ddle_comments_none"]);
@@ -178,6 +181,13 @@
 		(0 = unlimited)
 	&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
 
+	&amp;lt;tr valign="top"&amp;gt;&amp;lt;td width="35%" align="right"&amp;gt;
+              Include all posts
+	&amp;lt;/td&amp;gt;&amp;lt;td align="left"&amp;gt;
+		&amp;lt;input type="checkbox" name="ddle_all_posts" value="checkbox" &amp;lt;?php if (get_option('ddle_all_posts')) echo "checked='checked'"; ?&amp;gt;/&amp;gt;
+              &amp;lt;br/&amp;gt;(This option disables the 'from each category' part of the plugin.)
+	&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
+
 	
 	&amp;lt;/table&amp;gt;
 	&amp;lt;/fieldset&amp;gt;
@@ -213,8 +223,8 @@
 	$ddle_comment_num = (bool)get_option('ddle_comment_num');
 	$ddle_comments_none = (bool)get_option('ddle_comments_none');
 	$ddle_limit = (int)get_option('ddle_limit');
+        $ddle_all_posts = (bool)get_option('ddle_all_posts');
 
-
 	$hide_check = '';
 	if ($ddle_hide_protected) {
 		$hide_check = " AND post_password = '' ";
@@ -292,11 +302,15 @@
 		}
 
 
+        if (!$ddle_all_posts) {
 
-	$used_cats = array();;
-	$i = 0;
-	foreach ($last_posts as $posts) {
+            /* scan through and remove all but the first post from each
+               category, unless we're including all posts. */
 
+            $used_cats = array();;
+            $i = 0;
+            foreach ($last_posts as $posts) {
+
 		if (in_array($posts-&amp;gt;cat_name, $used_cats)) {
 			unset($last_posts[$i]);
 		} else {
@@ -304,7 +318,8 @@
 		}
 
 		$i++;
-	}
+            }
+        }
 	$last_posts = array_values($last_posts);
 

</code></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-198562</link>
		<dc:creator>M</dc:creator>
		<pubDate>Thu, 06 Mar 2008 06:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-198562</guid>
		<description>This is great thank you! I would also love to see images included in this, is there anyway we could do that?

Thanks</description>
		<content:encoded><![CDATA[<p>This is great thank you! I would also love to see images included in this, is there anyway we could do that?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rob</title>
		<link>http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-183347</link>
		<dc:creator>rob</dc:creator>
		<pubDate>Fri, 22 Feb 2008 02:15:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/latest-post-from-each-category-plugin-for-wordpress/#comment-183347</guid>
		<description>I don't understand why you didn't include the ability to limit the amount of posts shown, is there a way to do that?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand why you didn&#8217;t include the ability to limit the amount of posts shown, is there a way to do that?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
