print_simple_box_end();
}
- $table->tablealign = "right";
+ $table->tablealign = "center";
$table->align = array ("right", "left");
$table->wrap = array ("nowrap", "nowrap");
$table->cellpadding = 5;
$table->cellspacing = 0;
- $table->width = '100%';
+ $table->width = '40%';
$configdata = '<div class="adminlink"><a href="config.php">'.get_string('configvariables', 'admin').
'</a> - <span class="explanation">'.get_string('adminhelpconfigvariables').'</span></div>';
* <li>$table->wrap - An array of "nowrap"s or nothing
* <li>$table->data[] - An array of arrays containing the data.
* <li>$table->width - A percentage of the page
+ * <li>$table->tablealign - Align the whole table
* <li>$table->cellpadding - Padding on each cell
* <li>$table->cellspacing - Spacing between cells
* </ul>
$table->width = '80%';
}
+ if (empty($table->tablealign)) {
+ $table->tablealign = 'center';
+ }
+
if (empty($table->cellpadding)) {
$table->cellpadding = '5';
}
$tableid = empty($table->id) ? '' : 'id="'.$table->id.'"';
- print_simple_box_start('center', $table->width, '#ffffff', 0);
- echo '<table width="100%" border="0" align="center" ';
+ echo '<table width="'.$table->width.'" border="0" align="'.$table->tablealign.'" ';
echo " cellpadding=\"$table->cellpadding\" cellspacing=\"$table->cellspacing\" class=\"$table->class\" $tableid>\n";
$countcols = 0;
}
}
echo '</table>'."\n";
- print_simple_box_end();
return true;
}