Jump to content

Robby_D

Member
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Robby_D

  1. Hi, After following the guide on "http://docs.whmcs.com/Addon_Module_Developer_Docs" my module would not show up in the list when going to Setup>Addon Modules. I tried copy pasting the 'addonexample' folder and renaming the folder/.php file + functions but for some reason it never shows up. Do I need to do anything else to register my addon? Or could someone point me in the right direction as to what I might have forgotten to do? Thanks in advance!
  2. Hi, First of all let me start by saying I have virtually no whmcs experience as of yet, only started working with it yesterday as I joined a project where 1 dev was working on. I have experience as a PHP dev so I'm learning fast and I find WHMCS to be pretty straight forward. I have searched the forum and documentation but could not find an answer to my issue. As part of me joining the project we added a second server for me to work on. To keep track of code changes I've set up git so that when I finish my work I should be able to just push any branch to my coworker's setup, he can review and merge it in. Initially I excluded the configuration.php file from our git repository so that we're not tracking that for changes. So here's the catch, some of our modules/addons contain environment specific variables. In my experiences from the past I've always added a config file, check the system env variable and set these variables globally according to the env being 'prod', 'test' or 'dev' or whatever. So my question now is would configuration.php (as it already contains environment specific variables like db_host, db_username, license, ...) be a good place to store these? Can I just do something like: <?php if(isset($_SERVER['APPLICATION_ENV']) && $_SERVER['APPLICATION_ENV'] == 'dev') { $license = 'lalalDEV'; $db_host = 'lalalaDEV'; ... $customVar = 'lalalaDEV'; ); else{ $license = 'lalalPROD'; $db_host = 'lalalaPROD'; ... $customVar = 'lalalaPROD'; }; ?> I'm asking this specifically because I noticed when setting up the license using the front-end, the key was written into the file so I'm nog sure if this would work or be good practice. Seeing as I can't be the only one having tried to accomplish this I took it to the forums, thanks in advance for any help!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated