Let me start this over.
I'm using the front_page module, as the main page has a slightly different theme than the rest.
On that page, there are EIGHT boxes. There's two boxes on the first row, three boxes on the second row, and three boxes on the third row. I created different node types for each subject, and each subject is to have their own box with their own teasers.
I created a template.php with:
<?php
/**
* Catch the phptheme_item_list function, and redirect through the template api
*/
function phptemplate_item_list($items = array(), $title = NULL) {
// Pass to phptemplate, including translating the parameters to an associative array. The element names are the names that the variables
// will be assigned within your template.
return _phptemplate_callback('item_list', array('items' => $items, 'title' => $title));
}
?>
<?php
function format_node_columns($node) {
return _phptemplate_callback('node_columns', array('node' => $node));
}
?>
And I created an item_list.tpl.php, but it has nothing in it. I'm confused about that one (Does anyone know if I need this file for my case, and am a little confused about template.php too. ?)
I used this snippet and put it in page.tpl.php:
<?php
$listlength="1";
$charlength="150";
$taxo_id = 1;
$content_type = 'story';
unset ($output);
$result1 = pager_query("SELECT n.title, n.nid, n.teaser, n.uid, n.created, u.name FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN term_node ON n.nid = term_node.nid WHERE n.type = '$content_type' AND term_node.tid = $taxo_id AND n.status = 1 ORDER BY n.created DESC", $listlength);
while ($node = db_fetch_object($result1)) {
$output .= l($node->title, "node/$node->nid") . "