While support across browsers can be tricky, most things can be done.
I find 'A List Apart' to be a great source of css layout tips and tricks.
Here's a good article dealing with background colour for columns.
Faux Columns at A List Apart
$modversion['blocks'][5]['file'] = "debug_mode.php";
$modversion['blocks'][5]['name'] = 'Debug Mode';
$modversion['blocks'][5]['description'] = 'pick list to change debug mode';
$modversion['blocks'][5]['show_func'] = "display_debug_options";
$modversion['blocks'][5]['template'] = 'debug_mode.html';
// Change this path depending on which module you incorporate this block into.
$modversion['blocks'][5]['options'] = '/modules/noah/blocks/change_debug_mode.php';
function display_debug_options($options)
{
// could pull this from the database but I'm lazy
$debug_modes = array('0|off','1|php debug','2|smarty debug','3|blocks/sql');
$block['path'] = $options[0];
$i = 0;
foreach ( $debug_modes as $k=>$v )
{
$n = explode('|', $v);
$block['modes'][$i]['value'] = $n[0];
$block['modes'][$i]['label'] = $n[1];
$i += 1;
}
return $block;
}
require('../header.php');
// We must always set our main template before including the header
// I've just used a blank template here but you could
// include one that reported errors if there are any.
$xoopsOption['template_main'] = 'blank.html';
// Include the page header
include(XOOPS_ROOT_PATH.'/header.php');
// Assing the message for our blank module
if ( $_POST['debug_modes'] )
{
change_debug_mode($options, $_POST['debug_modes']);
}
// Include the page footer
include(XOOPS_ROOT_PATH.'/footer.php');
// The function which makes the update
function change_debug_mode($options, $new_mode='')
{
global $xoopsDB;
if ( $new_mode != '' )
{
$sql = "UPDATE xoops_config SET conf_value = ".$new_mode;
$sql .= " WHERE conf_name = 'debug_mode'";
$result = $xoopsDB->query($sql);
if ( $result )
{
redirect_header(XOOPS_URL, 2, " debug mode updated ");
}
}
return;
}
<form action="<{$xoops_url}><{$block.path}>" method="post">
<select name="debug_modes" onChange="submit();" >
<{foreach item=item from=$block.modes }>
<option value="" selected>Change debug mode</option>
<option value="<{$item.value}>">
<{$item.label}></option>
<{/foreach}>
</select>
</form>
$file = $_FILES[$form_field_name]['name'];
$n = explode('.', $file);
$target_file = $time().".".$n[1];
// Include the XOOPS uploader class
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
// create an instance of the uploader and provide settings
$uploader = new XoopsMediaUploader($org_path, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
$uploader->setTargetFileName($target_file);
if ($uploader->fetchMedia($form_field_name))
{
if (!$uploader->upload()) .... continued
function setTargetFileName($value){
$this->targetFileName = strval(trim($value));
}
// Include the XOOPS uploader class
include_once XOOPS_ROOT_PATH.'/class/uploader.php';
// create an instance of the uploader and provide settings
$uploader = new XoopsMediaUploader($org_path, $allowed_mimetypes, $maxfilesize, $maxfilewidth, $maxfileheight);
if ($uploader->fetchMedia($form_field_name))
{
if (!$uploader->upload())
{
echo $uploader->getErrors();
} else {
$uploader->getSavedDestination();
// Capture info about the file save
$saved_file = $uploader->getSavedFileName();
$full_path = $uploader->getSavedDestination();
print $saved_file;
}
} else {
echo $uploader->getErrors();
return;
}