<?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>Anmari &#187; Plugins</title>
	<atom:link href="http://webdesign.anmari.com/category/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://webdesign.anmari.com</link>
	<description>Simply effective web services</description>
	<lastBuildDate>Wed, 16 Nov 2011 05:01:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Changes for the plugins</title>
		<link>http://webdesign.anmari.com/2656/changes-are-happening-for-the-plugins/</link>
		<comments>http://webdesign.anmari.com/2656/changes-are-happening-for-the-plugins/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 14:02:13 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR Events]]></category>
		<category><![CDATA[AmR Ical Events List]]></category>
		<category><![CDATA[AmR User Templates]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2656</guid>
		<description><![CDATA[The plugins are moving amr-events plugin registration is now at icalevents.com amr-user-templates plugin registration is soon at wpusersplugin.com Your details have cloned and moved too  so you can access curremt and older versions here. New versions of the plugins will only be available at the new sites: Use the same usernames and passwords on all [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/plugins/' rel='bookmark' title='Plugins'>Plugins</a> <small>Many of my plugins are offered for free at wordpress.  Some plugins have additional functionality available to certain members of...</small></li>
<li><a href='http://webdesign.anmari.com/1783/another-hacked-story-did-2-9-appear-to-lose-your-plugins/' rel='bookmark' title='Another hacked story &#8211; did 2.9 appear to lose your plugins?'>Another hacked story &#8211; did 2.9 appear to lose your plugins?</a> <small>Don&#8217;t blame 2.9! A  site was hacked.  This was only detected because he had a funny admin screen so decided...</small></li>
<li><a href='http://webdesign.anmari.com/2078/amr-events-download/' rel='bookmark' title='amr-events download'>amr-events download</a> <small>Before you buy membership to access this plugin, please&#8230;&#8230; Test it!  test.icalevents.com.  The latest version is always there &#8211; it might...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h3>The plugins are moving</h3>
<ul>
<li><strong>amr-events</strong> plugin registration is now at <a title="wordpress events  and calendar plugin " href="http://icalevents.com">icalevents.com</a></li>
<li><strong>amr-user-templates</strong> plugin registration is soon at <a title="simplify wordpress backend for your users with this plugin " href="http://wpusersplugin.com">wpusersplugin.com</a></li>
</ul>
<h3></h3>
<h3>Your details have cloned and moved too</h3>
<ul>
<li> so you can access curremt and older versions here. New versions of the plugins will only be available at the new sites:</li>
<li>Use the same usernames and passwords on all sites.</li>
</ul>
<p>&nbsp;</p>
<h3>On;y forum or email subscription registrations here</h3>
<ul>
<li>Any problems, please log it at the support forum or <a href="http://webdesign.anmari.com/about/contact/">contact me asap</a>.</li>
</ul>
<p>&nbsp;</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/plugins/' rel='bookmark' title='Plugins'>Plugins</a> <small>Many of my plugins are offered for free at wordpress.  Some plugins have additional functionality available to certain members of...</small></li>
<li><a href='http://webdesign.anmari.com/1783/another-hacked-story-did-2-9-appear-to-lose-your-plugins/' rel='bookmark' title='Another hacked story &#8211; did 2.9 appear to lose your plugins?'>Another hacked story &#8211; did 2.9 appear to lose your plugins?</a> <small>Don&#8217;t blame 2.9! A  site was hacked.  This was only detected because he had a funny admin screen so decided...</small></li>
<li><a href='http://webdesign.anmari.com/2078/amr-events-download/' rel='bookmark' title='amr-events download'>amr-events download</a> <small>Before you buy membership to access this plugin, please&#8230;&#8230; Test it!  test.icalevents.com.  The latest version is always there &#8211; it might...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2656/changes-are-happening-for-the-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wordpress user reporting plugin has a new site</title>
		<link>http://webdesign.anmari.com/2478/wordpress-user-reporting-plugin-has-a-new-site/</link>
		<comments>http://webdesign.anmari.com/2478/wordpress-user-reporting-plugin-has-a-new-site/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 10:28:45 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR User Lists]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2478</guid>
		<description><![CDATA[The amr wordpress users plugin for flexible user reporting now has it&#8217;s own site: Related posts: User templates amr-user-templates simplified wordpress admin for your users, individually restoreable as they gain skills with wordpress works with multi-site Access to... User Lists The free amr-users plugin now has it&#8217;s own website at wpusersplugin.com Design your own users [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/plugins/user-templates-simple-admin-screens/' rel='bookmark' title='User templates'>User templates</a> <small>amr-user-templates simplified wordpress admin for your users, individually restoreable as they gain skills with wordpress works with multi-site Access to...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/users/' rel='bookmark' title='User Lists'>User Lists</a> <small>The free amr-users plugin now has it&#8217;s own website at wpusersplugin.com Design your own users lists or reports. Highly configurable...</small></li>
<li><a href='http://webdesign.anmari.com/2643/initial-content-for-a-new-page-or-post-wordpress-pleasant-surprise/' rel='bookmark' title='Initial content for a new page or post &#8211; wordpress pleasant surprise'>Initial content for a new page or post &#8211; wordpress pleasant surprise</a> <small>How to create a link to the add new page or post with default starting content...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The amr <a title="Wordpress user reporting plugin" href="http://wpusersplugin.com">wordpress users plugin</a> for flexible user reporting now has it&#8217;s own site:</p>
<div id="attachment_2479" class="wp-caption aligncenter" style="width: 310px"><a href="http://wpusersplugin.com/"><img class="size-medium wp-image-2479" title="wpusersplugin.com" src="http://webdesign.anmari.com/wp-content/uploads/wpusers-300x106.jpg" alt="Wordpress plugin for large user or membership sites - reporting" width="300" height="106" /></a><p class="wp-caption-text">wpusersplugin.com</p></div>
<p style="text-align: center;">
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/plugins/user-templates-simple-admin-screens/' rel='bookmark' title='User templates'>User templates</a> <small>amr-user-templates simplified wordpress admin for your users, individually restoreable as they gain skills with wordpress works with multi-site Access to...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/users/' rel='bookmark' title='User Lists'>User Lists</a> <small>The free amr-users plugin now has it&#8217;s own website at wpusersplugin.com Design your own users lists or reports. Highly configurable...</small></li>
<li><a href='http://webdesign.anmari.com/2643/initial-content-for-a-new-page-or-post-wordpress-pleasant-surprise/' rel='bookmark' title='Initial content for a new page or post &#8211; wordpress pleasant surprise'>Initial content for a new page or post &#8211; wordpress pleasant surprise</a> <small>How to create a link to the add new page or post with default starting content...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2478/wordpress-user-reporting-plugin-has-a-new-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>amr-events download</title>
		<link>http://webdesign.anmari.com/2078/amr-events-download/</link>
		<comments>http://webdesign.anmari.com/2078/amr-events-download/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 07:13:14 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR Events]]></category>
		<category><![CDATA[AmR Ical Events List]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2078</guid>
		<description><![CDATA[Before you buy membership to access this plugin, please&#8230;&#8230; Test it!  test.icalevents.com.  The latest version is always there &#8211; it might even be the next soon to be released version. See the event plugin&#8216;s own website for detailed documentation &#8211; try the sitemap Check out the forum to see the sorts of problems people have. If [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2008/amr-user-templates-download/' rel='bookmark' title='amr user templates download'>amr user templates download</a> <small>The User Template plugin which helps you simplify member admin screens is now available for download. Access to the plugin...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/ical-events-list/' rel='bookmark' title='Ical events list'>Ical events list</a> <small>The free version For further information on the plugin and the free version, please see Icalevents.anmari The paid version The...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/events-plugin/' rel='bookmark' title='Events Plugin'>Events Plugin</a> <small>The paid version The amr-events plugin is available here (my main site).  Please register or if already a member, please...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Before you buy membership to access this plugin, please&#8230;&#8230;</p>
<ul>
<li>Test it!  <a title="Wordpress Events Plugin Test Site" href="http://test.icalevents.com">test.icalevents.com</a>.  The latest version is always there &#8211; it might even be the next soon to be released version.</li>
<li>See the <a href="http://icalevents.com/">event plugin</a>&#8216;s own website for detailed <strong>documentation</strong> &#8211; try the sitemap</li>
<li>Check out the <a href="http://forum.anmari.com">forum</a> to see the sorts of problems people have. If all goes well, there should NOT be many posts.</li>
<li>See the rating for the <a href="http://wordpress.org/extend/plugins/amr-ical-events-list/">free version at wordpress</a>. The free plugin is required for listing functionality.</li>
<li>WPML users can test integration at <a title="wordpress ical events calendar with full translation and wpml integration" href="http://lang.anmari.com">lang.anmari.com</a></li>
</ul>
<h2>Download latest version 3.0.7 updated 25 Aug 2011 :</h2>
<div class="ym_private_no_access"><div class="ym_message"><div class="ym_message_liner">You need to be logged in to download the file or see the post</div></div></div>
<p>&nbsp;</p>
<p>Please subscribe to <a href="http://icalevents.com/feed/">icalevents.com rss updates</a> or <a title="See subscribe option in sidebar" href="http://icalevents.com/">email</a> or via <a href="https://twitter.com/icalevents">twitter</a>, so that you will be advised when there are updates.</p>
<h2>Please read <a title="Log of changes" href="http://icalevents.com/category/changelog/">change log</a> since your last version before upgrading.</h2>
<p>&nbsp;</p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2008/amr-user-templates-download/' rel='bookmark' title='amr user templates download'>amr user templates download</a> <small>The User Template plugin which helps you simplify member admin screens is now available for download. Access to the plugin...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/ical-events-list/' rel='bookmark' title='Ical events list'>Ical events list</a> <small>The free version For further information on the plugin and the free version, please see Icalevents.anmari The paid version The...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/events-plugin/' rel='bookmark' title='Events Plugin'>Events Plugin</a> <small>The paid version The amr-events plugin is available here (my main site).  Please register or if already a member, please...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2078/amr-events-download/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Gift photo calendar using Google ical files</title>
		<link>http://webdesign.anmari.com/404/gift-photo-calendar/</link>
		<comments>http://webdesign.anmari.com/404/gift-photo-calendar/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 00:29:27 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR Ical Events List]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[gifts]]></category>
		<category><![CDATA[ical]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=404</guid>
		<description><![CDATA[Use your ical feed calendars (google or other (others by importing into google)) and your own photo's to generate a A4 year calendar, with some simple restyling.
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/95/comparison-of-event-calendar-plug-ins/' rel='bookmark' title='Comparison of Event Calendar Plug-ins'>Comparison of Event Calendar Plug-ins</a> <small>We are thinking of converting the school&#8217;s website from typo3 to wordpress to make it easier for staff and parents...</small></li>
<li><a href='http://webdesign.anmari.com/770/search-engine-optimisation-with-google/' rel='bookmark' title='Search Engine Optimisation with Google'>Search Engine Optimisation with Google</a> <small>This checklist is  based on Google&#8217;s Search Engine Optimization Starter Guide. This is what they think is important.    One might...</small></li>
<li><a href='http://webdesign.anmari.com/336/timezones-wordpress-ical-php/' rel='bookmark' title='Timezones, WordPress, Ical, Php&#8230;.'>Timezones, WordPress, Ical, Php&#8230;.</a> <small>What a lot of fun this can be (not!) Your Ical file may have a timezone specified, the event may...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<h3>Looking for some personalised seasonal, christmas or new year gifts?</h3>
<div id="attachment_405" class="wp-caption aligncenter" style="width: 92px"><a href="http://webdesign.anmari.com/wp-content/uploads/2008/11/yearcalendarexample.png"><img class="size-medium wp-image-405 " title="year calendar example" src="http://webdesign.anmari.com/wp-content/uploads/2008/11/yearcalendarexample-82x300.png" alt="Photo year calendar example" width="82" height="300" /></a><p class="wp-caption-text">Photo year calendar example</p></div>
<p>Use your ical calendars (google or other (others by importing into google)) and your own photo&#8217;s to generate a A4 year calendar.  Print to PDF and send to your local print shop for bindin.  Viola! instant personal presents.</p>
<h1 style="text-align: center;"><a href="http://icalphoto.com">icalphoto.com</a></h1>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/95/comparison-of-event-calendar-plug-ins/' rel='bookmark' title='Comparison of Event Calendar Plug-ins'>Comparison of Event Calendar Plug-ins</a> <small>We are thinking of converting the school&#8217;s website from typo3 to wordpress to make it easier for staff and parents...</small></li>
<li><a href='http://webdesign.anmari.com/770/search-engine-optimisation-with-google/' rel='bookmark' title='Search Engine Optimisation with Google'>Search Engine Optimisation with Google</a> <small>This checklist is  based on Google&#8217;s Search Engine Optimization Starter Guide. This is what they think is important.    One might...</small></li>
<li><a href='http://webdesign.anmari.com/336/timezones-wordpress-ical-php/' rel='bookmark' title='Timezones, WordPress, Ical, Php&#8230;.'>Timezones, WordPress, Ical, Php&#8230;.</a> <small>What a lot of fun this can be (not!) Your Ical file may have a timezone specified, the event may...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/404/gift-photo-calendar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>amr user templates download</title>
		<link>http://webdesign.anmari.com/2008/amr-user-templates-download/</link>
		<comments>http://webdesign.anmari.com/2008/amr-user-templates-download/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 08:46:05 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR User Templates]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2008</guid>
		<description><![CDATA[The User Template plugin which helps you simplify member admin screens is now available for download. Access to the plugin download is for registered users who have purchased access to this post  or who have appropriate membership level. Download version 2.0: Note this new version requires at least wordpress 3.1 and is tested up to [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2078/amr-events-download/' rel='bookmark' title='amr-events download'>amr-events download</a> <small>Before you buy membership to access this plugin, please&#8230;&#8230; Test it!  test.icalevents.com.  The latest version is always there &#8211; it might...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/user-templates-simple-admin-screens/' rel='bookmark' title='User templates'>User templates</a> <small>amr-user-templates simplified wordpress admin for your users, individually restoreable as they gain skills with wordpress works with multi-site Access to...</small></li>
<li><a href='http://webdesign.anmari.com/1088/installing-your-members/' rel='bookmark' title='Looks good, dived in with a developers license'>Looks good, dived in with a developers license</a> <small>A record or informal guide of the installation process of the Your Members wordpress membership plugin....</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://wpusersplugin.com/amr-user-templates/">User Template plugin</a> which helps you simplify member admin screens is now available for download.</p>
<p>Access to the plugin download is for registered users who have purchased access to this post  or who have appropriate membership level.</p>
<h2>Download version 2.0:</h2>
<p>Note this new version requires at least wordpress 3.1 and is tested up to 3.3 beta.</p>
<div class="ym_private_no_access"><div class="ym_message"><div class="ym_message_liner">You need to be logged in to download the file or see the post</div></div></div>
<p><strong><br />
</strong></p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2078/amr-events-download/' rel='bookmark' title='amr-events download'>amr-events download</a> <small>Before you buy membership to access this plugin, please&#8230;&#8230; Test it!  test.icalevents.com.  The latest version is always there &#8211; it might...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/user-templates-simple-admin-screens/' rel='bookmark' title='User templates'>User templates</a> <small>amr-user-templates simplified wordpress admin for your users, individually restoreable as they gain skills with wordpress works with multi-site Access to...</small></li>
<li><a href='http://webdesign.anmari.com/1088/installing-your-members/' rel='bookmark' title='Looks good, dived in with a developers license'>Looks good, dived in with a developers license</a> <small>A record or informal guide of the installation process of the Your Members wordpress membership plugin....</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2008/amr-user-templates-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get the next, or previous day of week from the current date</title>
		<link>http://webdesign.anmari.com/2000/get-the-next-day-of-week-from-the-current-date/</link>
		<comments>http://webdesign.anmari.com/2000/get-the-next-day-of-week-from-the-current-date/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 20:59:35 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR Ical Events List]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=2000</guid>
		<description><![CDATA[Given a date, get the next or previous Monday, or Tuesday etc from the given date. This is useful when working with ical recurring dates.  If the date given is already that day of week, it is returned as the result. For example to get the following Every 20th Monday of the year, forever: DTSTART;TZID=US-Eastern:19970519T090000 [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/1956/calculate-date-from-day-of-year-in-php/' rel='bookmark' title='Calculate date from day of year in php'>Calculate date from day of year in php</a> <small>Here  is a simple first of several notes on useful date functions.  This function accepts  a year  (YYYY) and a...</small></li>
<li><a href='http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/' rel='bookmark' title='Day of week for historical dates earlier than 1760'>Day of week for historical dates earlier than 1760</a> <small>Problem with getting the day of week for old dates before 1760? See this....</small></li>
<li><a href='http://webdesign.anmari.com/520/timezones-and-offsets-in-wordpress/' rel='bookmark' title='Timezones and offsets in wordpress'>Timezones and offsets in wordpress</a> <small>Writing a plugin that requires a correct timezone object ?  Not sure how to deal with wordpress installations that may...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Given a date, get the next or previous Monday, or Tuesday etc from the given date.  This is useful when working with ical recurring dates.  If the date given is already that day of week, it is returned as the result.</p>
<p>For example to get the following</p>
<blockquote><p>Every 20th Monday of the year, forever:<br />
DTSTART;TZID=US-Eastern:19970519T090000<br />
RRULE:FREQ=YEARLY;BYDAY=20MO</p>
<p>==&gt; (1997 9:00 AM EDT)May 19<br />
(1998 9:00 AM EDT)May 18<br />
(1999 9:00 AM EDT)May 17</p></blockquote>
<p>One could get the first Monday of the year, the it is fairly easy to get the 20th !</p>
<blockquote>
<pre>&lt;?php

global $amr_day_of_week_no;
$amr_day_of_week_no = array (
 'MO' =&gt; 1,
 'TU' =&gt; 2,
 'WE' =&gt; 3,
 'TH' =&gt; 4,
 'FR' =&gt; 5,
 'SA' =&gt; 6,
 'SU' =&gt; 0
 );    

 function amr_goto_byday ($dateobj, $byday, $sign)    {
 global $amr_day_of_week_no;    
 $dayofweek = $dateobj-&gt;format('w'); /* 0=sunday, 6 = saturday */
 if ($dayofweek == '-1') $dayofweek = <a href="http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/">get_oldweekdays</a>($dateobj); /* php seems to break around 1760   */
$target     = $amr_day_of_week_no[$byday]; /*  mo=1 ,su=7  */
 $adjustment = $target - $dayofweek;
 if ($sign === '+') {
 if ($adjustment &lt; 0) $adjustment = $adjustment + 7;        
 }
 else if ($adjustment &gt; 0) $adjustment = $adjustment-7;    
 $d2 = new DateTime();
 $d2 = clone ($dateobj);         
 date_modify ($d2,$adjustment.' days');    
 return ($d2);
 }    

 /* --------Test data ------------------------- */
$d[] = new DateTime('2009-12-25');
$d[] = new DateTime('2009-12-28');
$d[] = new DateTime('2009-12-29');
$d[] = new DateTime('2009-12-30');
$d[] = new DateTime('2009-12-31');
$d[] = new DateTime('2010-01-01');
$d[] = new DateTime('2010-01-02');
$d[] = new DateTime('2010-01-03');
$d[] = new DateTime('2010-01-04');
$d[] = new DateTime('2010-01-05');
$d[] = new DateTime('2010-01-06');
$d[] = new DateTime('2010-01-07');
$d[] = new DateTime('2010-01-08');
$d[] = new DateTime('2010-01-09');
$d[] = new DateTime('2010-01-10');
$d[] = new DateTime('2010-01-11');

echo '&lt;table&gt;';    
foreach (array ('TU','WE','TH','FR','SA','SU','MO') as $day) {
 echo '&lt;tr&gt;&lt;td&gt; Aiming for '.$day.'&lt;/td&gt;&lt;td&gt;If not this, then next&lt;/td&gt;&lt;td&gt;If not this, then prev&lt;/td&gt;&lt;/tr&gt;';                
 foreach ($d as $i =&gt; $d2)    {
 $d3 = amr_goto_byday ($d2, $day, '+');
 $d4 = amr_goto_byday ($d2, $day, '-');
 $s = $d2-&gt;format('Y m d l');
 echo '&lt;tr&gt;&lt;td&gt; '.$s.'&lt;/td&gt;&lt;td&gt;'.$d3-&gt;format('l,Y m d').'&lt;/td&gt;&lt;td&gt;'.$d4-&gt;format('l,Y m d').'&lt;/td&gt;&lt;/tr&gt;';
 }    
}
echo '&lt;/table&gt;';   
  
?&gt;</pre>
</blockquote>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/1956/calculate-date-from-day-of-year-in-php/' rel='bookmark' title='Calculate date from day of year in php'>Calculate date from day of year in php</a> <small>Here  is a simple first of several notes on useful date functions.  This function accepts  a year  (YYYY) and a...</small></li>
<li><a href='http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/' rel='bookmark' title='Day of week for historical dates earlier than 1760'>Day of week for historical dates earlier than 1760</a> <small>Problem with getting the day of week for old dates before 1760? See this....</small></li>
<li><a href='http://webdesign.anmari.com/520/timezones-and-offsets-in-wordpress/' rel='bookmark' title='Timezones and offsets in wordpress'>Timezones and offsets in wordpress</a> <small>Writing a plugin that requires a correct timezone object ?  Not sure how to deal with wordpress installations that may...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/2000/get-the-next-day-of-week-from-the-current-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Day of week for historical dates earlier than 1760</title>
		<link>http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/</link>
		<comments>http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 19:23:54 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR Ical Events List]]></category>
		<category><![CDATA[ical]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=1989</guid>
		<description><![CDATA[Problem with getting the day of week for old dates before 1760? See this.
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2000/get-the-next-day-of-week-from-the-current-date/' rel='bookmark' title='Get the next, or previous day of week from the current date'>Get the next, or previous day of week from the current date</a> <small>Given a date, get the next or previous Monday, or Tuesday etc from the given date. This is useful when...</small></li>
<li><a href='http://webdesign.anmari.com/1956/calculate-date-from-day-of-year-in-php/' rel='bookmark' title='Calculate date from day of year in php'>Calculate date from day of year in php</a> <small>Here  is a simple first of several notes on useful date functions.  This function accepts  a year  (YYYY) and a...</small></li>
<li><a href='http://webdesign.anmari.com/404/gift-photo-calendar/' rel='bookmark' title='Gift photo calendar using Google ical files'>Gift photo calendar using Google ical files</a> <small>Use your ical feed calendars (google or other (others by importing into google)) and your own photo's to generate a...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>One of the ics files that I encountered in testing my events list plugin came from Google and had a &#8220;Zero Year&#8221; date in it.  There were probably reasons for this and I have to be thankful for the happening -   In looking into it I foundthat the php date format function for day of week $dateobj-&gt;format(&#8216;w&#8217;);  &#8220;breaks&#8221; around the year 1760 and starts returning a &#8220;-1&#8243;.  Since I do have people using my plugin for anniversaries with earlier start dates (It&#8217;s not all musical gigs and sporting events!), I felt I needed to cope with it.</p>
<p>I now use the following code, which appears to work when comparing the weekdays using <a href="http://www.searchforancestors.com/utility/dayofweek.html">http://www.searchforancestors.com/utility/dayofweek.html</a></p>
<pre>$w = $dateobj-&gt;format('w');
if ($w == '-1') $w = get_oldweekdays($dateobj);

function get_oldweekdays ($d) {
   $dummy = new DateTime();
   $dummy = clone ($d);
   date_modify($dummy,'+91500 weeks');
   /* add weeks to get us back to a "working" date -
   a guess from when the date started breaking, plus some extra to be safe */
   $w = $dummy-&gt;format('w');
 return($w);
}</pre>
<p><img class="aligncenter size-full wp-image-1993" title="1700" src="http://webdesign.anmari.com/wp-content/uploads/1700.png" alt="" width="482" height="241" /></p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2000/get-the-next-day-of-week-from-the-current-date/' rel='bookmark' title='Get the next, or previous day of week from the current date'>Get the next, or previous day of week from the current date</a> <small>Given a date, get the next or previous Monday, or Tuesday etc from the given date. This is useful when...</small></li>
<li><a href='http://webdesign.anmari.com/1956/calculate-date-from-day-of-year-in-php/' rel='bookmark' title='Calculate date from day of year in php'>Calculate date from day of year in php</a> <small>Here  is a simple first of several notes on useful date functions.  This function accepts  a year  (YYYY) and a...</small></li>
<li><a href='http://webdesign.anmari.com/404/gift-photo-calendar/' rel='bookmark' title='Gift photo calendar using Google ical files'>Gift photo calendar using Google ical files</a> <small>Use your ical feed calendars (google or other (others by importing into google)) and your own photo's to generate a...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculate date from day of year in php</title>
		<link>http://webdesign.anmari.com/1956/calculate-date-from-day-of-year-in-php/</link>
		<comments>http://webdesign.anmari.com/1956/calculate-date-from-day-of-year-in-php/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 02:04:04 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR Ical Events List]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=1956</guid>
		<description><![CDATA[Here  is a simple first of several notes on useful date functions.  This function accepts  a year  (YYYY) and a Day in the year (1 to 366), and returns a DateTime Object. /* Year if format YYYY, Day in year 1 to 366 */ function dayofyear2date( $year, $DayInYear ) { $d = new DateTime($year.'-01-01'); date_modify($d, [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/2000/get-the-next-day-of-week-from-the-current-date/' rel='bookmark' title='Get the next, or previous day of week from the current date'>Get the next, or previous day of week from the current date</a> <small>Given a date, get the next or previous Monday, or Tuesday etc from the given date. This is useful when...</small></li>
<li><a href='http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/' rel='bookmark' title='Day of week for historical dates earlier than 1760'>Day of week for historical dates earlier than 1760</a> <small>Problem with getting the day of week for old dates before 1760? See this....</small></li>
<li><a href='http://webdesign.anmari.com/95/comparison-of-event-calendar-plug-ins/' rel='bookmark' title='Comparison of Event Calendar Plug-ins'>Comparison of Event Calendar Plug-ins</a> <small>We are thinking of converting the school&#8217;s website from typo3 to wordpress to make it easier for staff and parents...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Here  is a simple first of several notes on useful date functions.  This function accepts  a year  (YYYY) and a Day in the year (1 to 366), and returns a DateTime Object.</p>
<pre class="php">
<pre> /* Year if format YYYY, Day in year 1 to 366 */</pre>
<p>function dayofyear2date( $year, $DayInYear ) {</p>
<p>$d = new DateTime($year.'-01-01');</p>
<p>date_modify($d, '+'.($DayInYear-1).' days');</p>
<p>return ($d);</p>
<p>}</pre>
<p>I&#8217;m tired of seeing Unix time stamp code examples that break with older dates.  Since my ical calendar scripts can potentially hold recurring dates that are anniversaries and birthdays, my scripts need to cope with dates earlier than 1970, and with timezones and daylight saving,  so I use the DateTime class exclusively now.</p>
<h3>Test Script To Check Function</h3>
<pre class="php">&lt;?php

function dayofyear2date( $year, $DayInYear ) {
 $d = new DateTime($year.'-01-01');
 date_modify($d, '+'.($DayInYear-1).' days');
return ($d);
}

$d[] = new DateTime('1950-12-31');
$d[] = new DateTime('1970-01-01');
$d[] = new DateTime('2010-01-01');
$d[] = new DateTime('2010-12-27');
$d[] = new DateTime('2010-12-31');

foreach ($d as $i =&gt; $d2)    {
 $dayofyear = $d2-&gt;format('z')+1;
 $date = dayofyear2date (
 $d2-&gt;format('Y'),
 $dayofyear ); /* note z returns days from 0 */
 echo '&lt;br /&gt;&lt;b&gt;'.$d2-&gt;format('Y m d')
  .'&lt;/b&gt;&amp;nbsp;&amp;nbsp;'.$dayofyear.'&amp;nbsp;&amp;nbsp;&lt;br /&gt;'
  .$date-&gt;format('Y m d');
}
?&gt;
</pre>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/2000/get-the-next-day-of-week-from-the-current-date/' rel='bookmark' title='Get the next, or previous day of week from the current date'>Get the next, or previous day of week from the current date</a> <small>Given a date, get the next or previous Monday, or Tuesday etc from the given date. This is useful when...</small></li>
<li><a href='http://webdesign.anmari.com/1989/day-of-week-for-dates-earlier-than-1760/' rel='bookmark' title='Day of week for historical dates earlier than 1760'>Day of week for historical dates earlier than 1760</a> <small>Problem with getting the day of week for old dates before 1760? See this....</small></li>
<li><a href='http://webdesign.anmari.com/95/comparison-of-event-calendar-plug-ins/' rel='bookmark' title='Comparison of Event Calendar Plug-ins'>Comparison of Event Calendar Plug-ins</a> <small>We are thinking of converting the school&#8217;s website from typo3 to wordpress to make it easier for staff and parents...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/1956/calculate-date-from-day-of-year-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging your setup of amr-personalise</title>
		<link>http://webdesign.anmari.com/1845/debugging-your-setup-of-amr-personalise/</link>
		<comments>http://webdesign.anmari.com/1845/debugging-your-setup-of-amr-personalise/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 03:53:30 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[AmR Personalise]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=1845</guid>
		<description><![CDATA[Tips on debugging your setup of the personalisation plugin
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/1504/personalise-your-wordpress-emails-pages-or-posts/' rel='bookmark' title='Personalise your wordpress emails, pages, or posts'>Personalise your wordpress emails, pages, or posts</a> <small>A personalisation plugin has just been launched at http://wordpress.org/extend/plugins/amr-personalise/. It will allow an editor or administrator to specify shortcodes in...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/personalise/' rel='bookmark' title='Personalise'>Personalise</a> <small>New home This free wordpress personalisation plugin has a new home at wpusersplugin.com with a suite of user related plugins....</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This post has been moved to: <a title="Wordpress personalisation plugin" href="http://wpusersplugin.com/personalise/debugging-tips/">http://wpusersplugin.com/personalise/debugging-tips/</a></p>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/1504/personalise-your-wordpress-emails-pages-or-posts/' rel='bookmark' title='Personalise your wordpress emails, pages, or posts'>Personalise your wordpress emails, pages, or posts</a> <small>A personalisation plugin has just been launched at http://wordpress.org/extend/plugins/amr-personalise/. It will allow an editor or administrator to specify shortcodes in...</small></li>
<li><a href='http://webdesign.anmari.com/plugins/personalise/' rel='bookmark' title='Personalise'>Personalise</a> <small>New home This free wordpress personalisation plugin has a new home at wpusersplugin.com with a suite of user related plugins....</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/1845/debugging-your-setup-of-amr-personalise/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The &#8220;shortcode any widget&#8221; handles multiple instances</title>
		<link>http://webdesign.anmari.com/1814/the-shortcode-any-widget-handles-multiple-instances/</link>
		<comments>http://webdesign.anmari.com/1814/the-shortcode-any-widget-handles-multiple-instances/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 04:15:01 +0000</pubDate>
		<dc:creator>anmari</dc:creator>
				<category><![CDATA[Shortcode any widget]]></category>

		<guid isPermaLink="false">http://webdesign.anmari.com/?p=1814</guid>
		<description><![CDATA[The shortcode any widget plugin can reference multiple instances of the same widget individually  by targeting the instances unique id.  If you use the general name without the id, it will list all widgets with that name. EG: [do_widget id=tag_cloud-3] or [do_widget "Tag Cloud"] The trick is to be sure that you have the correct [...]
Related posts:<ol>
<li><a href='http://webdesign.anmari.com/1649/shortcode-any-widget/' rel='bookmark' title='Shortcode a widget in a page or post'>Shortcode a widget in a page or post</a> <small>Shortcodize a widget - Use any widget in a shortcode in a page or post...</small></li>
<li><a href='http://webdesign.anmari.com/1682/widget-as-shortcode-tips/' rel='bookmark' title='Widget as shortcode &#8211; tips'>Widget as shortcode &#8211; tips</a> <small>Want to keep the widget title to identify it from other instances of the same widget, but want to hide...</small></li>
<li><a href='http://webdesign.anmari.com/157/widgetized-headers-and-footers/' rel='bookmark' title='Widgetized headers and footers?'>Widgetized headers and footers?</a> <small>Dynamic (widgetized) Sidebars are great, but would you not like to have a dynamic header and footer in your theme...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The shortcode any widget plugin can reference multiple instances of the same widget individually  by targeting the instances unique id.  If you use the general name without the id, it will list all widgets with that name.</p>
<p>EG:</p>
<blockquote><p>[do_widget id=tag_cloud-3]</p></blockquote>
<p>or</p>
<blockquote><p>[do_widget "Tag Cloud"]</p></blockquote>
<p>The trick is to be sure that you have the correct id&#8217;s, and the id names correct.  For example, to double check I added two tag cloud widgets to my play system.  The id&#8217;s ended up being &#8220;tag_cloud-3&#8243; and &#8220;tag_cloud-4&#8243;.   You also need a separate do_widget for each &#8211; don&#8217;t put in the same shortcode<br />
Note:</p>
<ol>
<li>the underscore and the hyphen</li>
<li>the fact that they were not numbered 1 and 2, even though I currently had no other tag cloud widgets</li>
</ol>
<h3>How to find out the widget id?</h3>
<p>In the post or page where you have entered the shortcode, add to the url:</p>
<blockquote><p>?do_widget_debug</p></blockquote>
<p>(replace ? with &amp; if you already have a ?)</p>
<p>If the do_widget shortcode fires, then it will list your sidebars and the widget ids and a bunch of other statements. Find the shortcode sidebar and see what the id of the widget is</p>
<p><strong>Alternatively:</strong></p>
<p>In some browser you can hover over your widgets or the edit links in the widget sidebar to really see what the id&#8217;s are.</p>
<div id="attachment_1816" class="wp-caption aligncenter" style="width: 310px"><a href="http://webdesign.anmari.com/wp-content/uploads/editpostmultiwidget.png"><img class="size-medium wp-image-1816" title="editpostmultiwidget" src="http://webdesign.anmari.com/wp-content/uploads/editpostmultiwidget-300x171.png" alt="" width="300" height="171" /></a><p class="wp-caption-text">How to do the shortcode any widget</p></div>
<p>and the result is&#8230;&#8230;..</p>
<div id="attachment_1813" class="wp-caption aligncenter" style="width: 310px"><a href="http://webdesign.anmari.com/wp-content/uploads/multiwidgetshortcode.png"><img class="size-medium wp-image-1813" title="multiwidgetshortcode" src="http://webdesign.anmari.com/wp-content/uploads/multiwidgetshortcode-300x229.png" alt="" width="300" height="229" /></a><p class="wp-caption-text">Multiple widget instances</p></div>
<p>Related posts:</p><ol>
<li><a href='http://webdesign.anmari.com/1649/shortcode-any-widget/' rel='bookmark' title='Shortcode a widget in a page or post'>Shortcode a widget in a page or post</a> <small>Shortcodize a widget - Use any widget in a shortcode in a page or post...</small></li>
<li><a href='http://webdesign.anmari.com/1682/widget-as-shortcode-tips/' rel='bookmark' title='Widget as shortcode &#8211; tips'>Widget as shortcode &#8211; tips</a> <small>Want to keep the widget title to identify it from other instances of the same widget, but want to hide...</small></li>
<li><a href='http://webdesign.anmari.com/157/widgetized-headers-and-footers/' rel='bookmark' title='Widgetized headers and footers?'>Widgetized headers and footers?</a> <small>Dynamic (widgetized) Sidebars are great, but would you not like to have a dynamic header and footer in your theme...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://webdesign.anmari.com/1814/the-shortcode-any-widget-handles-multiple-instances/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

