|
将单元内容列表 hack 成两列显示
|
|
|
|
Author: Autoit | Date:2006-11-23 | View: 10486 | Digg: 55 |
|
修改文件: components/com_content/content.html.php function showCategories 段,约 122行: <ul> 替换为: <table width='100%' border='0' cellspacing='1' cellpadding='4' class="category"> 下面行的<?php下面增加: echo "<tr>\n";
$rowcounter = 0; 将 if ( $catid != $row->id ) {替换为: // if ( $catid != $row->id ) { 并在他下行增加: if (($rowcounter%2==0) AND ($rowcounter<>0)) echo "</tr>\n<tr>\n"; 在下面的 <li> 替换为: <td> 在下面的 </li> 替换为: </td> 紧接的下面到结尾部分: <?php
}
}
?>
</ul>
<?php
} 替换为: <?php
// }
$rowcounter++;
}
if ($rowcounter%2<>0) {
for ($i = 1; $i <= (2-($rowcounter%2)); $i++) {
echo " <td width='50%'></td>\n";
}
}
echo "</tr>\n</table>\n"; // by autoit end +++++++++++++++++++++++++++++++
}Ok, End, by Autoit.
Permanent URL: http://www.autoit.cn/index.php/content/view/87/25.html
| 1 | liur4 @ 2006-11-23 11:36:55 : | 谢谢! |
Only registered users can write comments. Please login or register. |