function show(&$output, $templateData, $templateHelper)
{
// This template is actually pnRender based, but needs to interface with
// Photoshare via the "HTML" output class
// Check for empty album
if (count($templateData['images']) > 0)
{
$width = $image['xSize'];
$height = $image['ySize'];
$render = new pnRender('photoshare');
$render->caching = false;
foreach ($templateData as $k => $v)
$render->assign($k, $v);
$render->assign('templateData', $templateData);
$render->assign('image', $templateData['images'][$templateData['initialImageIndex']]);
$templateName = 'template_list.htm';
$html = $render->fetch($templateName);
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->Text($html);
$output->SetInputMode(_PNH_PARSEINPUT);
}
else
{
$output->LineBreak();
$output->Text(_PTMP_LIST_EMPTYALBUM);
}
}
}<!-- SPROG -->
function handleOnClickImage(img)
{
var url = img.src.replace('viewimage','displayimage');
url = url.replace('show','user');
var width = <!--[$image.xSize]-->;
var height = <!--[$image.ySize]-->;
var imageWindow = window.open(url,'image','width='+width+',height='+height+',toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
imageWindow.focus();
}
<div class="photo">
<table class="photo-content">
<!--[section name="templateData" loop=$templateData]-->
<tr>
<td class="photo-image">
<img src="<!--[photoshare_img image=$image.id]-->&thumbnail=1" class="main photoshare-clickable" OnClick="handleOnClickImage(this)"/>
</td>
<td class="photo-info">
<table>
<tr><td class="label"><!--[photoshare_extra field=1]-->:</td><td><!--[$image.extra1]--></td></tr>
<tr><td class="label"><!--[photoshare_extra field=2]-->:</td><td><!--[$image.extra2]--></td></tr>
<tr><td class="label"><!--[photoshare_extra field=3]-->:</td><td><!--[$image.extra3]--></td></tr>
</table>
<!--[$image.description]-->
</td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<!--[/section]-->
</table>
</div>Template courtesy of Designs By Darren.