]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7953 xhtml compliance in messaging - first step
authorskodak <skodak>
Mon, 18 Dec 2006 09:04:33 +0000 (09:04 +0000)
committerskodak <skodak>
Mon, 18 Dec 2006 09:04:33 +0000 (09:04 +0000)
message/discussion.php
message/history.php
message/index.php
message/lib.php
message/send.php
message/user.php

index 29ec2e7df24e815ea737738f12589a49149d02a3..d0211aaaf66f0bc24396387951507f11ec99e3b5 100644 (file)
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title>
      </head>
-     <frameset rows="110,*,0,200" border="0" marginwidth="2" marginheight="1">
+     <frameset rows="110,*,0,200">
+       <noframes><body>Sorry, but support for Frames is required to use Messaging</body></noframes>
+
        <frame src="user.php?id=<?php p($user->id)?>&amp;frame=user"     name="user"     
-              scrolling="no"  marginwidth="0" marginheight="">
+              scrolling="no"  marginwidth="0" marginheight="0" frameborder="0" />
        <frame src="messages.php"  name="messages" 
-              scrolling="yes" marginwidth="10" marginheight="10">
+              scrolling="yes" marginwidth="10" marginheight="10" frameborder="0" />
        <frame src="refresh.php?id=<?php p($user->id)?>&amp;name=<?php echo urlencode(fullname($user)) ?>"  name="refresh" 
-              scrolling="no"  marginwidth="0" marginheight="0">
+              scrolling="no"  marginwidth="0" marginheight="0" frameborder="0" />
        <frame src="send.php?id=<?php p($user->id)?>"     name="send" 
-              scrolling="no"  marginwidth="2" marginheight="2">
+              scrolling="no"  marginwidth="2" marginheight="2" frameborder="0" />
      </frameset>
-     <noframes>Sorry, but support for Frames is required to use Messaging</noframes>
-
     </html>
index 68fc4929e58e1262aeaad7669629323f39692ac6..3851fee2a043797d9f05f794247b000ed8b82775 100644 (file)
@@ -35,7 +35,7 @@
 
 /// Our two users are defined - let's set up the page
 
-    print_header(get_string('messagehistory', 'message'), '', '', '', '<base target="_blank">');
+    print_header(get_string('messagehistory', 'message'), '', '', '', '<base target="_blank" />');
 
 /// Print out a heading including the users we are looking at
 
@@ -46,8 +46,8 @@
     echo fullname($user1);
     echo '</td>';
     echo '<td align="center">';
-    echo '<img src="'.$CFG->wwwroot.'/pix/t/left.gif" alt="'.get_string('from').'">';
-    echo '<img src="'.$CFG->wwwroot.'/pix/t/right.gif" alt="'.get_string('to').'">';
+    echo '<img src="'.$CFG->wwwroot.'/pix/t/left.gif" alt="'.get_string('from').'" />';
+    echo '<img src="'.$CFG->wwwroot.'/pix/t/right.gif" alt="'.get_string('to').'" />';
     echo '</td>';
     echo '<td align="center">';
     echo print_user_picture($user2->id, SITEID, $user2->picture, 100, true, true, 'userwindow').'<br />';
@@ -84,5 +84,6 @@
         print_heading(get_string('nomessagesfound', 'message'));
     }
 
+    print_footer('none');
 
 ?>
index b9f93314ede614cd219cb5eb4e7d2df98b46782c..9bdf89cda926dd4332d0802d77dbefd6c4824ad4 100644 (file)
@@ -88,5 +88,6 @@
     }
 
     echo '</td> </tr> </table>';
-    echo ' </body> </html>';
+    print_footer('none');
+
 ?>
index 3a738fd0cf67c467ea4f44e84334e750a8c04f1f..91082316ec54a776d236761b50477e82694dd171 100644 (file)
@@ -591,8 +591,8 @@ function message_contact_link($userid, $linktype='add', $return=false, $script="
 
     $output = '<span class="'.$linktype.'">'.
               '<a href="'.$script.'&amp;'.$command.'='.$userid.
-              '&amp;sesskey='.sesskey().'" title="'.$string.'">'.
-              '<img src="'.$CFG->pixpath.$icon.'" height="11" width="11" border="0" alt="'.$string.'">'.
+              '&amp;sesskey='.sesskey().'" title="'.s($string).'">'.
+              '<img src="'.$CFG->pixpath.$icon.'" height="11" width="11" border="0" alt="'.s($string).'" />'.
               $text.'</a></span>';
 
     if ($return) {
@@ -623,9 +623,9 @@ function message_history_link($userid1, $userid2=0, $returnstr=false, $keywords=
     }
 
     if ($linktext == 'icon') {  // Icon only
-        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0" alt="'.$strmessagehistory.'">';
+        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0" alt="'.$strmessagehistory.'" />';
     } else if ($linktext == 'both') {  // Icon and standard name
-        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0" alt="'.$strmessagehistory.'">';
+        $fulllink = '<img src="'.$CFG->pixpath.'/t/log.gif" height="11" width="11" border="0" alt="'.$strmessagehistory.'" />';
         $fulllink .= '&nbsp;'.$strmessagehistory;
     } else if ($linktext) {    // Custom name
         $fulllink = $linktext;
index 152555bed8aaf015d8de3df9b17c1c951a37b022..aea5d2fdd18a33ec0cd69a11c47c8938cbb8db59 100644 (file)
@@ -27,8 +27,8 @@
     }
 
     @header('Content-Type: text/html; charset=utf-8');
-    echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n";
-    echo "<html $direction>\n<head>\n";
+    echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
+    echo "<html $direction xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n";
     echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
     echo $stylesheetshtml;
 
@@ -85,7 +85,7 @@
         add_to_log(SITEID, 'message', 'write', 'history.php?user1='.$user->id.'&amp;user2='.$USER->id.'#m'.$messageid, $user->id);
     }
 
-    echo '</head>';
+    echo '<title></title></head>';
 
 
     echo '<body class="message course-1" id="message-send">';
index 13c213cb595dfc2f4caf95bfb5817cb418eaa013..98846c3717f1d9831ad5fee3bb6c823985959631 100644 (file)
@@ -49,7 +49,7 @@
         message_unblock_contact($unblockcontact);
     }
 
-    print_header('','','','','',false,'','',false,'leftmargin="2" topmargin="2" marginwidth="2" marginheight="2"');
+    print_header('','','','','',false,'','',false,'');
     echo '<table width="100%" cellpadding="0" cellspacing="0"><tr>';
     echo '<td width="100">';
     echo print_user_picture($user->id, SITEID, $user->picture, true, true, true, 'userwindow').'</td>';
@@ -87,6 +87,6 @@
 
     echo '</td></tr></table>';
 
-    echo '</table></table></body>'; // Close possible theme tables off
+    echo '</div></div></body></html>'; // Close possible theme tables off
 
 ?>