Posted on: 03/09/04 07:06am
By: bloc
$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
Posted on: 08/04/04 01:47pm
By: Anonymous (greenhil)
Posted on: 11/07/04 08:57pm
By: Euan
Posted on: 09/27/08 02:46pm
By: koalasoft
<a href="http://www.heatherengineering.com/staticpages/index.php/in.columns.en">Here's another one</a> that uses templates and puts the featured article in across both columns (index.php included is from 1.3.10rc2).
Cheers,
Euan.