URL link associated with camera...

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
User avatar
tech_fixer
Posts: 132
Joined: Tue Jul 29, 2003 3:07 pm

URL link associated with camera...

Post by tech_fixer »

Phillip,
This one should be quite easy to do...

Sometimes one might want to associate an URL to a camera monitor. Like, for example, to access the controls of an Axis PTZ camera on the camera's web server.

I think you could include a field, on the camera configuration dialog box, for such purpose. Then, in the monitor view, one could click on the URL link (or the image, if possible) to access it.

What do you think?

Regards,
Jose Rodriguez
User avatar
tech_fixer
Posts: 132
Joined: Tue Jul 29, 2003 3:07 pm

Re: URL link associated with camera...

Post by tech_fixer »

Phillip:
I modified some of the code for the camera monitor window (below). This makes the first table row to display an additional hyperlink, "Link". Clicking on it pops up a new window with an URL associated with that particular monitor.

This quick and dirty hack relies on a new database field on the Monitors table which would go like:
external_url varchar(255), null

I'm planning to use this added feature to access the controls of PTZ cameras straight from the monitor window and, maybe later, from the montage window. Now, I'm only missing an input field in the camera monitor configuration window to enter the URL right from ZoneMinder, rather than directly to the db. I'll try to work that on the following days.

Would it be too much to ask to include this feature in the next release of ZoneMinder? It would be a big plus against propietary software that does feature PTZ camera control.

Regards,
Jose Rodriguez.

________________
<tr>
<td width="20%" align="left" class="text"><b><?= $monitor[Name] ?></b></td>
<?php if ( canView( 'Monitors' ) && $monitor[Type] == "Local" ) { ?>
<td width="20%" align="center" class="text"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=settings&mid=<?= $monitor[Id] ?>', 'zmSettings<?= $monitor[Name] ?>', <?= $jws['settings']['w'] ?>, <?= $jws['settings']['h'] ?> );">Settings</a></td>
<?php } else { ?>
<td width="20%" align="center" class="text"> </td>
<?php } ?>
<?php if ( $mode == "stream" ) { ?>
<td width="20%" align="center" class="text"><a href="<?= $PHP_SELF ?>?view=watchfeed&mode=still&mid=<?= $mid ?>">Stills</a></td>
<?php } elseif ( canStream() ) { ?>
<td width="20%" align="center" class="text"><a href="<?= $PHP_SELF ?>?view=watchfeed&mode=stream&mid=<?= $mid ?>">Stream</a></td>
<?php } else { ?>
<td width="20%" align="center" class="text"> </td>
<?php } ?>
<?
$external_url_sql_str = "select external_url from Monitors where Id = ". $monitor[Id];
$external_url_sql = mysql_query($external_url_sql_str);
$external_url = mysql_result($external_url_sql, "external_url", 0);
if ($external_url != "") { $external_url_popup = "<a href=\"javascript: newWindow('".$external_url."','external_url_window');\">Link</a>";}
else { $external_url_popup = " ";}
?>
<td width="20%" align="center" class="text"><?= $external_url_popup;?>Link</a></td>
<td width="20%" align="right" class="text"><a href="javascript: closeWindow();">Close</a></td>
</tr>
Post Reply