(possbl. bug) view multiple events time=asc.

Support and queries relating to all previous versions of ZoneMinder
Locked
haxhia
Posts: 12
Joined: Sat Dec 03, 2005 8:49 am

(possbl. bug) view multiple events time=asc.

Post by haxhia »

Hi all.

First, I have ZM 1.21.3.
I've been trying to view events from oldest to newest (i.e. ascending time-wise).
However, when I click on the number of events in a monitor (whichever) and then put a check mark on the N events I want to view, then I click "View", the events start playing in descending time. The newest ones play first and the oldest ones play last. I want the opposite to happen.

At first, I thought this was a bug, so I tried hacking some files (/var/www/html/zm_functs.php and /var/www/html/zm_html_view_events.php).

First, I changed (in zm_html_view_events.php line 209):

Code: Select all

function viewEvents( form, name )
{
        var events = new Array();
        for (var i = 0; i < form.elements.length; i++)
        {
to

Code: Select all

function viewEvents( form, name )
{
        var events = new Array();
        for (var i = form.elements-1; i >= 0; i++)
        {

But,after the change, interestingly, when I selected more than one event, the oldest would show up first (so far so good) and the it would stop (not good). There was no Next button, there was only Previous button. When I clicked on Previous button I would get the next oldest event. So somehow after above code change, the funtion of "Next" button changed to that of "Previous" button and vice-versa.

Then in the same file I changed line 233, from this:

Code: Select all

<input type="hidden" name="sort_asc" value="<?= $sort_asc ?>">
to this:

Code: Select all

<input type="hidden" name="sort_asc" value="1">
This also doesn't fix the problem.
(Changing the zm_funcs.php was useless because the $sort_asc variable was global and changes affected _everything_.)

So, please either help me fix the bug or help me solve this problem some other way.
Thanks,
-Haxhia
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

It's not a bug. If you change your setting in ZM_EVENT_SORT_ORDER in options->system to asc then it will work just how you want.

Regards,
Corey
Image
Image
3939663646337

It's better to keep your mouth shut and appear stupid than open it and remove all doubt.
-Mark Twain
haxhia
Posts: 12
Joined: Sat Dec 03, 2005 8:49 am

Post by haxhia »

There is no ZM_EVENT_SORT_ORDER in my ZM. Rember I'm using 1.21.3.

Even if there was though, I think it would change just "ZM - Events" (the windows where it show about 25 events). However, I want the "ZM - Events" window to be descending and when viewing more than one event I want to view them in ascending order. Besides, right now when watching multiple events it's like watching video in reverse.

-Haxhia

Updated.
Locked