Bug In Event-View (Stills)
Bug In Event-View (Stills)
When viewing the STILLS of an event, it seems that on the last page of the event, the PHP script is attempting to display an entire set of ZM_WEB_FRAMES_PER_LINE * ZM_WEB_FRAME_LINES frames, when there may be less that that number on the last page. When there aren't exactly that # of frames to fill the last page, broken-image IMG areas are being shown.
At first glance, I can tell that the code surrounding the display of the still pages has changed, but don't have time to troubleshoot exactly what the issue is.
At first glance, I can tell that the code surrounding the display of the still pages has changed, but don't have time to troubleshoot exactly what the issue is.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Glad to...
... cause it was frustrating me as it hit at the same time as my ZMC-dying problems (other thread) and my black images, too.
now i can at least focus on two the other two (one?) with a narrower focus!!
now i can at least focus on two the other two (one?) with a narrower focus!!
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Try this, though as it's only one line it might be easier to edit the line rather than apply a patch
Code: Select all
*** zm_html_view_event.php 5 Apr 2006 15:36:43 -0000 1.70
--- zm_html_view_event.php 10 May 2006 15:07:29 -0000 1.71
***************
*** 471,477 ****
$thumb_height = (int)round($event['Height']/ZM_WEB_FRAMES_PER_LINE);
$thumb_scale = (int)round( SCALE_BASE/ZM_WEB_FRAMES_PER_LINE );
! for ( $i = 0; $i < $frames_per_page; $i++ )
{
$frame = $frames[$i];
$image_data = getImageSrc( $event, $frame, $thumb_scale );
--- 471,477 ----
$thumb_height = (int)round($event['Height']/ZM_WEB_FRAMES_PER_LINE);
$thumb_scale = (int)round( SCALE_BASE/ZM_WEB_FRAMES_PER_LINE );
! for ( $i = 0; $i < count($frames); $i++ )
{
$frame = $frames[$i];
$image_data = getImageSrc( $event, $frame, $thumb_scale );
Phil
- victor_diago
- Posts: 245
- Joined: Wed Jan 21, 2004 2:44 pm
- Location: Brazil, sao paulo
- Contact:
Hi.
Unfortunately the stills for Recorded events STILL BUGGY; remember version 1.22.0 when i said the only 4 images are showed right ?
now the problem is stranger.
look at the source of the page generated when i click to see stills in a recorded (no modect) event :
first four are good :
but after, instead of get fid=5 it go to fid=100 !!!!!!!!!!!!!
it is exactly as 1.22.0 was. only modect events works well.
What could this be phil ? Thanks for any answer
Victor Diago
Unfortunately the stills for Recorded events STILL BUGGY; remember version 1.22.0 when i said the only 4 images are showed right ?
now the problem is stranger.
look at the source of the page generated when i click to see stills in a recorded (no modect) event :
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Fortuna - Evento - Evento-76575</title>
<link rel="stylesheet" href="zm_html_styles.css" type="text/css">
<script type="text/javascript">
window.focus();
function refreshWindow()
{
window.location.reload(true);
}
function closeWindow()
{
window.close();
}
function newWindow(Url,Name,Width,Height)
{
var Win = window.open(Url,Name,"resizable,width="+Width+",height="+Height);
}
</script>
</head>
<body scroll="auto">
<table border="0" cellspacing="0" cellpadding="4" width="100%">
<tr>
<td><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td align="left" class="text">
<form name="rename_form" method="get" action="/index.php">
<input type="hidden" name="view" value="event">
<input type="hidden" name="action" value="rename">
<input type="hidden" name="mode" value="still">
<input type="hidden" name="eid" value="76575">
<input type="hidden" name="trms" value="3"/>
<input type="hidden" name="attr1" value="MonitorId"/>
<input type="hidden" name="op1" value="="/>
<input type="hidden" name="val1" value="2"/>
<input type="hidden" name="cnj2" value="and"/>
<input type="hidden" name="attr2" value="Archived"/>
<input type="hidden" name="op2" value="="/>
<input type="hidden" name="val2" value="0"/>
<input type="hidden" name="cnj3" value="and"/>
<input type="hidden" name="attr3" value="DateTime"/>
<input type="hidden" name="op3" value=">="/>
<input type="hidden" name="val3" value="-1 hour"/>
<input type="hidden" name="sort_field" value="DateTime">
<input type="hidden" name="sort_asc" value="1">
<input type="hidden" name="limit" value="">
<input type="hidden" name="rate" value="100">
<input type="hidden" name="scale" value="100">
<input type="hidden" name="page" value="1">
<input type="text" size="16" name="event_name" value="Evento-76575" class="form">
<input type="submit" value="Renomear" class="form"></form></td>
<td align="right" class="text">
<form name="view_form" method="get" action="/index.php">
<input type="hidden" name="view" value="event">
<input type="hidden" name="mode" value="still">
<input type="hidden" name="page" value="1">
<input type="hidden" name="eid" value="76575">
<input type="hidden" name="trms" value="3"/>
<input type="hidden" name="attr1" value="MonitorId"/>
<input type="hidden" name="op1" value="="/>
<input type="hidden" name="val1" value="2"/>
<input type="hidden" name="cnj2" value="and"/>
<input type="hidden" name="attr2" value="Archived"/>
<input type="hidden" name="op2" value="="/>
<input type="hidden" name="val2" value="0"/>
<input type="hidden" name="cnj3" value="and"/>
<input type="hidden" name="attr3" value="DateTime"/>
<input type="hidden" name="op3" value=">="/>
<input type="hidden" name="val3" value="-1 hour"/>
<input type="hidden" name="sort_field" value="DateTime">
<input type="hidden" name="sort_asc" value="1">
<input type="hidden" name="limit" value="">
Vel.: <select name="rate" class="form" onChange="document.view_form.submit();">
<option value="10000">100x</option>
<option value="5000">50x</option>
<option value="2500">25x</option>
<option value="1000">10x</option>
<option value="400">4x</option>
<option value="200">2x</option>
<option value="100" selected>Real</option>
<option value="50">1/2x</option>
<option value="25">1/4x</option>
</select>
Tamanho: <select name="scale" class="form" onChange="document.view_form.submit();">
<option value="400">4x</option>
<option value="300">3x</option>
<option value="200">2x</option>
<option value="150">1.5x</option>
<option value="100" selected>Atual</option>
<option value="75">3/4x</option>
<option value="50">1/2x</option>
<option value="33">1/3x</option>
<option value="25">1/4x</option>
</select>
</form>
</td>
</tr>
</table></td></tr>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td align="center" class="text"><a href="/index.php?view=event&mode=still&eid=76575&scale=100&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&page=0">Tudo</a></td>
<td align="center" class="text"><a href="/index.php?view=none&action=delete&mark_eid=76575">Deletar</a></td><td align="center" class="text"><a href="javascript: newWindow( '/index.php?view=eventdetail&eid=76575', 'zmEventDetail', 400, 220 )">Editar</a></td><td align="center" class="text"><a href="javascript: newWindow( '/index.php?view=export&eid=76575', 'zmExport', 400, 340 )">Export</a></td><td align="center" class="text"><a href="/index.php?view=event&action=archive&eid=76575&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1">Arquivar</a></td>
<td align="center" class="text"><a href="/index.php?view=event&mode=stream&eid=76575&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1">Contínuo</a></td>
<td align="right" class="text"><a href="javascript: closeWindow();">Fechar</a></td>
</tr>
</table></td></tr>
<tr><td align="center" class="text">
- 1 -
<a href="/index.php?view=event&mode=still&eid=76575&scale=100&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&page=2">2</a>
<a href="/index.php?view=event&mode=still&eid=76575&scale=100&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&page=3">3</a>
<a href="/index.php?view=event&mode=still&eid=76575&scale=100&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&page=5">5</a>
<a href="/index.php?view=event&mode=still&eid=76575&scale=100&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&page=9">9</a>
<a href="/index.php?view=event&mode=still&eid=76575&scale=100&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&page=10">10</a>
<a href="/index.php?view=event&mode=still&eid=76575&scale=100&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&page=2">></a>
</td></tr>
<tr><td><div style="text-align: center">
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=1&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00001-capture-25.jpg" width="80" height="60" class="normal" alt="1/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=2&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00002-capture-25.jpg" width="80" height="60" class="normal" alt="2/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=3&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00003-capture-25.jpg" width="80" height="60" class="normal" alt="3/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=4&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00004-capture-25.jpg" width="80" height="60" class="normal" alt="4/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=100&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00100-capture-25.jpg" width="80" height="60" class="normal" alt="100/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=154&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00154-capture-25.jpg" width="80" height="60" class="normal" alt="154/0"></a>
</div></td></tr>
<tr>
<td><table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td width="20%" align="center" class="text"><a href="/index.php?view=event&mode=still&eid=76570&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&limit=&page=1&rate=100&scale=100">Ant.</a></td>
<td width="20%" align="center" class="text"><a href="/index.php?view=event&mode=still&eid=76570&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&limit=&action=delete&mark_eid=76575&page=1&rate=100&scale=100">Deletar & Ant</a></td>
<td width="20%" align="center" class="text"> </td>
<td width="20%" align="center" class="text"><a href="/index.php?view=event&mode=still&eid=76580&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&limit=&action=delete&mark_eid=76575&page=1&rate=100&scale=100">Deletar & Próx</a></td>
<td width="20%" align="center" class="text"><a href="/index.php?view=event&mode=still&eid=76580&trms=3&attr1=MonitorId&op1=%3D&val1=2&cnj2=and&attr2=Archived&op2=%3D&val2=0&cnj3=and&attr3=DateTime&op3=%3E%3D&val3=-1+hour&sort_field=DateTime&sort_asc=1&limit=&page=1&rate=100&scale=100">Próx</a></td>
</tr></table></td>
</tr>
</table>
</body>
</html>
Code: Select all
'/index.php?view=frame&eid=76575&fid=1&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00001-capture-25.jpg" width="80" height="60" class="normal" alt="1/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=2&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00002-capture-25.jpg" width="80" height="60" class="normal" alt="2/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=3&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00003-capture-25.jpg" width="80" height="60" class="normal" alt="3/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=4&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00004-capture-25.jpg" width="80" height="60"
Code: Select all
'/index.php?view=frame&eid=76575&fid=100&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00100-capture-25.jpg" width="80" height="60" class="normal" alt="100/0"></a>
<a href="javascript: newWindow( '/index.php?view=frame&eid=76575&fid=154&scale=100', 'zmImage', 368, 320 );"><img src="images/76575-00154-capture-25.jpg" width="80" height="60" class="normal" alt="154/0"></a>
What could this be phil ? Thanks for any answer
Victor Diago
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
This is to do with bulk frames, though I agree it is not working correctly.
I will have to sit down and go through all this to fix it once and for all. However I have just finalised 1.22.2 ready for release so this will probably go into a 1.22.3 release, though I will also release a patch for this fix when it is done.
I will have to sit down and go through all this to fix it once and for all. However I have just finalised 1.22.2 ready for release so this will probably go into a 1.22.3 release, though I will also release a patch for this fix when it is done.
Phil
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
- victor_diago
- Posts: 245
- Joined: Wed Jan 21, 2004 2:44 pm
- Location: Brazil, sao paulo
- Contact: