Jump to content

How to call custom functions in provisioning module?


JonathanChun

Recommended Posts

Hello,

 

I'm trying to call a custom function in my provisioning module via GET instead of POST. Is this possible?

 

I noticed that it will not work via GET (it used to... but now it stopped working) if the custom function is not inside the

 

module_nocps_ClientAreaCustomButtonArray() function array, I can't call the function manually.

 

Is it possible to do this again?

Link to comment
Share on other sites

Just an update, I just realized even POST doesn't work now. I'm following the documentation here:

 

http://docs.whmcs.com/Provisioning_Module_Developer_Docs#Custom_Functions

 

I'm using this code:

 

<form method="post" action="clientarea.php?action=productdetails">

<input type="hidden" name="id" value="{$serviceid}" />

<input type="hidden" name="modop" value="custom" />

<input type="hidden" name="a" value="reboot" />

<input type="submit" value="Reboot VPS Server" />

</form>

 

It just redirects me to the main product page (as if the custom function didn't exist)

 

To clarify, if I add the function to the ClientAreaCustomButtonArray, it will work fine even if I manually access the link by GET. However, it stops working once I remove it from the custom button array. Is it possible to NOT have it show up on the buttonarray but be able to access it manually by URL?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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