PDA

View Full Version : [HELP] Calendar.php modification


bou
05-17-2007, 08:58 PM
Hi, i need your help to modify the calendar.php file.

I would want that the month and the year is above days.
I tried to modify the calendar.php file on this part :

<tr>
<td colspan='31' class='td-calendar-navi'>
<a href='$PHP_SELF?curr_month=$prev_month&amp;curr_year=$ prev_year&amp;showimage=$prev_image_id'>&laquo;</a>
$asc_mon-$curr_year
<a href='$PHP_SELF?curr_month=$next_month&amp;curr_year=$ next_year&amp;showimage=$next_image_id'>&raquo;</a>
</td>
</tr>

to put it here :

// first day of month
$first_day_month = date("w", mktime(0,0,0,$curr_month,1,$curr_year));
$cal_hz .= "<table class='table-calendar' cellspacing='0'>
<tr>
<td colspan='31' class='td-calendar-navi'>
<a href='$PHP_SELF?curr_month=$prev_month&amp;curr_year=$ prev_year&amp;showimage=$prev_image_id'>&laquo;</a>
$asc_mon-$curr_year
<a href='$PHP_SELF?curr_month=$next_month&amp;curr_year=$ next_year&amp;showimage=$next_image_id'>&raquo;</a>
</td>
</tr>
<tr>";

That works but there is only a year which displays, the month does not appear.
Anybody would know how to help me?

Thanks ;)

jdleung
05-18-2007, 03:28 AM
You need to move the following line together
$asc_mon = $months[$curr_month];

bou
05-18-2007, 06:21 PM
You need to move the following line together
$asc_mon = $months[$curr_month];

Perfectly ;)

thanks !