<{* $Id: block_topnews_p.html,v 1.8 2008/11/02 05:11:12 ohwada Exp $ *}>

<{* popbox.js *}>
<{if $block.show_popbox_js}>
  <{$block.popbox_js}>
<{/if}>

<table width="100%" cellspacing="0" cellpadding="0" border="0">

<{* count begins from 1 *}>
<{foreach item=photo key=count from=$block.photo}>

<{* -- open table row -- *}>
  <{if $block.cols == 1}>
    <tr>
  <{elseif ( $count mod $block.cols ) == 1 }>
    <tr>
  <{elseif $count == 1 }>
    <tr>
  <{/if}>

  <td align="center" style="margin:0px;padding:5px 0px;">
    <{if $photo.title_short_s != '' }>
      <{if $block.use_pathinfo }>
        <a href="<{$xoops_url}>/modules/<{$block.dirname}>/index.php/photo/<{$photo.photo_id}>/">
      <{else}>
        <a href="<{$xoops_url}>/modules/<{$block.dirname}>/index.php?fct=photo&amp;photo_id=<{$photo.photo_id}>">
      <{/if}>

      <{$photo.title_short_s}></a> 
    <{/if}>
    (<{$photo.item_time_update|formatTimestamp:"s"}>) <br />

<{* POPUP IMAGE  *}>
    <{if ( $photo.onclick == 2 ) && $block.show_popbox }>
      <{if $photo.thumb_width && $photo.thumb_height }>
        <img src="<{$photo.imgsrc_thumb}>" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$photo.thumb_width}>" height="<{$photo.thumb_height}>" class="PopBoxImageSmall" onclick="Pop(this,100,'PopBoxImageLarge');" pbSrcNL="<{$photo.imgsrc_photo}>" />
      <{else}>
        <img src="<{$photo.imgsrc_thumb}>" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$block.cfg_thumb_width}>" class="PopBoxImageSmall" onclick="Pop(this,100,'PopBoxImageLarge');" pbSrcNL="<{$photo.imgsrc_photo}>" />
      <{/if}>

<{* PHOTO PAGE *}>
    <{else}>
      <{if $block.use_pathinfo }>
        <a href="<{$xoops_url}>/modules/<{$block.dirname}>/index.php/photo/<{$photo.photo_id}>/">
      <{else}>
        <a href="<{$xoops_url}>/modules/<{$block.dirname}>/index.php?fct=photo&amp;p=<{$photo.photo_id}>">
      <{/if}>

      <{if $photo.imgsrc_thumb && $photo.thumb_width && $photo.thumb_height }>
        <img src="<{$photo.imgsrc_thumb}>" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$photo.thumb_width}>" height="<{$photo.thumb_height}>" />
      <{elseif $photo.imgsrc_thumb }>
        <img src="<{$photo.imgsrc_thumb}>" alt="<{$photo.title_s}>" title="<{$photo.title_s}>" width="<{$block.cfg_thumb_width}>" />
      <{/if}>
      </a>

    <{/if}>
  </td>

<{* -- close table row -- *}>
  <{if $block.cols == 1}>
    </tr>
  <{elseif $count is div by $block.cols }>
    </tr>
  <{elseif $count == $block.photo_num }>
    </tr>
  <{/if}>

<{/foreach}>
</tr>
</table>
