- Moderated by:
- Support
-
- rank:
-
Team Member
- registered:
- December 2003
- Status:
- offline
- last visit:
- 30.11.08
- Posts:
- 2989
There is a link to the left called Developer Docs.
There is the Example module included with your distro, it is well commented.
There is the openstar.postnuke.com module generator.
edited by: AmmoDump, May 14, 2007 - 07:26 AM
--
David Pahl
Zikula Support Team -
- rank:
-
Professional
- registered:
- December 2002
- Status:
- offline
- last visit:
- 24.08.08
- Posts:
- 1588
If you have never made a PostNuke module before I would suggest that you create a folder "mymodule" (in the PostNuke modules folder) and one file to the folder: pnuser.php (has to be this name).
Add the following code:
Code
<?php
function mymodule_main()
{
if (!SecurityUtil::checkPermission('mymodule::', '::', ACCESS_OVERVIEW)) {
return pnVarPrepHTMLDisplay(_MODULENOAUTH);
}
return 'hello world';
}
?>
You can now intitialise and install the module.
mysite.com/index.php?name=mymodule
This will give you something working to experiment on. The next step would be to have a look at the example module and start playing with some libraries - get a template working with pnRender, create some API's and start referencing them (there is an internal PostNuke API call function.
You can also create database tables as well and start using them - I normally create the tables first and then when it comes time to package the module i then do the install routine. It is better to do like this because the database install is overly complicated and easy to mess up IMHO
-Lobos
edited by: Lobos, May 19, 2007 - 01:59 AM
--
-Lobos
Professional PHP Framework Services: Concept, Development and Deployment -
- rank:
-
Freshman
- registered:
- June 2008
- Status:
- offline
- last visit:
- 10.07.08
- Posts:
- 2
Hi Lobos
- created "mymodule" folder inside the "modules" folder
- created "pnuser.php" and pasted into it the code as supplied.
- in Zikula modules admin panel I regenerate modules list
- try to activate "mymodule" but get this notice:
"mymodule > state > invalid"
Has the module creation changed in Zikula?
Are there updated tutorials for new module creation in Zikula?
cheers -
- rank:
-
Software Foundation
- registered:
- December 1969
- Status:
- offline
- last visit:
- 15.11.08
- Posts:
- 4481
i suggest to check http://community.zikula.org/Wiki-tag-DeveloperDocs.htm for a brief introduction into "Module authoring"
--
regards from germany
..::[Zikula Application Framework]::.. ..::[SEO-Blog]::.. ..::[CMS Sicherheit]::.. -
- rank:
-
Helper
- registered:
- March 2005
- Status:
- offline
- last visit:
- 30.11.08
- Posts:
- 390
-
- rank:
-
Professional
- registered:
- September 2002
- Status:
- offline
- last visit:
- 19.11.08
- Posts:
- 879
Yes. There is a tutorial with Modulestudio that explains how to build a module with it. The generated module basically works and you only have to implement special features. The code is a great starting point for getting into module development together with the other linked docs.
--
best regards from Kiel, sailing city
Steffen Voss
Member of the PostNuke Steering Committee
Read The Zikulan's Blog
