balebond Posted March 10, 2008 Share Posted March 10, 2008 I really like the fact there is a place to build custom admin modules. I noticed the ip manager example exposes the $adminlevel variable. Are there any other session type variables I have access to? Where can I find a list if so? For example... I really want to audit who is performing certain actions in my addon and would want to capture the admin user for example. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted March 10, 2008 WHMCS CEO Share Posted March 10, 2008 You can use $_SESSION['adminid'] for the ID of the currently logged in admin. The $adminlevel variable has actually been discontinued as of V3.6 so that's not one that's available any more! Matt 0 Quote Link to comment Share on other sites More sharing options...
balebond Posted March 10, 2008 Author Share Posted March 10, 2008 Awesome.. thanks for that. Is there like a reference somewhere I'm missing that lets me know what I can access? 0 Quote Link to comment Share on other sites More sharing options...
cyberneticos Posted April 10, 2008 Share Posted April 10, 2008 Awesome.. thanks for that. Is there like a reference somewhere I'm missing that lets me know what I can access? I have been searching for a manual for the admin addons myself and found nothing. The example addon is as simple as it can get and does not provide any help. The knowledge base nor the manual has nothing. What variables can we use ? 0 Quote Link to comment Share on other sites More sharing options...
JasonO Posted April 10, 2008 Share Posted April 10, 2008 Maybe someone with knowledge can add it to the Wiki if there's nothing there already. 0 Quote Link to comment Share on other sites More sharing options...
balebond Posted April 10, 2008 Author Share Posted April 10, 2008 When I originally posted this I had shifted to .tpl pages. So, I still don't know how to find admin addon variables... sorry. But maybe this is still helpful: Although I was looking for an outline in the manual, I did find out a method to see what variables are available to us on a page by page basis. This method was recommended on another post I saw (forgot where). Simply add: {debug} to any of your .tpl files to see what variables are in scope. Be sure that any popup blockers are turned off for your site or you may miss it Hope that helps. I suppose if someone were ambitious enough and had the time, they could compile a list. I was also thinking it would be cool if there was a drop down in the admin. You could select a .tpl and it would list them. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted April 10, 2008 WHMCS CEO Share Posted April 10, 2008 There are no variables available in an admin addon module. People use it for things like IP Management, License Management, Time Tracking & Billing, Inventory Management, etc... You use our own DB tables for that. Matt 0 Quote Link to comment Share on other sites More sharing options...
cyberneticos Posted April 10, 2008 Share Posted April 10, 2008 I see. I was going to try to use it for some functionality WHMCS doesn't have. Which is to be able to create some data entry for clients. For example, when we charge customers directly to their bank accounts, the bank gives us a reference code, and a status. I need some fields that could not only hold one value, but a list of values. Each month the bank gives the same client a different reference code for our charge. So we needed a way to track this. The custom fields do not let me keep a DB this way. Only one value per field. Any suggestions or other way to do this with WHMCS ? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.