When questions are long, the table header in the backend that shows the overview of all responses gets very tall.
I tried to set a thead height with css, but only firefox accepts it, not chrome or IE.
So I thought I could shorten the questions in the header with a function:
<?PHP
$numwords = 8;
preg_match("/(\S+\s*){0,$numwords}/", $description, $regs);
$shortdesc = trim($regs[0]);
?>Now; this looks like the table header in browse.php I would need to truncate:
$tableheader .= "\t<thead><tr valign='top'>\n"
. "<th><input type='checkbox' id='selectall'></th>\n"
. "<th>".$clang->gT('Actions')."</th>\n";
foreach ($fnames as $fn)
{
if (!isset($currentgroup)) {$currentgroup = $fn[1]; $gbc = "oddrow";}
if ($currentgroup != $fn[1])
{
$currentgroup = $fn[1];
if ($gbc == "oddrow") {$gbc = "evenrow";}
else {$gbc = "oddrow";}
}
$tableheader .= "<th class='$gbc'>"
. FlattenText("$fn[1]")
. "</th>\n";
}
$tableheader .= "\t</tr></thead>\n\n";And I tried to add it in there somehow, without luck. Any tip?