Alter Admin.php, So I Can Set 'Realtime Main' Refresh = 1s

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Alter Admin.php, So I Can Set 'Realtime Main' Refresh = 1s

Postby dailafing » Mon Jun 22, 2015 9:53 pm

I've had a good search, but cant find an answer to this one...

I tried to directly alter the "./srv/www/htdocs/vicidial/admin.php" so that the link on the admin-page/reports/'Real-Time Main Report' hyper link would automatically set the url to refresh every 1 second.

I did this via WinSCP, and after saving the file, I found that I could no longer view the admin page at all. It was as though the server was off line.

Can anyone help me understand whats going on here, and maybe how to solve?

Thanks
ViciBox Redux v5.0.2-130821
Asterisk v.1.8.230.-vici
-Please feel free to message me about how to find out more version information, and how I may update to the latest. - I've no clue!
dailafing
 
Posts: 59
Joined: Wed Oct 23, 2013 1:25 pm
Location: UK, Wales

Re: Alter Admin.php, So I Can Set 'Realtime Main' Refresh =

Postby okli » Tue Jun 23, 2015 9:18 am

Well, that brings the question what exactly have you altered?
Check Apache error log for clues.
Check file permissions too.
okli
 
Posts: 671
Joined: Mon Oct 01, 2007 5:09 pm

Re: Alter Admin.php, So I Can Set 'Realtime Main' Refresh =

Postby dailafing » Tue Jun 23, 2015 11:24 am

okli wrote:Well, that brings the question what exactly have you altered?
Check Apache error log for clues.
Check file permissions too.


Hi there, thank you for your reply.

I don't think it's file permissions, because in fact I had not backed up the file before making such a small change in the PHP, and after working out that the administration page was no longer working as a direct result of my changes, I opened the file back up and simply removed my changes to see if the administration page would work again.

Reverting my changes brought the administration page back to life. To be clear I went back in to re-edit my changes out of the file, as opposed to undoing/replacing the file.

It worked.

What did I change exactly?
All I did was literally change the hyperlink text so that instead of simply taking me to the real-time main report, it would take me to that link, but with the all I did was literally change the hyperlink text so that instead of simply taking me to the real-time main report, it would take me to that link 1s refresh parameter/extension.
I found the said parameter by:
1) loading the real time main report,
2) rolling my eyes at the default refresh time of 40s
3) click the hyperlink "Refresh"
4) notice that the address bar now has a bunch of paramiters
5) go to the left most of the long url
6) find the realtimemainreport.php part of the link, and look for the paramiter with a '40'.
7) remove all the irrelevant parameters, ie. All text to the right of the '40'
8) change the 40 to a 1
9) hit return to see if it works before adding it to the php
10) RTMR, now loads but refreshes every 1 seccond
11) copy and paste our new url in to the part of the php that defines the hyperlink that we usually click on to load the RTMR.

12) save
13) dead - this is where I'm stuck
14) went back in, and removed the paramiter
15) works great.

I know nothing about the back end of vici, but logicly is the page failing a checksum so does t load, or does the os keep another copy of the file somewhere else, and checks to see if the page has been changed from its original state. So for security it's failing to load if the file differed to its own internal copy?

Thoughts?

Thanks
ViciBox Redux v5.0.2-130821
Asterisk v.1.8.230.-vici
-Please feel free to message me about how to find out more version information, and how I may update to the latest. - I've no clue!
dailafing
 
Posts: 59
Joined: Wed Oct 23, 2013 1:25 pm
Location: UK, Wales

Re: Alter Admin.php, So I Can Set 'Realtime Main' Refresh =

Postby okli » Tue Jun 23, 2015 12:38 pm

I'd rather modify realtime_report.php and add an option 1 second.
Another one is to make sure this 1 second refresh rate can be handled by the hardware and increase it to 2 or 3 if not, in case 4 is very low for you.
okli
 
Posts: 671
Joined: Mon Oct 01, 2007 5:09 pm

Re: Alter Admin.php, So I Can Set 'Realtime Main' Refresh =

Postby dailafing » Tue Jun 23, 2015 11:13 pm

okli wrote:I'd rather modify realtime_report.php and add an option 1 second.
Another one is to make sure this 1 second refresh rate can be handled by the hardware and increase it to 2 or 3 if not, in case 4 is very low for you.



Hi there,

I've not tried altering the realtime_report.php, but might try it.
But it would be interesting if someone could help us understand why such a small alteration to the admin.php totally kills it :(

Additionally, does anyone know any guides on customising the agent interface? Both features and images (company logo, etc.). I should imagine someone has made a graphical guide with a screen shot of different elements of the agent screen?
If not, I might just make one myself to show prospective customers? Like a carpet guide, but different agent scream features. ??

Any further advice would be appreciated.
ViciBox Redux v5.0.2-130821
Asterisk v.1.8.230.-vici
-Please feel free to message me about how to find out more version information, and how I may update to the latest. - I've no clue!
dailafing
 
Posts: 59
Joined: Wed Oct 23, 2013 1:25 pm
Location: UK, Wales

Re: Alter Admin.php, So I Can Set 'Realtime Main' Refresh =

Postby mflorell » Wed Jun 24, 2015 6:35 am

It probably would have been much easier to use the method that we created to do this by default instead of messing around with the code.

The options-example.php file can be copied to "options.php" in the vicidial web directory and you can change options like "$RS_RR" in that file to use a different default refresh rate.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Alter Admin.php, So I Can Set 'Realtime Main' Refresh =

Postby williamconley » Wed Jun 24, 2015 7:06 pm

dailafing wrote:Additionally, does anyone know any guides on customising the agent interface? Both features and images (company logo, etc.). I should imagine someone has made a graphical guide with a screen shot of different elements of the agent screen?
If not, I might just make one myself to show prospective customers? Like a carpet guide, but different agent scream features. ??

There is no published method to alter the agent screen. Most who have tried have gone one of two ways:

1) Failed miserably because that page uses a complex combination of PHP/MySQL/Javascript/AJAX/Perl to exchange data packets constantly and control the dialer directly and it's just too complex to deal with.

2) Succeeded by investing fairly heavily in time/money (or both) and kept their success secret to avoid anyone finding out that their product is *actually* Vicidial in disguise.

There are some exceptions: Some corporations have private-labeled their product so their employees see their corporate logo instead. Some call centers have paid for specific changes in a limited fashion to accomplish smaller tasks. But do note that any changes on this page will break upgradeability and need to be re-done at the next upgrade moment. Sometimes those changes blend right in, but sometimes a simple upgrade becomes expensive because of that customization. Depending entirely on what was done, of course.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 100 guests