From 23276de922b9527da4b933a92eb186f8a7d35445 Mon Sep 17 00:00:00 2001 From: CharlyCoste Date: Sun, 14 Mar 2010 00:43:47 +0100 Subject: [PATCH 1/8] Adding xhtml 1.0 strict doctype --- inc/templates/header.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/templates/header.php b/inc/templates/header.php index cad8c7f68e1..dbff30d8904 100755 --- a/inc/templates/header.php +++ b/inc/templates/header.php @@ -1,3 +1,5 @@ + ownCloud From d672bb88623974aeb1f22e62c7894e8365f4d5e9 Mon Sep 17 00:00:00 2001 From: CharlyCoste Date: Sun, 14 Mar 2010 00:46:28 +0100 Subject: [PATCH 2/8] Adding xml namespace --- inc/templates/header.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/templates/header.php b/inc/templates/header.php index dbff30d8904..e28fa4da9fb 100755 --- a/inc/templates/header.php +++ b/inc/templates/header.php @@ -1,6 +1,7 @@ - + + ownCloud From df612293fd8c70407843a76a5c73ff8530528a73 Mon Sep 17 00:00:00 2001 From: CharlyCoste Date: Sun, 14 Mar 2010 00:58:59 +0100 Subject: [PATCH 3/8] bgcolor is not a valid "xhtml1.0 strict" attribute. Replacing it by a css background-color --- css/default.css | 2 ++ inc/lib_base.php | 2 +- inc/templates/header.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/css/default.css b/css/default.css index 6158ee4a40d..7cc4aaa794c 100755 --- a/css/default.css +++ b/css/default.css @@ -1,3 +1,5 @@ +body {background-color: #F9F9F9;} +body.error {background-color: #F0F0F0;} body,th,td,ul,li,a,div,p,pre {color:#333333; font-family:Verdana,"Bitstream Vera Sans",Arial,Helvetica,Sans,"Bitstream Vera Serif"; font-size:9.0pt;} .nametext a {color:#333333; font-size:8pt; font-weight:bold; text-decoration:none;} diff --git a/inc/lib_base.php b/inc/lib_base.php index 1ae2bdab877..38821eed88c 100755 --- a/inc/lib_base.php +++ b/inc/lib_base.php @@ -190,7 +190,7 @@ class OC_DB { $DBConnection = @new mysqli($CONFIG_DBHOST, $CONFIG_DBUSER, $CONFIG_DBPWD,$CONFIG_DBNAME); if (mysqli_connect_errno()) { @ob_end_clean(); - echo('

can not connect to database.
'); + echo('

can not connect to database.
'); exit(); } } diff --git a/inc/templates/header.php b/inc/templates/header.php index e28fa4da9fb..5af86e72276 100755 --- a/inc/templates/header.php +++ b/inc/templates/header.php @@ -5,7 +5,7 @@ ownCloud - +
Date: Sun, 14 Mar 2010 01:33:49 +0100 Subject: [PATCH 4/8] center is not a valid strict xhtml1.0 tag (not semantic). At least, replacing it by a div with "center" class. --- css/default.css | 22 ++++++++++++++++++++++ inc/lib_base.php | 2 +- inc/lib_files.php | 8 ++++---- inc/lib_log.php | 4 ++-- inc/templates/header.php | 10 +++++----- plugins/music/index.php | 4 ++-- plugins/test/index.php | 4 ++-- settings/index.php | 4 ++-- 8 files changed, 40 insertions(+), 18 deletions(-) diff --git a/css/default.css b/css/default.css index 7cc4aaa794c..61d61bb2207 100755 --- a/css/default.css +++ b/css/default.css @@ -2,6 +2,28 @@ body {background-color: #F9F9F9;} body.error {background-color: #F0F0F0;} body,th,td,ul,li,a,div,p,pre {color:#333333; font-family:Verdana,"Bitstream Vera Sans",Arial,Helvetica,Sans,"Bitstream Vera Serif"; font-size:9.0pt;} +.center { + text-align:center; +} + +.center * { + margin-left:auto; + margin-right:auto; +} + +a#owncloud-logo { + margin-left:auto; + margin-right:auto; + display:block; + width:200px; + height:99px; + background: transparent url(/img/owncloud-logo-small.png) no-repeat scroll 0 0; +} + +a#owncloud-logo span { + display:none; +} + .nametext a {color:#333333; font-size:8pt; font-weight:bold; text-decoration:none;} .highlighttext {color:#333333; font-size:9pt; font-weight:bold; text-decoration:none;} .datetext {color:#333333; font-size:7pt;} diff --git a/inc/lib_base.php b/inc/lib_base.php index 38821eed88c..f4523228674 100755 --- a/inc/lib_base.php +++ b/inc/lib_base.php @@ -190,7 +190,7 @@ class OC_DB { $DBConnection = @new mysqli($CONFIG_DBHOST, $CONFIG_DBUSER, $CONFIG_DBPWD,$CONFIG_DBNAME); if (mysqli_connect_errno()) { @ob_end_clean(); - echo('

can not connect to database.
'); + echo('

can not connect to database.
'); exit(); } } diff --git a/inc/lib_files.php b/inc/lib_files.php index 0c3d84519c2..d00444ab09d 100755 --- a/inc/lib_files.php +++ b/inc/lib_files.php @@ -48,18 +48,18 @@ class OC_FILES { // breadcrumb if(count($dirs)>1) { - echo('
'); + echo('
'); echo(''); $currentdir=''; foreach($dirs as $d) { $currentdir.='/'.$d.''; if($d<>'') echo(''); } - echo('
home '.$d.'
'); + echo(''); } // files and directories - echo('
'); + echo('
'); $filesfound=false; if (is_dir($directory)) { if ($dh = opendir($directory)) { @@ -83,7 +83,7 @@ class OC_FILES { } echo('
'); if(!$filesfound) echo('
no files here'); - echo('
'); + echo(''); } diff --git a/inc/lib_log.php b/inc/lib_log.php index 4f34728ff1d..980011e05e2 100755 --- a/inc/lib_log.php +++ b/inc/lib_log.php @@ -59,7 +59,7 @@ class OC_LOG { */ public static function show(){ global $CONFIG_DATEFORMAT; - echo('
'); + echo('
'); $result = OC_DB::query('select timestamp,user,type,message from log order by timestamp desc limit 20'); $count=OC_DB::numrows($result); @@ -73,7 +73,7 @@ class OC_LOG { echo(''); echo(''); } - echo('
'.$entry['message'].'
'); + echo(''); OC_DB::free_result($result); } diff --git a/inc/templates/header.php b/inc/templates/header.php index 5af86e72276..387848ea6be 100755 --- a/inc/templates/header.php +++ b/inc/templates/header.php @@ -6,21 +6,21 @@ -
+
'); + echo('

'); OC_UTIL::showloginform(); - echo('
'); + echo(''); OC_UTIL::showfooter(); exit(); }else{ - echo('
'); + echo('
'); OC_UTIL::shownavigation(); - echo('
'); + echo(''); } diff --git a/plugins/music/index.php b/plugins/music/index.php index 9002a4052e7..622a89d7e7a 100755 --- a/plugins/music/index.php +++ b/plugins/music/index.php @@ -27,9 +27,9 @@ require_once('../../config/config.php'); OC_UTIL::showheader(); -echo('
'); +echo('
'); echo('nothing here yet :-)'); -echo('


'); +echo('

'); OC_UTIL::showfooter(); diff --git a/plugins/test/index.php b/plugins/test/index.php index 9002a4052e7..622a89d7e7a 100755 --- a/plugins/test/index.php +++ b/plugins/test/index.php @@ -27,9 +27,9 @@ require_once('../../config/config.php'); OC_UTIL::showheader(); -echo('
'); +echo('
'); echo('nothing here yet :-)'); -echo('


