PostNuke

Flexible Content Management System

News

Hooks and the API: Why you should care (main site)

Contributed by This article while r on Apr 11, 2002 - 02:11 AM

Now, while I have been working on a few modules of my own, I have not had a chance to really look at some of the other excellent resources that have sprung up over the last two weeks. My one concern is that some rewrites will be mimicing most of the core modules and NOT converting over to the new mod design paradigm yet. (give it some time or give it some effort, it'll get there soon enough)




One of the most important reasons to make the transition is the list of possibilitites that hooks open up for your entire module. That's what they are there for. Let me give you a few ideas:


Imagine a PayPal module that worked via Hooks in such a way that a user can purchase a certain amount of content that they are allowed to fill, be it as articles, faq entries, a game module, whatever. Each module that has Hooks enabled would be able to have it's own PayPal listing in the admin panel where submission costs are maintained.



...or...


Every Hook enabled module would be able to communicate with a Site Traffic Tracking module that operated through the use of Hooks (80% complete, actually), allowing automatic statistical summation with a variety of potential display options



Just two ideas. Once you get your mind around it, it's easy to come up with ideas.




But it only works if everyone buys into it. Hooks are approved and part of the core now. If you are working on a module of your own, please take the extra time to conform to the new standard. As soon as the rest of the core modules catch up, the old paradigm will cease to be supported.




Look at it this way: if you knock it out now, you get to play with Hooks early.




Thx for reading.




-St.Ego, http://www.ivory-tower.net
1819