if ($submitted) { ?> <!--<span class="submitted"><?php //print t('!date — !username', array('!username' => theme('username', $node), '!date' => format_date($node->created))); ?> </span>--> <?php } ?> <div class="ppy" id="ppy1"> <ul class="ppy-imglist"> <?php $files = upload_load(node_load($nid)); $rows = array(); foreach ($files as $file) { if ($file->list) { $mime = explode('/', file_get_mimetype($file->filename)); $type = $mime[0]; switch ($type) { case 'image': $href = $file->fid ? file_create_url($file->filepath) : url(file_create_filename($file->filename, file_create_path())); ?> <li> <a href="<?php print $href; ?> ">
$description = trim(strip_tags(check_plain($node->body))); if (strpos($description, '<') !== FALSE || strpos($description, '<') !== FALSE || drupal_strlen($description) == 0) { $description = "More"; } $description = drupal_substr($description, 0, 65) . " ... "; $image = ""; // todo: move this to a function (file attachments ok, but image attachments not supported in views? bummer!) $files = upload_load($node); foreach ($files as $file) { if (strpos($file->filemime, "image") === 0) { $image = "/" . $file->filepath; break; } } if ($node->iid && ($imagenode = node_load($node->iid))) { $files = upload_load($imagenode); foreach ($files as $file) { if (strpos($file->filepath, ".thumb") > 0) { $image = "/" . $file->filepath; break; } } //$files = upload_load($imagenode); if ($imagenode->images) { $image = $imagenode->images['thumbnail']; } } if (drupal_strlen($image) == 0) { $image = "{$directory}/images/toolsImg.jpg"; } $items[] = <<<EOS