'); +echo('

'); OC_UTIL::showfooter(); diff --git a/settings/index.php b/settings/index.php index a5e3649e855..61296433673 100755 --- a/settings/index.php +++ b/settings/index.php @@ -26,9 +26,9 @@ require_once('../config/config.php'); OC_UTIL::showheader(); -echo('
'); +echo('
'); echo('nothing here yet :-)'); -echo('


'); +echo('

'); OC_UTIL::showfooter(); From ab0b552c80a34b38afbc01b9598d77677a7659fb Mon Sep 17 00:00:00 2001 From: CharlyCoste Date: Sun, 14 Mar 2010 01:38:07 +0100 Subject: [PATCH 5/8] Adding semantic h1 tag to surround the logo. This could be better for text or braille navigators and crawlers as well. --- inc/templates/header.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/templates/header.php b/inc/templates/header.php index 387848ea6be..efd235168bd 100755 --- a/inc/templates/header.php +++ b/inc/templates/header.php @@ -6,7 +6,7 @@ - +

Date: Sun, 14 Mar 2010 02:03:29 +0100 Subject: [PATCH 6/8]
is not a valid strict xhtml1.0 tag. Not semantic. Replacing it by CSS instructions on semantic tags. --- css/default.css | 12 ++++++++++-- inc/lib_base.php | 6 +++--- inc/lib_files.php | 2 +- inc/templates/footer.php | 2 -- inc/templates/header.php | 5 ++--- index.php | 2 +- plugins/music/index.php | 2 +- plugins/test/index.php | 2 +- settings/index.php | 2 +- 9 files changed, 20 insertions(+), 15 deletions(-) diff --git a/css/default.css b/css/default.css index 61d61bb2207..a3cbaab3123 100755 --- a/css/default.css +++ b/css/default.css @@ -2,6 +2,10 @@ body {background-color: #F9F9F9;} body.error {background-color: #F0F0F0;} body,th,td,ul,li,a,div,p,pre {color:#333333; font-family:Verdana,"Bitstream Vera Sans",Arial,Helvetica,Sans,"Bitstream Vera Serif"; font-size:9.0pt;} +h1 { + margin-bottom:1.5em; +} + .center { text-align:center; } @@ -11,6 +15,10 @@ body,th,td,ul,li,a,div,p,pre {color:#333333; font-family:Verdana,"Bitstream Vera margin-right:auto; } +div#nav { + margin-bottom:2em; +} + a#owncloud-logo { margin-left:auto; margin-right:auto; @@ -28,8 +36,8 @@ a#owncloud-logo span { .highlighttext {color:#333333; font-size:9pt; font-weight:bold; text-decoration:none;} .datetext {color:#333333; font-size:7pt;} .sizetext {color:#333333; font-size:7pt;} -.footer {color:#999999; text-align:center; font-size:9pt;} -.hint {color:#AAAAAA; text-align:center; font-size:8pt;} +.footer {color:#999999; text-align:center; font-size:9pt; margin-top:4em;} +.hint {color:#AAAAAA; text-align:center; font-size:8pt; margin-top:4em; margin-bottom:2em;} .hint a{color:#AAAAAA; text-align:center; font-size:8pt;} .formstyle { diff --git a/inc/lib_base.php b/inc/lib_base.php index f4523228674..b8d5bcb9ed4 100755 --- a/inc/lib_base.php +++ b/inc/lib_base.php @@ -190,14 +190,14 @@ class OC_DB { $DBConnection = @new mysqli($CONFIG_DBHOST, $CONFIG_DBUSER, $CONFIG_DBPWD,$CONFIG_DBNAME); if (mysqli_connect_errno()) { @ob_end_clean(); - echo('

can not connect to database.
'); + echo('
can not connect to database.
'); exit(); } } $result = @$DBConnection->query($cmd); if (!$result) { - $entry='DB Error: "'.$DBConnection->error.'"
'; - $entry.='Offending command was: '.$cmd.'
'; + $entry='

DB Error: "'.$DBConnection->error.'"

'; + $entry.='

Offending command was: '.$cmd.'

'; echo($entry); } return $result; diff --git a/inc/lib_files.php b/inc/lib_files.php index d00444ab09d..39d48c13a97 100755 --- a/inc/lib_files.php +++ b/inc/lib_files.php @@ -82,7 +82,7 @@ class OC_FILES { } } echo(''); - if(!$filesfound) echo('
no files here'); + if(!$filesfound) echo('

no files here

'); echo(''); } diff --git a/inc/templates/footer.php b/inc/templates/footer.php index 138d563658a..9771c797787 100755 --- a/inc/templates/footer.php +++ b/inc/templates/footer.php @@ -1,5 +1,3 @@ -
-
'); + echo('
'); OC_UTIL::showloginform(); echo('
'); OC_UTIL::showfooter(); exit(); }else{ - echo('
'); + echo(''); } ?> -
diff --git a/index.php b/index.php index 5f7eb8e12ba..b33d3502bd6 100755 --- a/index.php +++ b/index.php @@ -39,7 +39,7 @@ if(isset($_GET['file'])) { OC_FILES::showbrowser($CONFIG_DATADIRECTORY,$dir); - echo('

Hint: Mount it via webdav like this: webdav://'.$_SERVER["HTTP_HOST"].'/webdav/owncloud.php

'); + echo('

Hint: Mount it via webdav like this: webdav://'.$_SERVER["HTTP_HOST"].'/webdav/owncloud.php

'); OC_UTIL::showfooter(); diff --git a/plugins/music/index.php b/plugins/music/index.php index 622a89d7e7a..f9a7c8a2e88 100755 --- a/plugins/music/index.php +++ b/plugins/music/index.php @@ -29,7 +29,7 @@ OC_UTIL::showheader(); echo('
'); echo('nothing here yet :-)'); -echo('


'); +echo('
'); OC_UTIL::showfooter(); diff --git a/plugins/test/index.php b/plugins/test/index.php index 622a89d7e7a..f9a7c8a2e88 100755 --- a/plugins/test/index.php +++ b/plugins/test/index.php @@ -29,7 +29,7 @@ OC_UTIL::showheader(); echo('
'); echo('nothing here yet :-)'); -echo('


'); +echo('
'); OC_UTIL::showfooter(); diff --git a/settings/index.php b/settings/index.php index 61296433673..467e0ad9632 100755 --- a/settings/index.php +++ b/settings/index.php @@ -28,7 +28,7 @@ OC_UTIL::showheader(); echo('
'); echo('nothing here yet :-)'); -echo('


