Skip to content
Permalink
Browse files

fixed loglist image display if first and sixth log have an image;

better alignment of images to log lines;
fixes #215
  • Loading branch information...
following5 committed Jun 5, 2013
1 parent 4ba77df commit 91d98f7e81821e96f107d078d4b78acd37c6ba6e
Showing with 11 additions and 3 deletions.
  1. +10 −2 htdocs/newlogs.php
  2. +1 −1 htdocs/templates2/ocstyle/newlogs.tpl
@@ -81,20 +81,28 @@
LIMIT 1", $rLog['id']);
if ($rPic = sql_fetch_assoc($rsPic))
{
if (count($newLogs))
if (count($newLogs) >= 2)
{
$newLogs[count($newLogs)-2]['pic_uuid'] = $rPic['uuid'];
$newLogs[count($newLogs)-2]['pic_url'] = $rPic['url'];
$newLogs[count($newLogs)-2]['title'] = $rPic['title'];
$pics = $lines_per_pic;
}
else if (count($newLogs) == 1)
{
$newLogs[count($newLogs)-1]['pic_uuid'] = $rPic['uuid'];
$newLogs[count($newLogs)-1]['pic_url'] = $rPic['url'];
$newLogs[count($newLogs)-1]['title'] = $rPic['title'];
$pics = $lines_per_pic+1;
}
else
{
$rLog['pic_uuid'] = $rPic['uuid'];
$rLog['pic_url'] = $rPic['url'];
$rLog['title'] = $rPic['title'];
$pics = $lines_per_pic+2;
}
$rLog['picshown'] = true;
$pics = $lines_per_pic;
}
sql_free_result($rsPic);
}
@@ -9,7 +9,7 @@
{t}Latest logs entries{/t} {if $rest}{t}Without Germany{/t}{/if}
</div>

<table width="100%" class="table">
<table width="100%" class="table">
{assign var='lastCountry' value=''}

{foreach name=newLogs from=$newLogs item=newLog}

0 comments on commit 91d98f7

Please sign in to comment.
You can’t perform that action at this time.