Jump to content

Capturing $vars for the hook in creating an "addon module"


Mario Augusto

Recommended Posts

I am creating an addon module, created through the "array" a custom field for the person to put information. The point is, how do I capture the $vars information inside the hook.php file that I created inside the module folder? For it is through this information that I will perform a certain action within the database.

In my case, the array field was named name "days", in the option _output I can capture it through $vars ['days'], because it is inside the same file, however when I try to use some external file, .php for example, returns me "NULL", as if the data was not coming to it.

Awaiting return.

Link to comment
Share on other sites

The hooks.php (s is required) file in the directory of your module works exactly as a standard action hook placed in includes/hook. They're not different. The value of $vars depends on the specific hook point you are using.

If you need to get additional details that are not included in the hook you'll need to query db.

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