Jump to content

AndBlazing

Member
  • Posts

    3
  • Joined

  • Last visited

About AndBlazing

AndBlazing's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Well, if he needs to use include php file (with some logic) it's not the best solution, definitely. So perhaps calling hook in such case is even better (especially if a heavyweight logic is inside). But, if the questions is only about on how to include template, then what's should be used - is include tag.
  2. Well, basically you should call hook, which returns the html code (best practice is to load in hook from another template I guess). Your question as I understand is how to call hook. There is nothing can be done without php tag in template, I believe. To enable it go to settings - security (or something, wrote it just as remember). Here is it, enjoy {php} $hookResult = run_hook('yourHookName', [ 'arg1' => $template->getVariable('localVariable')->value ]); $template->assign('hookTemplate', $hookResult); {/php} {$hookTemplate}
  3. Hey folks, I'm getting the exception if click on Cancel or Return to button (http://prnt.sc/dxc782, http://prnt.sc/dxc6pr). Probably it's because of misconfiguration or something, although that seems to be cofigured properly. if (function_exists('mcrypt_create_iv')) { $app['session']->set('oauth_token', bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM))); } else { $app['session']->set('oauth_token', bin2hex(openssl_random_pseudo_bytes(32))); } $url = WHMCS_PATH . "oauth/authorize.php?client_id=" . WHMCS_CLIENT . "&response_type=code" . "&scope=openid%20profile%20email" . "&redirect_uri=" . $app['url_generator']->generate('oauth_code', [], UrlGenerator::ABSOLUTE_URL) . "&state=security_token%3D" . $app['session']->get('oauth_token') . "%26url%3D" . $app['url_generator']->generate('dashboard', [], UrlGenerator::ABSOLUTE_URL);; return new RedirectResponse($url); Could you advice please where is better to dig?
×
×
  • 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