$url = substr($url, strlen($CFG->wwwroot));
}
- $link = '<a target="'. $name .'" title="'. s($title) .'" href="'. $CFG->wwwroot . $url .'" '.
- "onclick=\"return openpopup('$url', '$name', '$options', $fullscreen);\">$linkname</a>";
+ $link = '<a title="'. s($title) .'" href="'. $CFG->wwwroot . $url .'" '.
+ "onclick=\"this.target='$name'; return openpopup('$url', '$name', '$options', $fullscreen);\">$linkname</a>";
if ($return) {
return $link;
} else {
* @param int $size The size to set the font for text display.
*/
function print_headline($text, $size=2, $return=false) {
- $output = print_heading($text, 'left', $size, true);
+ $output = print_heading($text, '', $size, true);
if ($return) {
return $output;
} else {
$output = '';
- if ($color) {
- $color = 'bgcolor="'. $color .'"';
- }
+ $tableclasses = $class;
+
if ($align) {
- $align = 'align="'. $align .'"';
+ $tableclasses .= ' boxalign'.$align; // Implement alignment using a class
}
if ($width) {
- $width = 'width="'. $width .'"';
+ $width = ' style="width:'.$width.'"';
}
if ($id) {
- $id = 'id="'. $id .'"';
+ $id = 'id="'.$id.'"';
}
- $output .= "<table $align $width $id class=\"$class\" border=\"0\" cellpadding=\"$padding\" cellspacing=\"0\">".
- "<tr><td $color class=\"$class"."content\">";
+ if ($color) {
+ $color = ' style="background:'.$color.'"';
+ }
+
+ $output .= '<table'.$width.' '.$id.' class="'.$tableclasses.'">'.
+ '<tr><td'.$color.' class="'.$class.'content">';
if ($return) {
return $output;