Free Form Calendar Application

That was it. Thank you!

Jim

Just out of curiosity, what did you changed. I’ll investigate and update all the posts and applications for it :)

Thanks for the debugging guys ;)

Change

$tempMonth = substr($this->month, 2);

To

$tempMonth = substr($this->month, 1);

[size="7"]OK EVERYONE!![/size]

i am making this calendar for just plain php, and i noticed some of you are good with colors and styling!

i have the calendar working and stuff… hopefully.

i just need 2 color schemes, and wanted to know if someone could make them for me…

ok so i need a blueish color scheme(its going on a site that uses blues), and a pastel color scheme(my boss/webmaster said pastels go well with the scheme for the site, im just a worker). it would be great if someone could make one or both.

[size="7"]THANK YOU ALL!!![/size][size="5"]… in advance[/size]

and just some colors that are used on the site:

#97c4e3

#00ffff

#33ffcc

i can get more, but thats just a few.

Thanks for posting this class. It has been a real time saver for a project I’m working on. I’ll preface my question by letting you know that I’m very much a novice at this, but if anyone can help with the bug(?) I’m seeing, I’d greatly appreciate it.

I noticed when using this class on my own site, that if you display a month (such at July 2010) that has the last day of the month on a Saturday, that there is an extra (blank) row added to the table. I tried it at the demo site listed above and witnessed the same behavior. I’ve looked at the logic that is drawing the table and can’t figure out what is causing the problem. Anyone have any ideas?

Thanks again.

Works sweet! Thanks for this!

Just added some modifications and it fits my needs…

One thing filling the empty days in the last row:


         

         /* finish the rest of the days in the week */

         if($days_in_this_week < <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='8)' /> :

             for($x = 1; $x <= (8 - $days_in_this_week); $x++):

                 $this->calendar.= '<td class="'. $this->style .'-day-np">&nbsp;</td>';

             endfor;

         endif;



if $days_in_this_week equals 1 (i.e. 2010 July) you get a complete empty last row, maybe it’s not what you really want, so change to this and voila:




         /* finish the rest of the days in the week */

         if($days_in_this_week < 8 && $days_in_this_week > 1) : // <--- here

             for($x = 1; $x <= (8 - $days_in_this_week); $x++):

                 $this->calendar.= '<td class="'. $this->style .'-day-np">&nbsp;</td>';

             endfor;

         endif;



And it would be nice if I could start the week on monday. I suck in PHP dates, so if anyone have a clue it would be great.

Thanks again!

this code is great but can someone please make include the getting of events in the database like on david walsh calendar tut… i tried but i failed dunno what to do… thanks in advance…

btw i use mysql and php…thanks

hi all! I’m a new using yii framework. I don’t know how to use jquery with yii framework like calendar and popup box. hope all of you will help me… :)

Is there a easy way in the script to translate the name of the months to other languages as there was for the week days ?

I know this whole post is kind of old, but my small contribution to this would be this:

Wouldn’t changing these two lines of code to use $_REQUEST be much shorter?

$month = (isset($_POST[‘month’])) ? $_POST[‘month’] : $_GET[‘month’];

$year = (isset($_POST[‘year’])) ? $_POST[‘year’] : $_GET[‘year’];

The result would be this…

$month = $_REQUEST[‘month’];

$year = $_REQUEST[‘year’];

One more thing to comment on is this piece of code:

/* We need to take the month value and turn it into one without a leading 0 */

if((substr($this->month, 0, 1)) == 0)

{

// if value is between 01 - 09, drop the 0


&#036;tempMonth = substr(&#036;this-&gt;month, 1);                                                                                              


&#036;this-&gt;month = &#036;tempMonth;

}

Why would you not just change how you define $this->month earlier in the code?

You have:

$this->month = date("m");

Why not use:

$this->month = date("n");

"m" is the numeric representation of the month with the leading zero. "n" is the numeric representation of the month WITHOUT the leading zero.

Making this change would take out some of the overhead in the code.

Could anyone tell me how to get the date value in the place where we list the events in calender




/** You can query the database for an entry for this day if you like or print out a message on each day.Uncomment these two lines.  **/

                                

$this->calendar.= '<div class="'. $this->style .'-text"><a href="">'.$date.'</a></div><br/><br/>';

$this->calendar.= str_repeat('<p> </p>',2);



I wanna get the date value in this block and by which i have to get the event list from the database.

Hi, i facing trouble to view out the calender,I follow the steps,i place the class on component, i put the controller on the site controller and view file on the site/. But seem outcome is undefined variable:month on which the error from the site controller


$calendar=new Calendar($month,$year,$style);

I hope someone can help out.I worry i miss out any steps.

Hi. I’m new to yii and PHP. I’m trying to use this event calendar in a yii1.1 project.

I added the class as an yii component.

It gives me the following PHP notice.

Undefined variable: style

in the following line:


$this->calendar.= '<tr class="'. $style .'-row">';

If I don’t use &style, it works fine. The calendar is displayed without css styles.

Please help me to identify the problem.

Thank you.