Edit main page layout
Edit main page layout
Is it possible to have the default main web page show only specific items?
I would like a user to be only able to see the monitor name and the events for that day.
I know I can disable a user from being able to change them, but I would like to completely hide them.
Reason is one of my cameras requires a username and password in the source path, and that information is seen on the main page.
Is it possible to hide everything else like the source and function?
I would like a user to be only able to see the monitor name and the events for that day.
I know I can disable a user from being able to change them, but I would like to completely hide them.
Reason is one of my cameras requires a username and password in the source path, and that information is seen on the main page.
Is it possible to hide everything else like the source and function?
Re: Edit main page layout
Sure. Edit console.php
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Edit main page layout
Okay thanks. I need to learn how to edit php files.asker wrote:Sure. Edit console.php
Off to google I go.
Re: Edit main page layout
Do not have to do edit. Just restrict what monitors and functions a user can see in the user options.
Re: Edit main page layout
?bbunge wrote:Do not have to do edit. Just restrict what monitors and functions a user can see in the user options.
I can change the options so they cannot modify the settings, but they can still see them.
I want to make it so they cannot see the source path. Am I missing something?
Re: Edit main page layout
No, you haven't misunderstood anything.
You have to modify console.php to not display the columns you are not interested in. Changing restrictions will not do what you want.
This is the section you should investigate:
https://github.com/ZoneMinder/ZoneMinde ... e.php#L232
Note that I don't recommend you just remove them. Instead wrap them around code where you check if the user viewing is admin, then show it, else not, because you will still want to see and edit them as admin
This would likely be the quickest fix for you. The correct way to do this would be to tie it into the "canView" logic that is implemented in ZM but that is more complex and therefore not recommended since you really only want to hack your own version (keep a copy though as it will get overwritten when you update)
You have to modify console.php to not display the columns you are not interested in. Changing restrictions will not do what you want.
This is the section you should investigate:
https://github.com/ZoneMinder/ZoneMinde ... e.php#L232
Note that I don't recommend you just remove them. Instead wrap them around
Code: Select all
<?php ?>
This would likely be the quickest fix for you. The correct way to do this would be to tie it into the "canView" logic that is implemented in ZM but that is more complex and therefore not recommended since you really only want to hack your own version (keep a copy though as it will get overwritten when you update)
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Edit main page layout
Okay, I will give it a shot.
Need to be sure to keep a backup, I can see things going bad here.
Thanks for the help.
Need to be sure to keep a backup, I can see things going bad here.
Thanks for the help.
Re: Edit main page layout
BTW I re read why you want to hide columns. Bbunge is right - if all you want to do is disable a person from seeing the password for your cameras all you need to do is make sure that person only has view rights for the monitor. If you do that the source column is not clickable and they should not be able to see the password as the password should only show up if you click on the source column. The source column should only show the IP or hostname.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Edit main page layout
asker wrote:BTW I re read why you want to hide columns. Bbunge is right - if all you want to do is disable a person from seeing the password for your cameras all you need to do is make sure that person only has view rights for the monitor. If you do that the source column is not clickable and they should not be able to see the password as the password should only show up if you click on the source column. The source column should only show the IP or hostname.
For this one particular camera, the source path requires the user name and password in the source path.
rtsp://user:password@192.168.2.1
So it shows under the source colum as
user:password@192.168.2.1
I want to hide that information. So it seems the only way to do this is to edit the php file.
Re: Edit main page layout
Something is not right. All my cameras have that sort of URL.
Can you post screenshots of various tabs on how you have configured the camera? (masking out IP/password)
Can you post screenshots of various tabs on how you have configured the camera? (masking out IP/password)
iitywygms wrote:asker wrote:BTW I re read why you want to hide columns. Bbunge is right - if all you want to do is disable a person from seeing the password for your cameras all you need to do is make sure that person only has view rights for the monitor. If you do that the source column is not clickable and they should not be able to see the password as the password should only show up if you click on the source column. The source column should only show the IP or hostname.
For this one particular camera, the source path requires the user name and password in the source path.
rtsp://user:password@192.168.2.1
So it shows under the source colum as
user:password@192.168.2.1
I want to hide that information. So it seems the only way to do this is to edit the php file.
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Edit main page layout
I chopped out
username:password@
username:password@
Re: Edit main page layout
Ah you're right. If you select FFMPEG as source type, it shows the complete path which includes passwords. Ouch.
Did you try "remote" instead of FFMPEG to see if your camera works? I switched from FFMPEG to remote to avoid the smudging problem of ffmpeg a few months after I first found zone minder
Did you try "remote" instead of FFMPEG to see if your camera works? I switched from FFMPEG to remote to avoid the smudging problem of ffmpeg a few months after I first found zone minder
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Re: Edit main page layout
No, FFMPEG should not, and dosen't in my setup, show the entire source parh. I have used FFMPEG with and without user/passwords and it does not show anything but the entry after the "/" after the IP address. Something must be goofy with the install...
Ah, just noticed there is nothing after the IP address in his source. Something we are not seeing? Most cameras need an entry like: /live2.sdp after the IP address.
bb
Ah, just noticed there is nothing after the IP address in his source. Something we are not seeing? Most cameras need an entry like: /live2.sdp after the IP address.
bb
Re: Edit main page layout
I have yet to get remote to work with any of my cameras. Always get rtsp source not available error.asker wrote:Ah you're right. If you select FFMPEG as source type, it shows the complete path which includes passwords. Ouch.
Did you try "remote" instead of FFMPEG to see if your camera works? I switched from FFMPEG to remote to avoid the smudging problem of ffmpeg a few months after I first found zone minder
Maybe I am setting up "remote" incorrectly?
I have tried many of the "howtos" scattered around the web and here on the forums but none have ever worked for me.
I have been running zm like this for 2-3 years.bbunge wrote:No, FFMPEG should not, and dosen't in my setup, show the entire source parh. I have used FFMPEG with and without user/passwords and it does not show anything but the entry after the "/" after the IP address. Something must be goofy with the install...
Ah, just noticed there is nothing after the IP address in his source. Something we are not seeing? Most cameras need an entry like: /live2.sdp after the IP address.
bb
I have 4 cameras that use rtsp. The bottom 4 on my main screen. 3 of the cameras show 11, which is after the / And those 3 work without a username or password in the source path.
The latest camera "garage" requires a username and password in the path.
maybe I have something all wrong but it works?
Last edited by iitywygms on Fri Sep 25, 2015 5:51 pm, edited 1 time in total.
Re: Edit main page layout
True - I just tried it - if you add "rtsp://" to the source URL the user-name/password are removed in the display. I am on .106
bbunge was this true with 1.28.1 as well?
bbunge was this true with 1.28.1 as well?
bbunge wrote:No, FFMPEG should not, and dosen't in my setup, show the entire source parh. I have used FFMPEG with and without user/passwords and it does not show anything but the entry after the "/" after the IP address. Something must be goofy with the install...
Ah, just noticed there is nothing after the IP address in his source. Something we are not seeing? Most cameras need an entry like: /live2.sdp after the IP address.
bb
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs