Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
problem with module specific pntables
  • Posted: 03.07.2007, 09:08
     
    chanhongguan
    rank:
    Freshman Freshman
    registered:
     October 2005
    Status:
    offline
    last visit:
    03.07.07
    Posts:
    5
    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.
  • Posted: 03.07.2007, 13:43
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    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
  • Posted: 03.07.2007, 13:50
     
    chanhongguan
    rank:
    Freshman Freshman
    registered:
     October 2005
    Status:
    offline
    last visit:
    03.07.07
    Posts:
    5
    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.
  • Posted: 03.07.2007, 14:33
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    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
  • Posted: 03.07.2007, 14:49
     
    chanhongguan
    rank:
    Freshman Freshman
    registered:
     October 2005
    Status:
    offline
    last visit:
    03.07.07
    Posts:
    5
    Hi Mark,

    You have been a great help. Thanks. icon_smile

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula