zmEventImagesMaster not working with ZM_USE_DEEP_STORAGE

Forum for questions and support relating to the 1.25.x releases only.
Locked
User avatar
mmi
Posts: 111
Joined: Wed Jun 27, 2007 12:54 am

zmEventImagesMaster not working with ZM_USE_DEEP_STORAGE

Post by mmi »

hy

if in options/paths/ZM_USE_DEEP_STORAGE is active
on export, zmEventImagesMaster.html not working

if ZM_USE_DEEP_STORAGE is not set everything is ok.

the problem is the path, because the java script go to:
javascript:switchevent('1/3695/zmEventImages.html');
and if ZM_USE_DEEP_STORAGE is active the path is change, some like:
javascript:switchevent('1/12/7/.....3695/zmEventImages.html');
but zmEventImagesMaster.html don't know this path with ZM_USE_DEEP_STORAGE active.

Can this be solve?
Because i want to use zmEventImagesMaster.html with ZM_USE_DEEP_STORAGE active.

Thank you.
erer
Posts: 1
Joined: Fri Dec 09, 2011 8:04 pm

Re: zmEventImagesMaster not working with ZM_USE_DEEP_STORAGE

Post by erer »

Simplest way to fix this is to change few lines of code in file: .../skins/classic/includes/export_functions.php:
1

Code: Select all

	
foreach ($eids as $eid) {
		//get monitor id and event id
		$sql = "select E.MonitorId from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where E.Id = '".dbEscape($eid)."'";
		$event = dbFetchOne( $sql );
		$eventMonitorId[$eid] = $event['MonitorId'];
	}
change to:

Code: Select all

	foreach ($eids as $eid) {
		//get monitor id and event id and event start time 
		$sql = "select E.MonitorId,E.StartTime from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where E.Id = '".dbEscape($eid)."'";
		$event = dbFetchOne( $sql );
		$eventMonitorId[$eid] = $event['MonitorId'];
		//added:
		$eventStartTime[$eid] = $event['StartTime'];
	}
2 and 3
two same lines:

Code: Select all

<div><a href="javascript:switchevent('<?php echo   $eventMonitorId[$eid].'/' . $eid; ?>/zmEventImages.html');"><?=$eid?></a></div>
change to:

Code: Select all

<div><a href="javascript:switchevent('<?php echo   $eventMonitorId[$eid].'/'. strftime("%y/%m/%d/%H/%M/%S",strtotime($eventStartTime[$eid])) ?>/zmEventImages.html');"><?=$eid?></a></div>


or e.g. something like this:

Code: Select all

<div><a href="javascript:switchevent('<?php echo   $eventMonitorId[$eid].'/'. strftime("%y/%m/%d/%H/%M/%S",strtotime($eventStartTime[$eid])) ?>/zmEventImages.html');"><?=$eid?> - <?php echo $eventStartTime[$eid]?> </a></div>
Those above changes work for me but I know, that more changes for several config settings are needed. Unfortunately I'm not a program writer and I don't know how to make them now.
Locked