Ok, let's say, just for a minute, you want to undo the changes you've made so far. Let's even say you want to do this again.
Leave the changes to your style.css sheet, but rename the altered maintable class to random and the altered thumbnails class to thumbrandom.
In theme.php, there's a bunch of changes needed.
Find $template_thumbnail_view = <<<EOT
Under it, find
<td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
replace with
<td valign="top" class="{THUMB_CLASS}" width ="{CELL_WIDTH}" align="center">
under that, find
<td valign="top" class="thumbnails" align="center"> </td>
replace with
<td valign="top" class="{THUMB_CLASS}" align="center"> </td>
In function starttable:
find
function starttable($width = '-1', $title = '', $title_colspan = '1')
replace with
function starttable($width = '-1', $title = '', $title_colspan = '1', $album='')
find
if ($width == '100%') $width = $CONFIG['main_table_width'];
after, add
if ($album == 'random') {
$style = 'random';
} else {
$style = 'maintable';
}
find
<table align="center" width="$width" cellspacing="1" cellpadding="0" class="maintable">
replace with
<table align="center" width="$width" cellspacing="1" cellpadding="0" class="$style">
In function theme_display_thumbnails:
find
$cat_link = is_numeric($aid) ? '' : '&cat=' . $cat;
before, add
if ($aid == 'random') {
$style = 'thumbrandom';
} else {
$style = 'thumbnails';
}
find
starttable('100%', $title, $thumbcols);
replace with
starttable('100%', $title, $thumbcols, $aid);
find
foreach($thumb_list as $thumb) {
$i++;
if ($mode == 'thumb') {
if ($aid == 'lastalb') {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => $thumb['admin_menu']
);
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => $thumb['admin_menu']
);
}
} else {
$params = array('{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
}
echo template_eval($thumb_cell, $params);
if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) {
echo $row_separator;
}
}
for (;($i % $thumbcols); $i++) {
echo $empty_cell;
}
replace with
foreach($thumb_list as $thumb) {
$i++;
if ($mode == 'thumb') {
if ($aid == 'lastalb') {
$params = array('{THUMB_CLASS}' => $style,
'{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => $thumb['admin_menu'],
);
} else {
$params = array('{THUMB_CLASS}' => $style,
'{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => $thumb['admin_menu'],
);
}
} else {
$params = array('{THUMB_CLASS}' => $style,
'{CELL_WIDTH}' => $cell_width,
'{LINK_TGT}' => "index.php?cat={$thumb['cat']}",
'{THUMB}' => $thumb['image'],
'{CAPTION}' => $thumb['caption'],
'{ADMIN_MENU}' => ''
);
}
echo template_eval($thumb_cell, $params);
if ((($i % $thumbcols) == 0) && ($i < count($thumb_list))) {
echo $row_separator;
}
}
for (;($i % $thumbcols); $i++) {
$params = array('{THUMB_CLASS}' => $style);
echo template_eval($empty_cell, $params);
}
Same effect, just better coding. Using this system, you could easily change each thumbnail section's style!
This has been tested with 1.3.2 and a copy of the classic theme.