Jump to content

MACscr

Member
  • Posts

    2651
  • Joined

  • Last visited

About MACscr

MACscr's Achievements

Senior Member

Senior Member (3/3)

0

Reputation

  1. Grr, thats a lot of work. This platform is 3 years old. Must be a proper way to do it through custom pages.
  2. I have no idea how an addon module would work for something like this. I have a pretty complex platform created around WHMCS with many custom pages created for it. Grr.
  3. Any luck? I would think this hook would run during the core whmcs init.php. Whatever it is, I need to figure a way to get the hook to consistently run on all whmcs client pages and on my custom pages, before my init runs.
  4. The first one in the code is the whmcs one. Mine comes after. My init is still somehow running before the hook though. Why would you think my init should come before the whmcs one when the problem is the whmcs hook is running AFTER my init.php code? Now my init can access a bunch of whmcs stuff just fine, its just the problem with the hook timing.
  5. I'm not really sure what you are trying to accomplish. Can you elaborate on this a bit with a little bit better english?
  6. So I have a custom hook to run with a order of 0 for ClientAreaPage: add_hook('ClientAreaPage', 0, function($vars) { $_SESSION['foo'] = 'bar'; }); but the problem is that the hook doesnt run before my custom pages own init file and runs right after instead. Any ideas why it doesnt run before the init file is included? The hook creates some $_SESSION values that i need to access from my init.php. Here is a snippet from my custom page: <?php use WHMCS\Database\Capsule; define("CLIENTAREA", true); define("FORCESSL", true); // Uncomment to force the page to use https:// require("init.php"); if ($_GET['client_id'] && $_SESSION['adminid'] > 0 && $_SESSION['uid'] != $_GET['client_id']) { $_SESSION['uid'] = (int)$_GET['client_id']; } $capsule = new Capsule; $ca = new WHMCS_ClientArea(); // add directory where plugins are stored $smarty->addPluginsDir('./custom/smarty_plugins/'); $ca->addToBreadCrumb('index.php', Lang::trans('globalsystemname')); $ca->initPage(); $ca->requireLogin(); $client_id = (int)$ca->getUserID(); if ($client_id == 0) { die('invalid user id'); } $ca->assign('client_id', $client_id); require("custom/init.php"); require("custom/functions.php"); I doubled checked the order by simply doing: var_dump('hook ran'); from the hook and then var_dump('init ran'); from each file/function to see the order it came up on the page. Its definitely not running the hook first. Any suggestions to solve the problem woudl be sincerely appreciated.
  7. Hmm, Im having the same issue after upgrading, yet im not getting any errors (I do have $display_errors=true in my config, just blanks when im using {include_php}. I added the following to my configuration.php with no difference as well: // Smarty custom email based template policy: $smarty_security_policy = array( 'mail' => array( 'php_functions' => array( 'ucwords', ), 'php_modifiers' => array( 'strpos', ), ), 'system' => array( 'trusted_dir' => array( '/var/www/html/custom_files', ), ), );
  8. No one? I would think others would be taking advantage of this as well. I thought the token might be saved in the $_SESSION array, but doesnt seem to be.
  9. Seems a hidden field named "token" is added to any form within WHMCS that I am assuming is for CSRF, doesnt matter if its a custom one or not. Since this is the case, how can we as developers within our form processors validate the token?
  10. Running the latest stable WHMCS on an nginx server running php-fpm 5.6. It seems that only after few minutes of idleness and logged into the clientarea as an admin, the user gets logged out, but my admin panel session is still good. How can we increase that timeout value? I am not sure why the WHMCS devs would have a shorter session life set for the client area, but there must be a way to adjust it it through php values or something. I don't know. Maybe it's just the fact that the "remember me" option is obviously not selected when logging in as admin. We will though probably be spending more time logged in the client area as an admin then we will in the admin area, so I need to figure something out. Any ideas or suggestions are sincerely appreciated.
  11. Has this plugin been kept up to date? I have my DNS cluster setup so that hosts only write to it, nothing is ever written back to the hosts. What would happen if the user ordered a domain, their zone was created on ServerA, but then they decided to create a cpanel account on ServerB for it because they ended up getting a shared hosting account later or they already had a reseller account and decided to create a hosting account later? My clients change their minds all the time. LOL. Or lets say a user has a hosting account/domain and they decide to cancel the hosting, but still want to keep the domain. When the account is terminated by whmcs, wont it then terminate their dns zone as well?
  12. Does it require any template changes? Im looking for a solution that doesnt have to be hacked in every time I upgrade whmcs.
  13. 6.2 order form support? I really wish their was a more native integration available so we didn't have to manually change templates every time there was an update.
  14. Anyone else having issues with the checkout button not working with WHMCS 6.1 and the newest Stripe gateway?
  15. Is there a way so that when the user pays, he can choose to store the CC or not? I know whmcs has an option to allow customers to delete stored CCs. Does that work with this stripe module since the CC is not actually stored locally? It would obviously then have to make a stripe api call and remove it through that.
×
×
  • 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