View previous topic :: View next topic |
Author |
Message |
daynah
Joined: 25 Jan 2002 Posts: 8
|
Posted: Mon Sep 09, 2002 6:05 pm Post subject: Calendar doesn't Validate |
|
|
I'm not sure if you would consider this a bug or not, but I'll report it.
If you have the calendar display on your page and then try to validate your code, it has errors. The <tr> and </tr> tags are missing from the last row of days. I've been looking at the file for a while... and is still puzzled as to where to add the tags. Could someone help?
Thanks!
You can see the error here |
|
Back to top |
|
 |
mikelittle
Joined: 11 May 2002 Posts: 376 Location: UK
|
Posted: Tue Sep 10, 2002 12:40 am Post subject: |
|
|
Hi Daynah,
I just spotted this at the weekend, but forgot to report it.
I did fix it though :)
You need to change the code in b2calendar.php on line 149
Code: |
if ($newrow == 1) {
if ($k > $daysinmonth) {
break;
}
echo $calendarrowend."\n";
if (($i+86400) < $calendarlast) {
echo $calendarrowstart."\n";
}
$newrow = 0;
}
|
becomes
Code: |
if ($newrow == 1) {
if ($k > $daysinmonth) {
break;
}
echo $calendarrowend."\n";
if (($i+86400) < $calendarlast+86400) {
echo $calendarrowstart."\n";
}
$newrow = 0;
}
|
This fixes it.
Hope this helps,
Mike |
|
Back to top |
|
 |
daynah
Joined: 25 Jan 2002 Posts: 8
|
Posted: Tue Sep 10, 2002 1:27 am Post subject: |
|
|
You're wonderful Mike! It did the trick, thank you! |
|
Back to top |
|
 |
mr_oop
Joined: 17 Mar 2003 Posts: 8
|
Posted: Mon Mar 17, 2003 3:46 pm Post subject: just started out |
|
|
I just started out, still designing my blog - but when I try to validate ( my code (just like the user above) I'm getting an error in the calendar table. Every month with 31 days (like March) is not validated and comes up with an error, I've tried looking at the code, but I'm not that good with PHP yet.
http://validator.w3.org/
-- document type does not allow element "td" here; assuming missing "tr" start-tag --
When creating another line for the 31st in the month, the script does not make a <tr> tag first ...
Is there a way to fix this error (showing every other month)? |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Mon Mar 17, 2003 9:16 pm Post subject: |
|
|
Hi,
I have attempted to reproduce your problem but can not. Would you tell me a little more about your b2 version? and do you have a url that I can validate to see the error? and is this xhtml 1.0 transitional? _________________ Kind Regards,
Michael e |
|
Back to top |
|
 |
mr_oop
Joined: 17 Mar 2003 Posts: 8
|
|
Back to top |
|
 |
mr_oop
Joined: 17 Mar 2003 Posts: 8
|
Posted: Thu Mar 20, 2003 11:27 am Post subject: Weeks starts with monday ... |
|
|
I've narrowed my problem down to this:
In a month with 31 days:
and I put the config to start the week with monday, I get an error.
If I start the week with sunday it validates allright.
Is there any fix to this? |
|
Back to top |
|
 |
|