Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic html validation in trunk (Read 2201 times)
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: html validation in trunk
Reply #3 - Oct 20th, 2014 at 10:38pm
Mark & QuoteQuote  
Dandello wrote on Oct 20th, 2014 at 9:34pm:
Monni wrote on Oct 20th, 2014 at 8:42pm:
This still needs work as plain numeric "id" attributes are disallowed.


I think this is one of those 'choose your battles'. Plain numeric ID attributes are okay in HTML5 and work (even if they're not valid) in XHTML and HTML4. (Personally, I think we should get rid of the W3C validation links except for admins testing templates because the moment you do anything browser specific your css becomes invalid.  Sad And we have a LOT of invalid css that works just fine.)


I'm really trying to balance between something that helps us find silly bugs and something that will just be picking our noses. I'm not personally going to try to clean up the css code because I'm already using custom style, so backporting the fixes to default template is almost like rewriting it from scratch.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2253
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: html validation in trunk
Reply #2 - Oct 20th, 2014 at 9:34pm
Mark & QuoteQuote  
Monni wrote on Oct 20th, 2014 at 8:42pm:
This still needs work as plain numeric "id" attributes are disallowed.


I think this is one of those 'choose your battles'. Plain numeric ID attributes are okay in HTML5 and work (even if they're not valid) in XHTML and HTML4. (Personally, I think we should get rid of the W3C validation links except for admins testing templates because the moment you do anything browser specific your css becomes invalid.  Sad And we have a LOT of invalid css that works just fine.)
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
Re: html validation in trunk
Reply #1 - Oct 20th, 2014 at 8:42pm
Mark & QuoteQuote  
Code
Select All
 Index: cgi-bin/yabb2/Sources/Display.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/Display.pm	(revision 1600)
 +++ cgi-bin/yabb2/Sources/Display.pm	(working copy)
 @@ -1755,7 +1755,7 @@

      $yymain .= qq~
      $display_template
 -    <script type="text/javascript">
 +    <script type="text/javascript">//<![CDATA[
      function uncheckAllBut(counter) {
          for (var i = 0; i < document.forms["multidel"].length; ++i) {
              if (document.forms["multidel"].elements[i].type == "checkbox") document.forms["multidel"].elements[i].checked = false;
 @@ -1801,7 +1801,7 @@
      $yymain .= qq~
      $pageindexjs
      function ListPages(tid) { window.open('$scripturl?action=pages;num='+tid, '', 'menubar=no,toolbar=no,top=50,left=50,scrollbars=yes,resizable=no,width=400,heig
ht=300'); }
 -    </script>
 +    //]]></script>
      ~;

  ## gb_css spot
  



This still needs work as plain numeric "id" attributes are disallowed.
  
Back to top
IP Logged
 
Paste Member Name in Quick Reply Box Monni
Language
***
Offline


Min izāmō

Posts: 413
Location: Kaarina, Finland
Joined: Jul 16th, 2014
Gender: Male
Mood: Frustrated
Zodiac sign: Pisces
html validation in trunk
Oct 20th, 2014 at 6:56pm
Mark & QuoteQuote  
Code
Select All
 Index: cgi-bin/yabb2/Languages/English/BoardIndex.lng
 ===================================================================
 --- cgi-bin/yabb2/Languages/English/BoardIndex.lng	(revision 1600)
 +++ cgi-bin/yabb2/Languages/English/BoardIndex.lng	(working copy)
 @@ -62,6 +62,7 @@
  '524' => 'In',
  '525' => 'By',
  '526' => 'Redirected Hits',
 +'643' => 'Up',
  '685' => 'Info Center',
  '791' => 'View the',
  '792' => 'most recent posts',
 @@ -107,4 +108,4 @@
  '6' => 'This category contains no new posts.',
  );

 -1;
 \ No newline at end of file
 +1;
 Index: cgi-bin/yabb2/Sources/BoardIndex.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/BoardIndex.pm	(revision 1600)
 +++ cgi-bin/yabb2/Sources/BoardIndex.pm	(working copy)
 @@ -1374,12 +1374,12 @@
      $template_catnames =~ s/,\Z//xsm;
      $template_boardnames =~ s/,\Z//xsm;
      $yymain .= qq~
 -<script type="text/javascript">
 +<script type="text/javascript">//<![CDATA[
      var catNames = [$template_catnames];
      var boardNames = [$template_boardnames];
      var boardOpen = "";
      var subboardOpen = "";
 -    var arrowup = '<img src="$imagesdir/$brd_arrowup" class="brd_arrow" />';
 +    var arrowup = '<img src="$imagesdir/$brd_arrowup" class="brd_arrow" alt="$boardindex_txt{'643'}" />';
      var openbutton = "$imagesdir/$brd_dropdown";
      var closebutton = "$imagesdir/$brd_dropup";
      var opensubbutton = "$imagesdir/$sub_arrow_dn";
 @@ -1397,7 +1397,7 @@
      var brd_img_idw = $brd_img_idw;
      var brd_img_idh = $brd_img_idh;
      var fix_brd_size = $fix_brd_img_size;
 -</script>~;
 +//]]></script>~;

      # don't show info center, login, etc. if we're calling from sub boards
      if ( !$subboard_sel ) {
 @@ -1784,12 +1784,12 @@
          elsif ($subboard_sel) {
              if ($brd_count) {
                  $boardindex_template = qq~
 -                        <script type="text/javascript">
 +                        <script type="text/javascript">//<![CDATA[
                          var catNames = [$template_catnames];
                          var boardNames = [$template_boardnames];
                          var boardOpen = "";
                          var subboardOpen = "";
 -                        var arrowup = '<img src="$imagesdir/$brd_arrowup" class="brd_arrow" />';
 +                        var arrowup = '<img src="$imagesdir/$brd_arrowup" class="brd_arrow" alt="$boardindex_txt{'643'}" />';
                          var openbutton = "$imagesdir/$brd_dropdown";
                          var closebutton = "$imagesdir/$brd_dropup";
                          var loadimg = "$imagesdir/$brd_loadbar";
 @@ -1799,7 +1799,7 @@
                          var insertindex;
                          var insertcat;
                          var prev_subcount;
 -                        </script>
 +                        //]]></script>
                          $boardindex_template
  ~;
              }
 @@ -2025,4 +2025,4 @@
      }
  }

 -1;
 \ No newline at end of file
 +1;
 Index: cgi-bin/yabb2/Sources/Subs.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/Subs.pm	(revision 1600)
 +++ cgi-bin/yabb2/Sources/Subs.pm	(working copy)
 @@ -715,7 +715,7 @@
      # in a very strict way. (error 406)
      # Take the comments out of the following two lines if you had this problem.
      # $output =~ s/($scripturl\?)([^'"]+)/ $1 . URL_modify($2) /eg;
 -    # sub URL_modify { my $x = shift; $x =~ s/;/&/g; $x; }
 +    # sub URL_modify { my $x = shift; $x =~ s/;/&amp;/g; $x; }
      # End of workaround

      if ( !$copyright ) {
 Index: cgi-bin/yabb2/Templates/default/Micon.def
 ===================================================================
 --- cgi-bin/yabb2/Templates/default/Micon.def	(revision 1600)
 +++ cgi-bin/yabb2/Templates/default/Micon.def	(working copy)
 @@ -252,7 +252,7 @@
  );

  $newload = qq~
 -        <script type="text/javascript">
 +        <script type="text/javascript">//<![CDATA[
          var new_mess = "$newload{'new_mess'}";
          var brd_new = "$newload{'brd_new'}";
          var brd_old = "$newload{'brd_old'}";
 @@ -264,7 +264,7 @@
          var imopen2 = "$newload{'imopen2'}";
          var imclose = "$newload{'imclose'}";
          var imclose2 = "$newload{'imclose2'}";
 -        </script>~;
 +        //]]></script>~;

  #####################################################################
  #                   JS Variables for IMPost, Post                   #
 @@ -315,4 +315,4 @@
  if ( $MenuType == 1 || $UseMenuT == 1) {
      $my_sep = q{ | };
  }
 -1;
 \ No newline at end of file
 +1;
  



This drops the error count on board index to 1, which is obviously false positive.
« Last Edit: Oct 20th, 2014 at 8:27pm by Monni »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
html validation in trunk

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry