PHP-Nuke and the validator
PHP-Nuke and the validator
I want to make my themes for php-nuke html compliant but a bulk of the code is in php and css. Do anyone have any tips or ideas for this project.
- MikeGale
- Rank VI - Professional
- Posts: 721
- Joined: Mon Dec 13, 2004 1:50 pm
- Location: Tannhauser Gate
I have developed content generation code that emits valid XHTML. This is not too hard when you do it from the start of a project.
I have also simply not used pre-developed code and rolled my own, several times. This to avoid importing foul mark-up.
Having said the negative things there may be some hope. I suggest:
1) Get to know the code and check whether tag generation is easily fixable. (I have in the past taken large bodies of code, written by others, and transformed it within a few hours. This achieved using multipage search and replace including RegEx search and replace. What is now called refactoring.) It may be that this is all you need to fix the majority of the issues.
2) If you do that and find it does a lot of the job, it is worth contacting the core developers and trying to roll your changes into the master distribution.
3) An approach that I know works is to use tools that scan markup and fix it, before sending it to the browser. I've only done this with .NET and performance might make it impractical for PHP. My obervation is that even with a tool like Chris Lovett's SGMLReader, some custom code is needed.
4) I haven't seen the CSS you're using. With some CSS I have been able to fix it without changing the markup at all, and quickly. With others I've decided the work is just too much and left the bad design. (A widespread problem is CSS that uses fixed font sizes which cannot be changed by the user. These can be time consuming to fix.)
I have also simply not used pre-developed code and rolled my own, several times. This to avoid importing foul mark-up.
Having said the negative things there may be some hope. I suggest:
1) Get to know the code and check whether tag generation is easily fixable. (I have in the past taken large bodies of code, written by others, and transformed it within a few hours. This achieved using multipage search and replace including RegEx search and replace. What is now called refactoring.) It may be that this is all you need to fix the majority of the issues.
2) If you do that and find it does a lot of the job, it is worth contacting the core developers and trying to roll your changes into the master distribution.
3) An approach that I know works is to use tools that scan markup and fix it, before sending it to the browser. I've only done this with .NET and performance might make it impractical for PHP. My obervation is that even with a tool like Chris Lovett's SGMLReader, some custom code is needed.
4) I haven't seen the CSS you're using. With some CSS I have been able to fix it without changing the markup at all, and quickly. With others I've decided the work is just too much and left the bad design. (A widespread problem is CSS that uses fixed font sizes which cannot be changed by the user. These can be time consuming to fix.)
Thanks for the fast reply and i now am sure to atleast upgrade to the standard cse. Your support seems to be top of the line. That is very very hard to find. Thanks my friend. If you do not mind i will post my journey through the valiadtion of php-nuke and maybe it will help other nuke community members will opt to use cse. Again thnks for the fast response.
- MikeGale
- Rank VI - Professional
- Posts: 721
- Joined: Mon Dec 13, 2004 1:50 pm
- Location: Tannhauser Gate
Hi nextegen,
I'm a user of CSE who thinks what you are thinking of is a very worthwhile venture. I'd like to see CMS applications produce better markup.
I look forward to seeing some details of how this goes.
It can be hard, so (after you've seen what is possible) I suggest setting easily reachable personal targets.
I'm a user of CSE who thinks what you are thinking of is a very worthwhile venture. I'd like to see CMS applications produce better markup.
I look forward to seeing some details of how this goes.
It can be hard, so (after you've seen what is possible) I suggest setting easily reachable personal targets.