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.
I do it yeah. My latest directory is valid. If like me, you know what you're doing then its really easy.
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?
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
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.
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.
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
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 ) Thanks, hyyyyyyper
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.
True that. I saw this also in my case. A tag was not close, and after fixing it, 90% of the errors disappeared.
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.
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.
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.
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.
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.
YMC yeah i can see the appeal when it comes to updating too and making it easier, Mike, thanks i appreciate the advice.