<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: calendar.class.php</title>
	<atom:link href="http://style-vs-substance.com/code/calendar-class-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://style-vs-substance.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 23 Jun 2010 17:37:21 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: LawBore &#171; i+j=k</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-1754</link>
		<dc:creator>LawBore &#171; i+j=k</dc:creator>
		<pubDate>Mon, 03 Aug 2009 11:46:49 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-1754</guid>
		<description>[...] discussion boardsÂ  -Â  Smarty for templating, NiftyCube for the nice rounded boxes, Calendar Class for the calendars, Sphider for the searching and JQuery and Coda-Slider for the cool visual effects [...]</description>
		<content:encoded><![CDATA[<p>[...] discussion boardsÂ  -Â  Smarty for templating, NiftyCube for the nice rounded boxes, Calendar Class for the calendars, Sphider for the searching and JQuery and Coda-Slider for the cool visual effects [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fresher</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-45</link>
		<dc:creator>Fresher</dc:creator>
		<pubDate>Sun, 10 Feb 2008 21:35:20 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-45</guid>
		<description>nice work! thanx a lot! :]</description>
		<content:encoded><![CDATA[<p>nice work! thanx a lot! :]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Mayes</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-44</link>
		<dc:creator>Jim Mayes</dc:creator>
		<pubDate>Sat, 09 Feb 2008 00:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-44</guid>
		<description>For all those interested, new version 2.5 is out!

@Fresher, with the new version you can now specify only the dates in the highlighted_dates array to be linked

@Fresher and xytras, new versions allow setting the week&#039;s start date</description>
		<content:encoded><![CDATA[<p>For all those interested, new version 2.5 is out!</p>
<p>@Fresher, with the new version you can now specify only the dates in the highlighted_dates array to be linked</p>
<p>@Fresher and xytras, new versions allow setting the week&#8217;s start date</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: xytras</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-43</link>
		<dc:creator>xytras</dc:creator>
		<pubDate>Wed, 30 Jan 2008 15:55:18 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-43</guid>
		<description>In the calendar the weeks start on sunday... How can I let them start on monday?</description>
		<content:encoded><![CDATA[<p>In the calendar the weeks start on sunday&#8230; How can I let them start on monday?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arthpix</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-41</link>
		<dc:creator>arthpix</dc:creator>
		<pubDate>Sat, 26 Jan 2008 15:00:32 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-41</guid>
		<description>The code you gave me was right, jim.

I don&#039;t now how did I put a [1] in here:

$fechas[1] = $event[1];


 that&#039;s my newbie mistake (blush).</description>
		<content:encoded><![CDATA[<p>The code you gave me was right, jim.</p>
<p>I don&#8217;t now how did I put a [1] in here:</p>
<p>$fechas[1] = $event[1];</p>
<p> that&#8217;s my newbie mistake (blush).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fresher</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-40</link>
		<dc:creator>Fresher</dc:creator>
		<pubDate>Fri, 25 Jan 2008 21:47:01 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-40</guid>
		<description>hi. i have a problem with link. i have only few days in month which i want to link but i dont know how to do so..now all days are linked.. :/ can i link only specific days ? can you help me? another problem is than i want to do that the week will bagan from monday not from sunday..can you do so for me please?</description>
		<content:encoded><![CDATA[<p>hi. i have a problem with link. i have only few days in month which i want to link but i dont know how to do so..now all days are linked.. :/ can i link only specific days ? can you help me? another problem is than i want to do that the week will bagan from monday not from sunday..can you do so for me please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arthpix</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-39</link>
		<dc:creator>arthpix</dc:creator>
		<pubDate>Fri, 25 Jan 2008 16:44:19 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-39</guid>
		<description>Thanks a lot for your support, I&#039;m now a bit better, but the code only highlights the last date from the array.

Will let you know if I get the solution for  this issue.

Again thank you very much.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for your support, I&#8217;m now a bit better, but the code only highlights the last date from the array.</p>
<p>Will let you know if I get the solution for  this issue.</p>
<p>Again thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Mayes</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-38</link>
		<dc:creator>Jim Mayes</dc:creator>
		<pubDate>Fri, 25 Jan 2008 04:21:50 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-38</guid>
		<description>Spotted a few problems. First, you can trim down your foreach because you aren&#039;t going to use the key just the value. That&#039;s not really an error, it just streamlines the code.

&lt;pre class=&quot;brush:php&quot;&gt;
foreach ($lines as $line){
&lt;/pre&gt;

Then two issues with the way you are exploding the line. First your explode is looking for a comma in the string to make it&#039;s break. Your strings are using a &#124; character not a comma. Second, I think you would be better off not reusing the $line variable here because that variable is already being set by the foreach loop.

&lt;pre class=&quot;brush:php&quot;&gt;
$event= explode(&quot;&#124;&quot;, $line);
&lt;/pre&gt;

Next, you want to pass the date you found into an array. The way you have it now, you&#039;re overwriting the array each step thru the foreach loop. You need this instead.

&lt;pre class=&quot;brush:php&quot;&gt;
$fechas[] = $event[1];
&lt;/pre&gt;

Lastly, you don&#039;t want to pass the dates to $calendar-&gt;highlighted_dates at each step in the loop. You want to build the dates into an array (in this case $fechas) and then when you are done pass that to $calendar-&gt;highlighted_dates. So, that needs to happen outside the close of your foreach loop.

The final code would be more along the lines of:

&lt;pre class=&quot;brush:php&quot;&gt;
$lines = file(&#039;eventos.txt&#039;);
foreach ($lines as $line){
    $event= explode(&quot;&#124;&quot;, $line);
    $fechas[] = $event[1];
}
$calendar-&gt;highlighted_dates = $fechas;
&lt;/pre&gt;

Give that a try</description>
		<content:encoded><![CDATA[<p>Spotted a few problems. First, you can trim down your foreach because you aren&#8217;t going to use the key just the value. That&#8217;s not really an error, it just streamlines the code.</p>
<pre class="brush:php">
foreach ($lines as $line){
</pre>
<p>Then two issues with the way you are exploding the line. First your explode is looking for a comma in the string to make it&#8217;s break. Your strings are using a | character not a comma. Second, I think you would be better off not reusing the $line variable here because that variable is already being set by the foreach loop.</p>
<pre class="brush:php">
$event= explode("|", $line);
</pre>
<p>Next, you want to pass the date you found into an array. The way you have it now, you&#8217;re overwriting the array each step thru the foreach loop. You need this instead.</p>
<pre class="brush:php">
$fechas[] = $event[1];
</pre>
<p>Lastly, you don&#8217;t want to pass the dates to $calendar->highlighted_dates at each step in the loop. You want to build the dates into an array (in this case $fechas) and then when you are done pass that to $calendar->highlighted_dates. So, that needs to happen outside the close of your foreach loop.</p>
<p>The final code would be more along the lines of:</p>
<pre class="brush:php">
$lines = file('eventos.txt');
foreach ($lines as $line){
    $event= explode("|", $line);
    $fechas[] = $event[1];
}
$calendar->highlighted_dates = $fechas;
</pre>
<p>Give that a try</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arthpix</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-36</link>
		<dc:creator>arthpix</dc:creator>
		<pubDate>Fri, 25 Jan 2008 03:45:50 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-36</guid>
		<description>Excellent class, congrats!

I&#039;m trying to retrieve highlited_dates array, but from a text document like this:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
events.txt:

Jhon and Marie Wedding &#124; 2008-03-18 &#124;14:00 hrs
Karl birthday &#124; 2008-04-15 &#124; 22:00 hrs
2005 Class Prom &#124; 2008-06-22 &#124; 20:00 hrs
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

I use explode() to output a list of events in my page and after many tries can&#039;t figure out how to do the same for highlight those dates in the calendar.

I tried this code:

$lines = file(&#039;eventos.txt&#039;);
foreach ($lines as $line_num =&gt; $line){
$line = explode(&quot;,&quot;, $line);
$fechas = array($line[1]);
$calendar-&gt;highlighted_dates = $fechas;
}
but any date is highlighted I&#039;m a simple newbie.

Thank you for sharing your code and for any help you can give to me.</description>
		<content:encoded><![CDATA[<p>Excellent class, congrats!</p>
<p>I&#8217;m trying to retrieve highlited_dates array, but from a text document like this:</p>
<p>- &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211;<br />
events.txt:</p>
<p>Jhon and Marie Wedding | 2008-03-18 |14:00 hrs<br />
Karl birthday | 2008-04-15 | 22:00 hrs<br />
2005 Class Prom | 2008-06-22 | 20:00 hrs<br />
- &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; - &#8211; </p>
<p>I use explode() to output a list of events in my page and after many tries can&#8217;t figure out how to do the same for highlight those dates in the calendar.</p>
<p>I tried this code:</p>
<p>$lines = file(&#8217;eventos.txt&#8217;);<br />
foreach ($lines as $line_num =&gt; $line){<br />
$line = explode(&#8221;,&#8221;, $line);<br />
$fechas = array($line[1]);<br />
$calendar-&gt;highlighted_dates = $fechas;<br />
}<br />
but any date is highlighted I&#8217;m a simple newbie.</p>
<p>Thank you for sharing your code and for any help you can give to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KoRI</title>
		<link>http://style-vs-substance.com/code/calendar-class-php/comment-page-1/#comment-16</link>
		<dc:creator>KoRI</dc:creator>
		<pubDate>Thu, 22 Nov 2007 22:12:53 +0000</pubDate>
		<guid isPermaLink="false">http://style-vs-substance.com/calendarclassphp/#comment-16</guid>
		<description>Thx, I have the answer already!  From here below! :)

http://style-vs-substance.com/projects/calendar/example_full_year.php

KoRI

ps. cool code! like it! thank you for share!</description>
		<content:encoded><![CDATA[<p>Thx, I have the answer already!  From here below! :)</p>
<p><a href="http://style-vs-substance.com/projects/calendar/example_full_year.php" rel="nofollow">http://style-vs-substance.com/projects/calendar/example_full_year.php</a></p>
<p>KoRI</p>
<p>ps. cool code! like it! thank you for share!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
