Setting defaults for side vs. center

Post Reply

Topic author
timotheosh
Active Member
Posts: 3
Joined: 20. May 2012 00:43

Setting defaults for side vs. center

Post by timotheosh »

I have a module that I am making it allowable for the admin to set the width and height for the module. I need different defaults for this when the module is being installed on the side than when it is being installed in the center.

If the module is getting installed on the side then the default width is 200 and default height 200, but if it is installing in the center then the default width is 800 and default height 600.

Is there a way knowing which within the install function itself, so I can set the defaults based on where the module gets installed?
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: Setting defaults for side vs. center

Post by Marc »

The module data will be added to the database before the install function is ran. Just do a quick sql query for the data of the module. The new module id is being passed to the install function.
Post Reply

Return to “Modifications Support”