By ibanez182 on
How can i change this function to display the thumbnails in float mode (variable number of thumbs per row depends of the width of my page) instead of table mode (fixed number of row and columns)
function theme_acidfree_print_full_album($node) {
$ncols = variable_get('acidfree_cols', 5);
$nrows = variable_get('acidfree_rows', 3);
$show_box = node_access('update', $node);
$nodes_per_page = $ncols*$nrows - ($show_box ? 1 : 0);
$nodes = _acidfree_get_children($node, $nodes_per_page, ALBUM_PAGER);
if (count($nodes) == 0)
return "This album is empty<br>".($show_box?_album_create_links($node):"");
$output .= theme('pager', NULL, $nodes_per_page, ALBUM_PAGER);
if ($show_box) {
$row[] = Array('data' => _album_create_links($node), 'class' => 'album-cell');
$count++;
}
foreach ($nodes as $child_node) {
$row[] = Array(
'data' => theme("acidfree_print_thumb_{$child_node->class}",
$child_node, $node),
'class' => 'album-cell');
if (++$count % $ncols == 0) {
$rows[] = Array('data' => $row, 'class' => 'none');
unset($row);
}
}
if (isset($row))
$rows[] = Array('data' => $row, "class" => "none");
// ######## This is the row that decide how to display everything #################
$output .= theme('table', NULL, $rows, Array('id' => 'acidfree-main'), false);
$output .= "<div class='acidfree-body'>{$node->body}</div>";
return $output;
}