Do you Validate your directory markup?

Discussion in 'Directories' started by pipes, Mar 15, 2008.

  1. #1
    Hope ive said that correctly, if not feel free to correct me.:)

    Basically ive been using the validation sites for XHTML and the one for CSS, now the CSS is quite easy to go in and fix as its all in one file for the directory, but sorting the HTML/XHTML i find is confusing me as its showing the results (errors) for index but of course the errors will be in other files from what i see, not so easy to go in and find and correct.

    Do you do it? and how do you do it?

    Many people say not to bother about validation but its not like its to do with rankings, its the display and all that from what i see, so things look ok in other browsers of course, i think its worth going through.
     
    pipes, Mar 15, 2008 IP
  2. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #2
    I do it yeah. My latest directory is valid. If like me, you know what you're doing then its really easy.
     
    mikey1090, Mar 15, 2008 IP
  3. WallaceYeung

    WallaceYeung Notable Member

    Messages:
    3,377
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    230
    Digital Goods:
    1
    #3
    very easy, pay some companies to do that, right?!
     
    WallaceYeung, Mar 15, 2008 IP
  4. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #4
    Well from what i see, when it shows the errors it pretty much gives the solutions but i just need to know those files better to find my way around and sort the errors, as i say, easy in style.css as its all in one place.

    Edit: Checked 2 of yours Mike, one cant be checked, the other has errors, no where near as many as i see on some sites though, i noticed sometimes that on some people sites that fixing one error can sort 400 others in one go, basically one error can make it look worse than it is, from what i gather.

    Im guessing your kidding? :)
     
    pipes, Mar 15, 2008 IP
  5. hyper

    hyper Peon

    Messages:
    1,565
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes indeed, the CSS is very easy to fix, but for the XHTML/HTML is a little bit difficult. For example, from my poiny of view a webpage could be 100% valid, but just because you use some(normal)tag options in the code you might end up with errors on validation process.

    just an example :

    <table>
    some text here
    </table>
    This one is seen as correct.

    BUT:

    <table width="300" high="600">
    same text in here
    </table>

    This one is seen as incorrect.

    There are options on some tags that you souldn't use, if you do not necesarily needed to. Dunno if my reply helps you somehow, and dunno if we are thinking at the same problem.

    Thanks,
    hyper
     
    hyper, Mar 15, 2008 IP
  6. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #6
    Well ive been reading a lot on HTML and XHTML lately and i realise that sometimes in the past when i was going into my directory and making little changes that i was using somethings that dont make sense in XHTML, they were from HTML, so although small i had no idea you used <br /> in XHTML, basically i knew nothing :) still learning it but now its making sense.

    My issue currently with sorting errors now is that when you run the homepage through the validation tool that it shows the errors, what to fix etc but its finding them in the various files that will exist throughout the directory.
     
    pipes, Mar 15, 2008 IP
  7. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #7
    Confused over phpLD files?

    Don't be.

    top_bar.tpl is pretty much all HTML in the header, navbar. All code before the main page content (like articles or links) is in header.tpl or this file.

    main.tpl generates the categories, articles and links. There is little HTML here.

    links.tpl is the layout for the pages where links are shown - within categories, latest links, top hits etc.

    footer.tpl has the bottom of the page code.
     
    mikey1090, Mar 15, 2008 IP
  8. milesbparty

    milesbparty Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    milesbparty, Mar 15, 2008 IP
  9. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #9
    mikey1090, Mar 15, 2008 IP
  10. hyper

    hyper Peon

    Messages:
    1,565
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yeah, that is what I meant.
    I am always sleepy :p
     
    hyper, Mar 15, 2008 IP
  11. milesbparty

    milesbparty Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #11
    True. But I believe that "height" is not valid either. I would be curious if when the height attribute is removed, if the xhtml would validate...

    Here's an interesting article I found on the subject:

    http://apptools.com/examples/tableheight.php
     
    milesbparty, Mar 15, 2008 IP
  12. hyper

    hyper Peon

    Messages:
    1,565
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    0
    #12
    yeah...that I was trying to say. You are not advised to use some options from several tags if you do not really need them.

    I would mark them as possible warnings...but not errors. Anyway..if your website loads ok on most browsers, then I'll forget about them. Or maybe I am wrong...maybe a full valid website would make the difference.

    About the phpLD templates, there are very few which are 100% valid ( yes, I was so bored that I have checked them all :p ) :D


    Thanks,
    hyyyyyyper :)
     
    hyper, Mar 15, 2008 IP
  13. YMC

    YMC Well-Known Member

    Messages:
    2,787
    Likes Received:
    404
    Best Answers:
    4
    Trophy Points:
    190
    #13
    It seems very few of the free templates validate for directory scripts as well as many of the other CMS-type scripts.

    My only advice when presented with a huge list of errors is to simply start with the first one. Quite often it's not as bad as it first appears because when you fix one error, quite often a whole bunch of others get fixed at the same time.

    With the templates, I tend to keep the primary files open in my FTP software when I'm debugging and compare the source for the generated page being tested against each of the templates. Look for the static things like the div and table definitions as those won't go away when the page is generated and you can often start narrowing down the template and section of code that is causing the error.

    I also use what I call the "pickle test". When I'm not sure where and what the code is doing, I insert the word pickle and see where and if it shows up on the presented page. Not foolproof, but works fairly well as 'pickle' is not a word that would normally be found on any of my pages or used as a style name.

    I am a firm believer that it is worth doing and with you well with your efforts.
     
    YMC, Mar 15, 2008 IP
  14. hyper

    hyper Peon

    Messages:
    1,565
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    0
    #14
    True that. I saw this also in my case. A tag was not close, and after fixing it, 90% of the errors disappeared.

    :)
     
    hyper, Mar 15, 2008 IP
  15. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #15
    mikey1090 thanks and i think im going to use YMC's pickle test :)

    YMC your pickle test to help find things sounds useful, unless your joking, like in a bit of a pickle. :)
    What you mentioned about it not being as bad as it first looks, ive noticed that and read that on the forums recently where fixing one error can sort lots of the others.
     
    pipes, Mar 16, 2008 IP
  16. YMC

    YMC Well-Known Member

    Messages:
    2,787
    Likes Received:
    404
    Best Answers:
    4
    Trophy Points:
    190
    #16
    Nope, not kidding about the pickle test. I don't know why I chose that word other than I don't like pickles and perhaps I am using it in place of the words that better represent the frustration I'm feeling with having to debug a supposedly complete template. Whatever word you do pick, make sure it's one that is public-friendly(in case you forget to remove it or you are testing on a live install) and would be unlikely to be found on the page normally.

    I've used that test to figure out how the code is working on 2 different directory scripts, a picture gallery CMS, and a blogging platform. It's useful when trying to figure out if-then logic and even which template file impacts which page. It's not foolproof, but it works fairly well for me.

    Note to self - no more late night posts as I seem to not know the difference between with and wish. ;)
     
    YMC, Mar 16, 2008 IP
    pipes likes this.
  17. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #17
    Thanks YMC, i think this is all worth doing too, trying to keep the code as close to correct as it can be, because im reading and trying to learn about this, i keep coming accross many people who firmly believe to design, code and all that properly, it makes a lot of sense to me, rather than going in and fixing things later or realising something is completely messed up in another browser.
     
    pipes, Mar 16, 2008 IP
  18. YMC

    YMC Well-Known Member

    Messages:
    2,787
    Likes Received:
    404
    Best Answers:
    4
    Trophy Points:
    190
    #18
    I admit to perhaps a bit of ego also coming into play but I think by making the code as clean as possible it is easier to update and will hopefully not implode when the next version of browsers are released.
     
    YMC, Mar 16, 2008 IP
  19. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #19
    Pipes, YMC has given great advice with the pickle test. Its my favourite method of debugging any problem - whether template based or much more complex issues with php.
     
    mikey1090, Mar 16, 2008 IP
  20. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #20
    YMC yeah i can see the appeal when it comes to updating too and making it easier, Mike, thanks i appreciate the advice.
     
    pipes, Mar 16, 2008 IP