MDL-8105 some more icon class fixes including new .iconhelp for help and docs icon

This commit is contained in:
skodak 2007-01-08 20:30:38 +00:00
parent c90edfe168
commit 0f13ec8f9b
19 changed files with 131 additions and 114 deletions

View file

@ -53,6 +53,7 @@ function string_file_picture_algebra($imagefile, $tex= "", $height="", $width=""
$output = "";
$origtex = $tex;
$style = 'style="border:0px; vertical-align:'.$align.';';
if ($tex) {
$tex = str_replace('&','&',$tex);
$tex = str_replace('<','&lt;',$tex);
@ -62,11 +63,12 @@ function string_file_picture_algebra($imagefile, $tex= "", $height="", $width=""
$title = "title=\"$tex\"";
}
if ($height) {
$height = "height=\"$height\"";
$style .= " height:{$height}px;";
}
if ($width) {
$width = "width=\"$width\"";
$style .= " width:{$width}px;";
}
$style .= '"';
if ($imagefile) {
if (!file_exists("$CFG->dataroot/$CFG->algebrafilterdir/$imagefile") && has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
$output .= "<a href=\"$CFG->wwwroot/$CFG->algebrafilterdir/algebradebug.php\">";
@ -77,13 +79,13 @@ function string_file_picture_algebra($imagefile, $tex= "", $height="", $width=""
$output .= urlencode($tex) . "', 'popup', 'menubar=0,location=0,scrollbars,";
$output .= "resizable,width=300,height=240', 0);\">";
}
$output .= "<img border=\"0\" $title $height $width alt=\"".s($origtex)."\" src=\"";
$output .= "<img $title alt=\"".s($origtex)."\" src=\"";
if ($CFG->slasharguments) { // Use this method if possible for better caching
$output .= "$CFG->wwwroot/$CFG->algebrafilterdir/pix.php/$imagefile";
} else {
$output .= "$CFG->wwwroot/$CFG->algebrafilterdir/pix.php?file=$imagefile";
}
$output .= "\" style=\"vertical-align:$align\" />";
$output .= "\" $style />";
$output .= "</a>";
} else {
$output .= "Error: must pass URL or course";