'); +echo(''); OC_UTIL::showfooter(); From 2eafb444e3163351093cf860e60a15068ed870e0 Mon Sep 17 00:00:00 2001 From: CharlyCoste Date: Sun, 14 Mar 2010 02:14:13 +0100 Subject: [PATCH 7/8] "border" attribute is not a valid attribute for tags. Using proper CSS instructions instead. --- css/default.css | 8 ++++++++ inc/lib_base.php | 2 +- inc/lib_files.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/css/default.css b/css/default.css index a3cbaab3123..ede77ec0dde 100755 --- a/css/default.css +++ b/css/default.css @@ -2,6 +2,10 @@ body {background-color: #F9F9F9;} body.error {background-color: #F0F0F0;} body,th,td,ul,li,a,div,p,pre {color:#333333; font-family:Verdana,"Bitstream Vera Sans",Arial,Helvetica,Sans,"Bitstream Vera Serif"; font-size:9.0pt;} +a img { + border:none; +} + h1 { margin-bottom:1.5em; } @@ -78,6 +82,10 @@ a#owncloud-logo span { text-decoration:none; } +.navigationitem1 img { + border:none; +} + .navigationitem1:hover { background-color: #EEEEEE; } diff --git a/inc/lib_base.php b/inc/lib_base.php index b8d5bcb9ed4..8fc8e7955b6 100755 --- a/inc/lib_base.php +++ b/inc/lib_base.php @@ -133,7 +133,7 @@ class OC_UTIL { */ public static function shownavigation(){ echo(''); - echo(''); + echo(''); if($_SERVER['SCRIPT_NAME']=='/index.php') echo(''); else echo(''); foreach(OC_UTIL::$NAVIGATION as $NAVI) { diff --git a/inc/lib_files.php b/inc/lib_files.php index 39d48c13a97..ab0a5252982 100755 --- a/inc/lib_files.php +++ b/inc/lib_files.php @@ -53,7 +53,7 @@ class OC_FILES { $currentdir=''; foreach($dirs as $d) { $currentdir.='/'.$d.''; - if($d<>'') echo(''); + if($d<>'') echo(''); } echo('
 '.$d.' '.$d.'
'); } From 740bcf5c7200dd11181b6305839725a8eca3ad29 Mon Sep 17 00:00:00 2001 From: CharlyCoste Date: Sun, 14 Mar 2010 02:21:36 +0100 Subject: [PATCH 8/8] tags need alternative content with "alt" attribute. "dots.png" is not a content. Using CSS backgrounds instead. --- css/default.css | 2 ++ inc/lib_base.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/css/default.css b/css/default.css index ede77ec0dde..be4ffd0bc1f 100755 --- a/css/default.css +++ b/css/default.css @@ -80,6 +80,8 @@ a#owncloud-logo span { .navigationitem1 a{ text-decoration:none; + padding-right:15px; + background: transparent url(/img/dots.png) no-repeat scroll center right; } .navigationitem1 img { diff --git a/inc/lib_base.php b/inc/lib_base.php index 8fc8e7955b6..cfa2d75effc 100755 --- a/inc/lib_base.php +++ b/inc/lib_base.php @@ -133,7 +133,7 @@ class OC_UTIL { */ public static function shownavigation(){ echo(''); - echo(''); + echo(''); if($_SERVER['SCRIPT_NAME']=='/index.php') echo(''); else echo(''); foreach(OC_UTIL::$NAVIGATION as $NAVI) {