boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Calendar validation issue

 
Post new topic   Reply to topic    boardom Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
Sigg3



Joined: 03 Jul 2003
Posts: 909
Location: Oslo, Norway

PostPosted: Wed Jan 19, 2005 3:38 pm    Post subject: Calendar validation issue Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
sh0ck



Joined: 02 May 2004
Posts: 58
Location: Norway

PostPosted: Mon Jan 24, 2005 12:31 pm    Post subject: Reply with quote

I have the same problem: http://validator.w3.org/check?uri=http://www.licklinux.com

or I guess we all do...
_________________
http://www.licklinux.com
Back to top
View user's profile Send private message Visit poster's website
Sigg3



Joined: 03 Jul 2003
Posts: 909
Location: Oslo, Norway

PostPosted: Mon Jan 24, 2005 3:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
sh0ck



Joined: 02 May 2004
Posts: 58
Location: Norway

PostPosted: Sun Feb 06, 2005 11:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Bugs All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group