Writing new module and have some questions

azflyer

Joined: 2005-10-24
Posts: 7
Posted: Mon, 2005-10-24 01:17

Hello all,

I did a lot of customizations to Gallery 1.x and I'm starting to learn the ways of G2 modules. Can anyone tell me what these statements do within module.inc?

$this->setRequiredCoreApi(array(6,0));

and

$this->setRequiredModuleApi(array(2,0));

Thanks!

 
draco2002

Joined: 2003-04-28
Posts: 70
Posted: Mon, 2005-10-24 02:16

check out this link
http://codex.gallery2.org/index.php/Gallery2:Download#Modules
if you notice they all have something like 6.0 / 2.0 next to them

this just tells gallery what version of the CoreApi, and what version of the ModuleApi are required for this module to work. Since new functions are being added all the time, your module may rely on a function that is not in a previous release.

Hope that helps.

-Dan

|| G1 + G2 Hosting | Custom Theming | Donate to Gallery ||

 
azflyer

Joined: 2005-10-24
Posts: 7
Posted: Mon, 2005-10-24 03:06

Ok, I get it now.

Thanks Dan