View previous topic :: View next topic |
Author |
Message |
Sigg3
Joined: 03 Jul 2003 Posts: 909 Location: Oslo, Norway
|
Posted: Wed Jan 19, 2005 3:38 pm Post subject: Calendar validation issue |
|
|
There's those months with 31 days in 'em causing this in my validation:
Line 748, column 26: document type does not allow element "td" here; assuming missing "tr" start-tag
Code: | <td class="b2calendarcell">31</td> |
I was just wondering wether it wouldn't be just as good having the script write that <tr> anyway and supply the other empty cells instead of creating a td all out of place. Is there an easy way to "re-write" this? _________________ Sigg3.net - You know you're worth it! | b2 Cafelog Resource Center | Fight my BattleImp! |
|
Back to top |
|
 |
sh0ck
Joined: 02 May 2004 Posts: 58 Location: Norway
|
|
Back to top |
|
 |
Sigg3
Joined: 03 Jul 2003 Posts: 909 Location: Oslo, Norway
|
Posted: Mon Jan 24, 2005 3:31 pm Post subject: |
|
|
Atm I have .b2calendaremptycell set to {display: none;} but if we could have the empty cells filled with a and {visibility: hidden;} I guess it would work.
But now I see it's already set:
$calendaremptycellcontent = ' ';
in b2calendar.php
...
Shouldn't it be here somewhere?
Code: | for($i = $calendarfirst; $i<($calendarlast+86400); $i = $i + 86400) {
if ($newrow == 1) {
if ($k > $daysinmonth) {
break;
}
echo $calendarrowend."\n";
if (($i+86400) < ($calendarlast+86400)) {
echo $calendarrowstart."\n";
}
$newrow = 0;
}
if (date('m',$i) != $thismonth) {
echo $calendaremptycellstart;
echo $calendaremptycellcontent;
echo $calendaremptycellend;
} else {
$k = $k + 1;
echo $calendarcellstart;
$calendarblah = '-'.date('j',$i).'-';
$calendarthereisapost = ereg($calendarblah, $daysinmonthwithposts);
$calendartoday = (date('Ymd',$i) == date('Ymd', (time() + ($time_difference * 3600))));
if ($calendarthereisapost) {
echo '<a href="'.$siteurl.'/'.$blogfilename.$querystring_start.'m'.$querystring_equal.$thisyear.$thismonth.date('d',$i).'" class="b2calendarlinkpost">';
}
if ($calendartoday) {
echo '<span class="b2calendartoday">';
}
echo date('j',$i);
if ($calendartoday) {
echo '</span>';
}
if ($calendarthereisapost) {
echo '</a>';
}
echo $calendarcellend."\n";
}
$j = $j + 1;
if ($j == 7) {
$j = 0;
$newrow = 1;
}
} |
_________________ Sigg3.net - You know you're worth it! | b2 Cafelog Resource Center | Fight my BattleImp! |
|
Back to top |
|
 |
sh0ck
Joined: 02 May 2004 Posts: 58 Location: Norway
|
Posted: Sun Feb 06, 2005 11:54 pm Post subject: |
|
|
Yes, but it gets really difficult. The <tr> must start and end on each 30-day month, including February.... umm.... this might take some time... _________________ http://www.licklinux.com |
|
Back to top |
|
 |
|