Skip to content

Commit

Permalink
MDL-7953 xhtml compliance in messaging - first step
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Dec 18, 2006
1 parent fd9b61e commit 0d3bb48
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 20 deletions.
14 changes: 7 additions & 7 deletions message/discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
<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>
7 changes: 4 additions & 3 deletions message/history.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 />';
Expand Down Expand Up @@ -84,5 +84,6 @@
print_heading(get_string('nomessagesfound', 'message'));
}

print_footer('none');

?>
3 changes: 2 additions & 1 deletion message/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,6 @@
}

echo '</td> </tr> </table>';
echo ' </body> </html>';
print_footer('none');

?>
8 changes: 4 additions & 4 deletions message/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions message/send.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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">';
Expand Down
4 changes: 2 additions & 2 deletions message/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>';
Expand Down Expand Up @@ -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

?>

0 comments on commit 0d3bb48

Please sign in to comment.