Fork me on GitHub

problem with module specific pntables  Bottom

  • Hi,

    I realized that the pntables.php table definition for my module is not loaded until after a user logs in. Is there any way to load pntables before that?

    Thanks.
  • It doesn't work this way - logging in/out has nothing to do with the availability of module DB tables. Your pntables file is loaded dynamically when a function from your module is called (via pnMod(API)Func).

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Hi Mark,

    I am not using the PN function for module, eg pninit, pnMod(API)Func. I am doing this because the module is quite big and it's for reasons of flexibility. I am coding it in legacy mode. I change the module type to 4 in the pn_modules table in order to run it properly. Does this affect how the mod-specific pntables is loaded?

    Many thanks.
  • Yes - only pnAPI compliant modules will automatically load the DB tables for you. Anything else you'll have to manage yourself. You can use the API pnModDBInfoLoad to load DB tables from your module - this is essentially what pnMod(API)Func does.

    -Mark

    --
    Visit My homepage and Zikula themes.
  • Hi Mark,

    You have been a great help. Thanks. icon_smile
  • 0 users

This list is based on users active over the last 60 minutes.