Announcement

Collapse
No announcement yet.

Validating vB, Almost There

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Validating vB, Almost There

    Apologies for my initial post in v3.6 suggestions, the instructions in Site Suggestions were a little hard to find. A repeat of my question:

    I just finished two licensed installs of VB in three days. I've spent most of those three days modifying the styles and scripts and have ALMOST got the BB to validate at W3C. I have **one** validation error. In the <style> tag in the head,

    id="vbulletin_css"

    How do I get rid of this? The style tag does not have an ID attribute.

    It occurs whether it's stored as a file or inline. Just this one error, one step away from valid HTML. :-)

  • #2
    I just finished two licensed installs of VB in three days
    Why do you have all three of your post talking about validating your license.... get over it already.
    www.yamaha-forum.net | www.exactservers.com | www.ducati-superbikes.com | www.suzuki-forums.net | www.diavel-forum.com

    Comment


    • #3
      Uh hello. I'm asking about validating HTML. Do you know what that is?

      Yes I made an error and posted in the wrong forums because I did not immediately see the sticky thread in "Site Feedback."

      But in none of the three posts was the question answered.

      Comment


      • #4
        Originally posted by rocknbil View Post
        Uh hello. I'm asking about validating HTML. Do you know what that is?

        .



        What is this HTML you speak of?
        www.yamaha-forum.net | www.exactservers.com | www.ducati-superbikes.com | www.suzuki-forums.net | www.diavel-forum.com

        Comment


        • #5
          rocknbil you own a license vBulletin script? I wonder why another thread of yours was closed and it ask the same question... You must not been validated by staff then... I will wait and see if staff responds here, as they can see if you are a customer.

          Comment


          • #6
            Jose,
            Yes I have valid licenses, one purchased for myself and one for a customer. Again, I apologize for misunderstanding the requirement to apply for premier support prior to posting in this forum. This is why it wound up in three posts.

            My question, rephrased:

            I have edited my templates and phrases in vBulletin on two separate installs and it fails W3C validation with only one error. I cannot locate where to edit this out of the script output:

            <style type="text/css" id="vbulletin_css">
            or
            <link rel="stylesheet" type="text/css" href="...." id="vbulletin_css">

            Can someone let me know what template or script this is output from? I cannot locate it.

            Comment


            • #7
              Guys... Please, don't be jumpy and question people's license status... If they can post in here, they are most likely licensed... Unless in the odd bizzard event where they're not actually licensed, but some how got on their buddy's priority support list... which, this not the case here

              Now, to answer the big question...
              vBulletin's default style _should_ validate for the most part; there is only one "error" which was result of W3C being more strict on their validator. This should've been in the <html> tag, and I recall was addressed that it would be fixed in 3.7.0...

              From the looks of it, the string you are looking for, which should've passed validation is not something you can edit via templates. In fact, it is burried in includes/adminfunctions_template.php

              Please note that we cannot provide support for code edits, so if you do go ahead and edit this, and break your forums, we may not be able to help you...

              Find and edit ONLY the bold part, don't forget to escape the quotes as needed:
              Code:
              	if (preg_match('#^<link rel="stylesheet" type="text/css" href="(clientscript/vbulletin_css/style-\w{8}-0*' . $styleid . '\.css)"([COLOR="Red"][B] id="vbulletin_css"[/B][/COLOR])? />$#', $csscontents, $match))
              Code:
              $QUERY[] = "css = '" . $vbulletin->db->escape_string("<link rel=\"stylesheet\" type=\"text/css\" href=\"$cssfilename\" [COLOR="Red"][B]id=\"vbulletin_css\" [/B][/COLOR]/>") . "'";
              Code:
              $QUERY[] = "css = '" . $vbulletin->db->escape_string("<style type=\"text/css\" [COLOR="Red"][B]id=\"vbulletin_css\"[/B][/COLOR]>\r\n<!--\r\n$css\r\n-->\r\n</style>") . "'";
              Again, be sure to backup your DB and forum before doing those edits. It may break your forums, and we cannot help you if it does. You will most likely need to go to the Main CSS page of each of your style, and hit save to update the cache after you've done the edit to see the change come in effect.
              Best Regards,
              Andy Huang

              Comment


              • #8
                Thank you Andy, that worked perfectly, don't know why I couldn't locate that before, probably not enough sleep.

                There was an easier method to update though: > Styles & Languages, set Store CSS Stylesheets as Files to no, then set it back to yes, this effectively removed the ID from all style sheet tags. Got a green light from W3C now, thanks again.

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                X