Page 1 of 2
Edit main page layout
Posted: Thu Sep 24, 2015 2:27 pm
by iitywygms
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?
Re: Edit main page layout
Posted: Thu Sep 24, 2015 2:55 pm
by asker
Sure. Edit console.php
Re: Edit main page layout
Posted: Thu Sep 24, 2015 4:57 pm
by iitywygms
asker wrote:Sure. Edit console.php
Okay thanks. I need to learn how to edit php files.
Off to google I go.
Re: Edit main page layout
Posted: Thu Sep 24, 2015 5:35 pm
by bbunge
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
Posted: Thu Sep 24, 2015 8:01 pm
by iitywygms
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
Posted: Thu Sep 24, 2015 8:57 pm
by asker
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)
Re: Edit main page layout
Posted: Thu Sep 24, 2015 11:08 pm
by iitywygms
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.
Re: Edit main page layout
Posted: Fri Sep 25, 2015 12:53 am
by asker
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.
Re: Edit main page layout
Posted: Fri Sep 25, 2015 3:47 pm
by iitywygms
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
Posted: Fri Sep 25, 2015 4:11 pm
by asker
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)
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.
Re: Edit main page layout
Posted: Fri Sep 25, 2015 5:01 pm
by iitywygms
I chopped out
username:password@
Re: Edit main page layout
Posted: Fri Sep 25, 2015 5:32 pm
by asker
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
Re: Edit main page layout
Posted: Fri Sep 25, 2015 5:41 pm
by bbunge
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
Re: Edit main page layout
Posted: Fri Sep 25, 2015 5:50 pm
by iitywygms
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
I have yet to get remote to work with any of my cameras. Always get rtsp source not available error.
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.
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 been running zm like this for 2-3 years.
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?
Re: Edit main page layout
Posted: Fri Sep 25, 2015 5:50 pm
by asker
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 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