[ZendTo] Feature request - another dynamic value for main_menu.tpl

John Thurston john.thurston at alaska.gov
Fri Mar 9 00:25:08 GMT 2018


In main_menu.tpl, there are several dynamic values available for use. 
Things like "#OrganizationShortName#" and "$maxFileSize" let the 
contents of the screen display the appropriate configuration values. If 
we increase the permitted size for drop offs, we dont' need to go edit 
the template to reflect this.

A FAQ I used to answer is "Why is my customer not able to use the 
request-token I created?" The answer is, "The token is only good for 24 
hours." In my 4.11 installation, I just added that text to the main 
page, and I stopped getting the question. I was about to do the same to 
my new 5 installation, and hesitated....

The value I want is in preferences.php, in 'requestTTL'. It's right 
there waiting for me. So I added a line:
    $smarty->assign('requestTTL', $NSSDROPBOX_PREFS['requestTTL']);
to index.php and about.php, and I was then able to modify line 105 in 
main_menu.tpl to include:
    4=$requestTTL
and the sentence:
   "The request-token will be valid for %4 seconds."

Yay! Success! But sigh :( No user wants to compute those seconds back 
into days or hours, so I've reverted to a bit of static text.

** Feature Request **

Can we get a new function (in lib/NSSUtils.php with the others?) to make 
a human-friendly value from requestTTL, so we can tell our users the 
expected lifetime of their request-tokens?


-- 
    Do things because you should, not just because you can.

John Thurston    907-465-8591
John.Thurston at alaska.gov
Department of Administration
State of Alaska


More information about the ZendTo mailing list