Sorry this is going to be a messy looking post.
Here is the items/show.php code:
`
<?php head(array('title' => item('Dublin Core', 'Title'),'javascript'=>js('resize'),'bodyid'=>'items','bodyclass' => 'show item')); ?>
<div id="primary">
<h1><?php echo item('Dublin Core', 'Title'); ?></h1>
<ul class="title-list">
<h3>All Titles</h3>
<?php foreach (item('Dublin Core', 'Title', 'all') as $title): ?>
<li class="item-title">
<?php echo $title; ?>
<?php endforeach ?>
<div id="item-metadata">
<div id="item-images">
<?php $index = 0; ?>
<?php while ($file = loop_files_for_item()): ?>
<?php if ($file->hasThumbnail()): ?>
<?php if ($index == 0): ?>
<?php echo display_file($file, array('imageSize'=>'fullsize')); ?>
<?php else: ?>
<?php echo display_file($file, array('imageSize'=>'square_thumbnail', 'linkToFile'=>true)); ?>
<?php endif; ?>
<?php $index++; ?>
<?php endif; ?>
<?php endwhile; ?>
</div>
<!-- The following function prints all the the metadata associated with an item: Dublin Core, extra element sets, etc. See http://omeka.org/codex or the examples on items/browse for information on how to print only select metadata fields. -->
<?php echo show_item_metadata( array('show_empty_elements' => false) ); ?>
</div><!-- end item-metadata -->
<!-- The following returns all of the files associated with an item. -->
<div id="itemfiles" class="element">
<h3>Files</h3>
<div class="element-text"><?php echo display_files_for_item(); ?></div>
</div>
<!-- If the item belongs to a collection, the following creates a link to that collection. -->
<?php if ( item_belongs_to_collection() ): ?>
<div id="collection" class="element">
<h3>Collection</h3>
<div class="element-text"><p><?php echo link_to_collection_for_item(); ?></p></div>
</div>
<?php endif; ?>
<!-- The following prints a list of all tags associated with the item -->
<?php if(item_has_tags()): ?>
<div id="item-tags" class="element">
<h3>Tags</h3>
<div class="element-text"><?php echo item_tags_as_string(); ?></div>
</div>
<?php endif;?>
<!-- The following prints a citation for this item. -->
<div id="item-citation" class="element">
<h3>Citation</h3>
<div class="element-text"><?php echo item_citation(); ?></div>
</div>
<?php echo plugin_append_to_items_show(); ?>
<ul class="item-pagination navigation">
<li id="previous-item" class="previous">
<?php echo link_to_previous_item('Previous Item'); ?>
<li id="next-item" class="next">
<?php echo link_to_next_item('Next Item'); ?>
</div><!-- end primary -->
<?php foot(); ?>
'
And here is the resize.js that is called in the head. Note that this file was meant to go with the original code on show.php (seen in second post in this series) and that I have tried removing the call to no effect.
'
function ReSize(imgobj){
// Area = width*height
// AspectRatio = width/height
// Area=width*width/AspectRatio
// width= square root(Area*AspectRatio)
longside = 558;
if (imgobj.width > imgobj.height ) {
area=imgobj.width/imgobj.height;
imgobj.width=longside;
var newHeight =longside/area;
imgobj.height=newHeight;
} else { // portrait & square
area=imgobj.height/imgobj.width;
imgobj.height=longside;
var newWidth =longside/area;
imgobj.width=newWidth;
}
}
function resizeThumbs() {
if(!document.getElementsByTagName || !document.getElementById || !document.getElementsByTagName("img")) return;
var itemimage = $("item-image");
ReSize(itemimage);
}
Event.observe(window,'load',function() {
resizeThumbs();
});
'