Jump to content
  • 0
SeanP

Execute PHP at different times on template page load

Question

So, in order to work around some broken (and possible security risking) functionality, that WHMCS insists is intended functionality, I have the need to execute PHP code at different times on the template page load of an addon module.  In the past, this could be accomplished by executing PHP code using the "{php}" tags at different places during the page load.  I basically need to execute PHP code at the start of the addon's template page load, then after the template page is fully loaded (at the end of the load).  How is this accomplished when using hooks to execute all of the PHP code?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hooks are a bit limited when they come to changing templates. Some you can do a key-value pair and some you can do straight HTML.  What functionality are you trying to "fix" ?

Share this post


Link to post
Share on other sites
  • 0

You should provide more details. I tend to say that it's doable. As last resource you could use PHP stream (ob_start, ob_get_content) or auto prepend/append but don't do it, it sucks on so many levels and could break 3rd party modules.

Edited by Kian

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines