Hello,
I am working on some modules that will call hooks and I have come across the need to be able to control which hooks are called on a page. I wanted to know if the pnDev team might add functionality to the hooks code that will allow the admin to turn off a hook call to one page in a module but allow it to be called on another page in the same module. I was thinking that when a module that registers a hook is activated in another module that the display hook can initially provide a link that will say 'Register Page'. Once the page is registered the admin can enable which module hook will be called. For example. I want EZComments on this Page but not Ratings even though Ratings is enabled for the whole module. Ratings is turned on for a different page in the module. Also create hooks would automatically register themselves the first time they are called. That will allow the admin to turn on or off the create hook for any given instance it is called in any module.
I believe these changes would allow more flexibility for an admin to use other modules to extend their site.
Thanks
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- frw responded to »Bug in the SMTP mail transfer protocol - Port 25 - Zikula 1.2.9« 22. May
- mdee responded to »Short URL questions« 22. May
- mesteele101 responded to »Problem in Database Connection« 21. May
- Herr.Vorragend responded to »Clip Documentation and Doubt« 19. May
- mazdev responded to »zikula 1.3.3. and IE9« 19. May
- mesteele101 responded to »How to install Zikula for MSSQL ??? - Part II« 19. May
- mesteele101 created topic »File packaging« 16. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Post Nuke Hooks Feature Request
-
- Rank: Helper
- Registered: Dec 31, 1969
- Last visit: May 07, 2010
- Posts: 507
Amen to this. I see that this was posted almost 2 years ago, so maybe it's forgotton. This is a big issue with my current site, in which we want to display *2* hooks in different places. It makes no sense on our site to just dump out all hook output in one place, with no guarantee that they will even be in a desired order. I have two suggestions:
* Add a parameter in which a specific hook can be displayed or excluded; just add another parameter to the function and test for a match as it loops through the hooks;
* divide the display output function in two: the first function is exactly as the current one except it comes back in an array, with the key value being the module name of the hook, i.e., "EZComments". This way each hook output would be neatly partitioned from the others. The 2nd function would output the the results of the hook call; either a specific element in the array, exclude a specific element in the array, or the entire array. The default would be the entire array, so the two functions together would be exactly what we have now. But if a module developer wanted to display hookA in zone X, they could do that; and then display all other hooks except hook A in Zone Y. -
- Rank: Helper
- Registered: Dec 31, 1969
- Last visit: May 07, 2010
- Posts: 507
Thanks, yes, knowing this is coming is very helpful. I do need it for Pagesetter, so I guess I need to wait for that to handle it as well.
For the moment I've discovered that I can manipulate the display of a particular hook in it's template, but enclosing it in a div element and positioning it in a particular place on the page. I leave room for it in the Pagesetter doc template. Not a real elegant zone-based PN/Xanthia method, but it does work.
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
