Jump to content

Module and Hook - get module config


Recommended Posts

How do I grab the module config from inside it's hook? I was looking through the documentation and couldn't find it anywhere.


Basically I have a module with basic config options; option1, option2, option3


Then inside the hooks.php file I want to grab these config options. But I'm not finding this in the documentation anywhere.

Link to comment
Share on other sites

Nevermind, found it in another module with hooks. Gotta grab it manually from DB using something like:


$q = @mysql_query("SELECT * FROM tbladdonmodules WHERE module = 'moduleName'");
while ($arr = mysql_fetch_array($q)) {
$settings[$arr['setting']] = html_entity_decode($arr['value']);


I also noticed I posted this in the wrong place, an admin can move please. Maybe this can serve someone else in the future to grab module settings for hooks. Thanks.

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.

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