From: Mike N. <mh...@us...> - 2004-04-03 18:31:41
|
Everyone, I'm not sure how useful you'll find this, but here it is anyway. This sets the doctype and server side charset. The <meta content-type set by layout is redundant with this setup. This solution should work with Mozilla and IE. Feedback is appreciated. Don, Thank you for helping me with the php code. :-) mod/layout/conf/config.php define("ALLOW_THEME_PHP_INSERTION", TRUE); theme.php <?php if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ header("Content-Ty pe: application/xhtml+xml; charset=UTF-8"); $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; } else { header("Content-Type: text/html; charset=UTF-8"); $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN \" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; } ?> theme.tpl -- first line must be {DOCTYPE} Ref. HTML Declarations http://www.htmldog.com/guides/htmladvanced/declarations/ -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |
From: Mike N. <mh...@us...> - 2004-04-03 21:09:24
|
Everyone, The method below is also a good xhtml well-formed debugging tool when used with Mozilla/Firefox. On Sat, 2004-04-03 at 10:31, Mike Noyes wrote: > I'm not sure how useful you'll find this, but here it is anyway. This > sets the doctype and server side charset. The <meta content-type set by > layout is redundant with this setup. This solution should work with > Mozilla and IE. Feedback is appreciated. > > Don, > Thank you for helping me with the php code. :-) > > > mod/layout/conf/config.php > define("ALLOW_THEME_PHP_INSERTION", TRUE); > > theme.php > <?php > if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ > header("Content-Ty > pe: application/xhtml+xml; charset=UTF-8"); > $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> > <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" > \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; > } else { header("Content-Type: text/html; charset=UTF-8"); > $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 > Strict//EN > \" > \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; > } > ?> > > theme.tpl -- first line must be > {DOCTYPE} > > > Ref. HTML Declarations > http://www.htmldog.com/guides/htmladvanced/declarations/ -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |
From: Mike N. <mh...@us...> - 2004-04-03 23:51:56
|
Everyone, Even better, set the else doctype to transitional, and you can still use validator.w3.org. Enjoy. :-) On Sat, 2004-04-03 at 13:08, Mike Noyes wrote: > The method below is also a good xhtml well-formed debugging tool when > used with Mozilla/Firefox. > On Sat, 2004-04-03 at 10:31, Mike Noyes wrote: > > theme.php > > <?php > > if(stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml")){ > > header("Content-Ty > > pe: application/xhtml+xml; charset=UTF-8"); > > $THEME["DOCTYPE"] = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> > > <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" > > \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">"; > > } else { header("Content-Type: text/html; charset=UTF-8"); > > $THEME["DOCTYPE"] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 > > Strict//EN > > \" > > \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"; > > } > > ?> -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |
From: Mike N. <mh...@us...> - 2004-04-05 16:36:40
|
On Sat, 2004-04-03 at 10:31, Mike Noyes wrote: > Ref. HTML Declarations > http://www.htmldog.com/guides/htmladvanced/declarations/ Everyone, Here is another reference that describes the issues theme.php attempts to solve. Serving XHTML 1.0 XHTML & MIME types 'Standards' vs 'Quirks' modes The XML declaration http://www.w3.org/International/articles/serving-xhtml/Overview.html -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |
From: Mike N. <mh...@us...> - 2004-04-06 22:28:34
|
On Sat, 2004-04-03 at 10:31, Mike Noyes wrote: > I'm not sure how useful you'll find this, but here it is anyway. This > sets the doctype and server side charset. The <meta content-type set by > layout is redundant with this setup. This solution should work with > Mozilla and IE. Feedback is appreciated. Everyone, These files are now in the -comm cvs repository. Enjoy. http://cvs.sourceforge.net/viewcvs.py/phpwebsite-comm/themes/debug/ -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |
From: Mike N. <mh...@us...> - 2004-04-08 21:00:56
|
Everyone, I apologize for the long post in advance. The SF.net tracker is mangling the diffs I post in comments, and attaching files isn't working either. [ 931892 ] xhtml well-formed issue: EZform.php Index: EZform.php =================================================================== RCS file: /home/cvsroot/phpwebsite/core/EZform.php,v retrieving revision 1.63 diff -u -r1.63 EZform.php --- EZform.php 9 Mar 2004 18:53:13 -0000 1.63 +++ EZform.php 8 Apr 2004 20:46:38 -0000 @@ -659,7 +659,7 @@ } else $template[strtoupper($elementName)] = $formElement; } - $template["DEFAULT_SUBMIT"] = "<input type=\"submit\" value=\"Submit\">\n"; + $template["DEFAULT_SUBMIT"] = "<input type=\"submit\" value=\"Submit\" />\n"; if (isset($this->_action)) $template["END_FORM"] = "</form>\n"; [ 931897 ] xhtml well-formed issue: branch Index: manage.tpl =================================================================== RCS file: /home/cvsroot/branch/templates/manage.tpl,v retrieving revision 1.1 diff -u -r1.1 manage.tpl --- manage.tpl 22 Nov 2002 18:57:13 -0000 1.1 +++ manage.tpl 8 Apr 2004 20:50:04 -0000 @@ -1,5 +1,6 @@ <table cellpadding="5" width="100%"> <tr class="bg_medium"> <td width="25%"><b>Branch Name</b></td><td><b>Commands</b></td> + </tr> {BRANCHES} </table> Index: panel.tpl =================================================================== RCS file: /home/cvsroot/branch/templates/panel.tpl,v retrieving revision 1.2 diff -u -r1.2 panel.tpl --- panel.tpl 22 Nov 2002 18:57:19 -0000 1.2 +++ panel.tpl 8 Apr 2004 20:51:00 -0000 @@ -2,5 +2,5 @@ <tr class="bg_light"> <td>{CREATE}</td> <td>{MANAGE}</td> -<tr> +</tr> </table> [ 931911 ] xhtml well-formed issue: language Index: adminMenu.tpl =================================================================== RCS file: /home/cvsroot/language/templates/adminMenu.tpl,v retrieving revision 1.4 diff -u -r1.4 adminMenu.tpl --- adminMenu.tpl 31 Oct 2002 17:59:03 -0000 1.4 +++ adminMenu.tpl 8 Apr 2004 20:53:03 -0000 @@ -1,7 +1,7 @@ <table cellpadding="6" cellspacing="0" border="0" width="100%%"> <tr class="bg_light"> - <td colspan="2" valign="top">{CREATE}<td> + <td colspan="2" valign="top">{CREATE}</td> </tr> <tr valign="top"> <td width="15%">{LANG_HELP}<b>{LANGUAGE}:</b></td> @@ -13,7 +13,7 @@ {REMOVE}</td> </tr> <tr class="bg_light"> - <td width="15%" valign="top"><b>{IMP_EXP_HELP}{IMPORT_EXPORT}:</b> + <td width="15%" valign="top"><b>{IMP_EXP_HELP}{IMPORT_EXPORT}:</b></td> <td width="20%">{MODULE}</td> <td width="65%" valign="top">{IMPORT_BUTTON} {EXPORT_BUTTON}</td> </tr> [ 931953 ] xhtml well-formed issue: users Index: manageUsers.tpl =================================================================== RCS file: /home/cvsroot/users/templates/forms/manageUsers.tpl,v retrieving revision 1.3 diff -u -r1.3 manageUsers.tpl --- manageUsers.tpl 24 Feb 2003 14:49:20 -0000 1.3 +++ manageUsers.tpl 8 Apr 2004 20:56:15 -0000 @@ -16,6 +16,6 @@ <td align="left" width="20%"><b>{LIMIT}</b><br />{LIMIT_LINK}</td> <td align="center" width="60%">{PAGES}</td> <td align="right" width="20%"><b>{SEARCH}</b> {SEARCH_FORM}{SEARCH_BUTTON}</td> - </td> + </tr> </table> Index: Forms.php =================================================================== RCS file: /home/cvsroot/users/class/Forms.php,v retrieving revision 1.58 diff -u -r1.58 Forms.php --- Forms.php 2 Apr 2004 20:10:46 -0000 1.58 +++ Forms.php 8 Apr 2004 20:57:26 -0000 @@ -87,13 +87,13 @@ $count = 0; if (!empty($userList)) - $pagedUsers = PHPWS_Array::paginateDataArray($userList, "index.php?module=users&user_op=manageUsers", $_SESSION["manageOptions"]["limit"], TRUE, $curr_sec_decor = array("<b>[ ", " ]</b>"), NULL, 10, TRUE); + $pagedUsers = PHPWS_Array::paginateDataArray($userList, "index.php?module=users&user_op=manageUsers", $_SESSION["manageOptions"]["limit"], TRUE, $curr_sec_decor = array("<b>[ ", " ]</b>"), NULL, 10, TRUE); $alphabet = PHPWS_User::alphabet(); $GLOBALS["CNT_user"]["title"] = $_SESSION["translate"]->it("Manage Users"); - $template["ALPHABET"] = PHPWS_Text::moduleLink($_SESSION["translate"]->it("ALL"), "users", array("user_op"=>"manageUsers", "manageLetter"=>"all") ) . " \n"; + $template["ALPHABET"] = PHPWS_Text::moduleLink($_SESSION["translate"]->it("ALL"), "users", array("user_op"=>"manageUsers", "manageLetter"=>"all") ) . " \n"; foreach ($alphabet as $alphachar) - $template["ALPHABET"] .= PHPWS_Text::moduleLink($alphachar, "users", array("user_op"=>"manageUsers", "manageLetter"=>$alphachar) ) . " \n"; + $template["ALPHABET"] .= PHPWS_Text::moduleLink($alphachar, "users", array("user_op"=>"manageUsers", "manageLetter"=>$alphachar) ) . " \n"; if (!empty($userList)){ @@ -772,4 +772,4 @@ } } } -?> \ No newline at end of file +?> [ 931970 ] xhtml well-formed issue: Array.php Index: Array.php =================================================================== RCS file: /home/cvsroot/phpwebsite/core/Array.php,v retrieving revision 1.30 diff -u -r1.30 Array.php --- Array.php 30 Oct 2003 18:00:33 -0000 1.30 +++ Array.php 8 Apr 2004 20:59:47 -0000 @@ -394,7 +394,7 @@ $nav_links .= ">>\n"; $section_info = ($start + 1) . " - " . ($start + $item_count) . " of " . $numrows . "\n"; } else { - $nav_links .= "<a href=\"" . $link_back . "&PDA_limit=" . $limit . "&PDA_start=" . ($start + $limit) . "&PDA_section=" . ($current_section + 1) . "\" class=\"" . $link_class . "\" alt=\">>\">>></a>\n"; + $nav_links .= "<a href=\"" . $link_back . "&PDA_limit=" . $limit . "&PDA_start=" . ($start + $limit) . "&PDA_section=" . ($current_section + 1) . "\" class=\"" . $link_class . "\" alt=\">>\">>></a>\n"; $section_info = ($start + 1) . " - " . ($start + $limit) . " of " . $numrows . "\n"; } -- Mike Noyes <mhnoyes at users.sourceforge.net> http://sourceforge.net/users/mhnoyes/ SF.net Projects: ffl, leaf, phpwebsite, phpwebsite-comm, sitedocs |