Where can I find a current module API?
Where can I find a current module API?
And for future releases: what about possibility insert {content} into included templates?
Nice work, guys...
--------
English is not my native language
Where can I find a current module API?
The current module API functions are found in lib/modules.functions.php. This is all changing though in the 0.9 release due out in a couple of weeks. The module API is going to an OO style based on these notes: http://wiki.cmsmadesimple.org/pmwiki.ph ... APIRewrite
I'm not sure what you mean about {content} into included templates, though.
I'm not sure what you mean about {content} into included templates, though.
Tag {content} does not work in included templates
API: yes, but some of functions have no explanation - like a cms_mapi_register_intermodule_function() and more. Implementations of user contributed modules have no examples for using this feature. You know, I am newbie here, so excuse me for interrupting...
Templates: I mean templates, included by the smarty {include file="file.tpl"} tag. Template included by this way is not 'parsed' by CMSMS, only by Smarty? I really don't like long text in small textarea...
After implementation OO style module API: will be old-style modules working?
Thanks, have a nice day.
Templates: I mean templates, included by the smarty {include file="file.tpl"} tag. Template included by this way is not 'parsed' by CMSMS, only by Smarty? I really don't like long text in small textarea...
After implementation OO style module API: will be old-style modules working?
Thanks, have a nice day.
Where can I find a current module API?
Oh, I see what you mean.
Yes, normal Smarty tags will work as expected.
As for the API, it won't be backwards compatible. I think it would take A LOT of work to do, and would be of little benifit since there aren't that many modules out there rght now.
And, yes, the rewrite will have some better documentation in it...
Yes, normal Smarty tags will work as expected.
As for the API, it won't be backwards compatible. I think it would take A LOT of work to do, and would be of little benifit since there aren't that many modules out there rght now.
And, yes, the rewrite will have some better documentation in it...
What I'm working on
Sorry, I'm really new here, but i very like this system. To be honest, it is big surprise for me - because of simplicity etc.
Included templates: can I from one template include other non-file template directly by some feature of CMSMS? I would like to create 'root' template, and 'sub' template, make 'sub' non-active (I don't need it in combo-boxes at content management), and then by some way include 'sub' into 'root', so all {cms_module} tags (used in both of templates) can work fine.
So, I'm trying to create this module:
- on initialization create instance of some class and save anywhere reference to this object
- on every occurrence his {cms_module} tag in content or template (it will be called more then once - with different parameters), this module will access to only one 'live' object (this object will be created only once in during initialization of this module)
- it will be offer some functions for using by other modules
I agree, OO module API will be certainly more useful for this, but how implement this right now?
Which callback function of this module have I register for initialization? All my simple experiments doesn't work as I want... Where have I save reference for created object? Is $cms->variables["module_inner_class"] best choice? And how clearly implement inter-module cooperation? I mean which callback functions are used for this task and how other modules uses other-module functions...
It's maybe a little bit hard for a newbie, isn't it? Can anyone help me? I mean preferably somebody other then developer - his time is too expensive...
I also really don't understand, why is here so few user contributed modules, because CMSMS is very useful system for using by average non-computer peoples...
Lot of questions, I agree. Thanks for any answers.
Included templates: can I from one template include other non-file template directly by some feature of CMSMS? I would like to create 'root' template, and 'sub' template, make 'sub' non-active (I don't need it in combo-boxes at content management), and then by some way include 'sub' into 'root', so all {cms_module} tags (used in both of templates) can work fine.
So, I'm trying to create this module:
- on initialization create instance of some class and save anywhere reference to this object
- on every occurrence his {cms_module} tag in content or template (it will be called more then once - with different parameters), this module will access to only one 'live' object (this object will be created only once in during initialization of this module)
- it will be offer some functions for using by other modules
I agree, OO module API will be certainly more useful for this, but how implement this right now?
Which callback function of this module have I register for initialization? All my simple experiments doesn't work as I want... Where have I save reference for created object? Is $cms->variables["module_inner_class"] best choice? And how clearly implement inter-module cooperation? I mean which callback functions are used for this task and how other modules uses other-module functions...
It's maybe a little bit hard for a newbie, isn't it? Can anyone help me? I mean preferably somebody other then developer - his time is too expensive...
I also really don't understand, why is here so few user contributed modules, because CMSMS is very useful system for using by average non-computer peoples...
Lot of questions, I agree. Thanks for any answers.
-
- Forum Members
- Posts: 96
- Joined: Sat Dec 04, 2004 10:30 pm
- Location: London, England
omg you are mad
OK.
Try writing a simple module first - or better still adapting one that is already there - IMO linkblog is the best to work with as it includes a lot of the concepts you need to familiarise yourself with cmsms.
Try writing a simple module first - or better still adapting one that is already there - IMO linkblog is the best to work with as it includes a lot of the concepts you need to familiarise yourself with cmsms.