Page 1 of 1

Make better code !

Posted: Thu Oct 28, 2004 9:05 am
by piratos
Input , Output that are the things why a programmer had a lot of work.

But only a good input is only the half work.

Do not make the mistakes of other cms - systems !

A fresh installed 0.7.1 shows 8 errors with the w3c validator 0.6.7, the admin-page 5 errors.

The cms is xhtml 1.0 trans the adminpages 4.01 trans.

100% correct html increase the speed of a complex web about 40% and there is no random view given by the browser.

So it is commendable to install the w3c - validator local and check the output by the fly if you are at work.

Make better code !

Posted: Thu Oct 28, 2004 4:26 pm
by piratos
i have you send a mail with changes in htmlarea.js, page.functions.php and editcontent.php.

So admin-> Content Managment -> Edit Content is 100% valid html.

Make better code !

Posted: Thu Oct 28, 2004 4:32 pm
by Ted
Cool. Thanks. I'll put them up later on today.

Make better code !

Posted: Thu Oct 28, 2004 7:35 pm
by piratos
Here are the errors viewed by index.php (fresh install).



Line 201, column 75: document type does not allow element "link" here

...layers/layersmenu-cms.css" type="text/css">


----------------------

And this is the reason in function.dhtmlmenu.php - link was set within the body not in the mety-tags - plugin must be changed !

$text = '
etc etc,
-----------------------------------------------------------------------------------------------

Another html errors with index.php

..cmsmodule_1_type=rss&CMSSESSID=dc75e7a74f228eda09419cdea2feddd5"><img
It was the &CMSSESSID - must be & ....
I don't find it (module.functions.php ??)

Make better code !

Posted: Sat Oct 30, 2004 11:38 am
by piratos
I have send ypu a new bulletmenu with little images.

It works without ul and li and with separator without xhtml - errors by itself.

I have found the bug

Posted: Sat Oct 30, 2004 4:59 pm
by piratos
I have found it in lib/module.functions.php

wrong:
function cms_mapi_register_execute_function($name, $function) {
global $gCms;
$cmsmodules = &$gCms->modules;
if (isset($cmsmodules[$name])) {
$cmsmodules[$name]['execute_function'] = $function;
}
}

correct
function cms_mapi_register_execute_function($name, $function) {
global $gCms;
$cmsmodules = $gCms->modules;
if (isset($cmsmodules[$name])) {
$cmsmodules[$name]['execute_function'] = $function;
}
}

Compliance still bad...

Posted: Wed Nov 24, 2004 2:51 pm
by Knaldgas
Hi all,

I have just done a fresh install of 0.7.3, and it seems like there's still some issues to be compliant :oops:
Should be pretty straight forward to check: http://validator.w3.org/ and enter your favorite CMS Made Simple site.

Any chance of this is being fixed?

/Knaldgas

Make better code !

Posted: Wed Nov 24, 2004 3:38 pm
by Akrabat
I only see two errors:

1. a section in the (due to dhtmlmenu)
2. problems with PHP auto addition of SESSION ID to every link.


According to http://martin.f2o.org/php/session, PHP's transparent session support should be turned off anyway, so I did in .htaccess :) Adding ini_set('session.use_trans_sid', false); just before calling session_start() would also work.

The {dhtmlmenu} problem is not easy to fix though :(