Recently a friend of mine wanted to start using Geeklog, and asked if it was possible to have 2 columns instead of just the one on the index-page.
Well, I made a hack to mimic that, since geeklog doesn't seem to support multiple columns...Its very basic, just 2 columns where "featured" gets on top in the left column and the rest follows left - right column.
Perhaps someone might find a use for it.
Since my friend didn't want "featured" to be just 1 column I left that one out...but it is easy to add back in again.
Text Formatted Code
$data = DB_query ("SELECT COUNT(*) AS count " . $sql);
$D = DB_fetchArray ($data);
$num_pages = ceil ($D['count'] / $limit);
// between here the changes are made
if ($nrows > 0) {
$half=ceil($nrows/2);
$rest=$nrows-$half;
$display .= '<table border="0" width="100%" cellpadding="3" cellspacing="0"><tr><td valign="top"';
if ($rest <=0) { $display .=' width="100%"';} else {$display .=' width="50%"';}
$display .= '>';
for ($x = 1; $x <= $half; $x++) {
$A = DB_fetchArray($result);
if ($A['featured'] == 1) {
$feature = 'true';
} elseif (($x == 1) && ($_CONF['showfirstasfeatured'] == 1)) {
$feature = 'true';
$A['featured'] = 1;
}
$display .= COM_article($A,'y');
}
$display .= '</td>';
if ($rest>0)
{$display .= '<td width="50%" valign="top">';
for ($x = $half+1; $x <= $nrows; $x++) {
$A = DB_fetchArray($result);
$display .= COM_article($A,'y');
}
$display .= '</td>';
}
$display .= '</tr></table>';
// between here the changes are made
$display .= PLG_showCenterblock (3, $page, $topic); // bottom blocks