snippet
I found the lack of documentation also confusing (and time-consuming). You need to return an array like this:
$array["value"] = "label";
For instance:
<?php
$result = db_query(db_rewrite_sql('SELECT nid,title from {node} WHERE type="page"'));
while ($item = db_fetch_object($result)) {
$items[$item->nid] = $item->title;
}
return $items;
?>Step 1: Copy "thumbnailviewer2.js" into js folder inside theme
Setp 2: Add code below inside template.php for that theme
drupal_add_js(drupal_get_path('theme', 'tapestry') . '/js/thumbnailviewer2.js', 'theme');
To theme cck imagefield with imagecache, make sure imagecache is working. Replace 'featuredsmall' with the imagecache name. Copy the imagefield name and adjust code below.
To create customize shorter teaser, use this snippet
<?php print $teaser = substr($node->content['body']['#value'], 0, 220) ?>
the "220" is number of character before it cut the teaser.
Adsense limit 3 ads per page. If i insert adsense ads in node.tpl.php, it well repeat the ads 3 times. Because of the node load first before the bottom block, my adsense in bottom block no showing. To solve this, add this snippet inside node.tpl.php. It nice also to separate teaser and full page theme and only insert this snippet inside teaser section only
<?php
if ($id == 1 && $is_front) {
print "...banner here...";
}
?>

