Gotta agree with you there, jbirchett. Hooks in general are way cool, but they could be even more useful as you describe.
I guess that, knowing this limitation, we could work on designing modules based around the fact. Split my project module into three different kinds of modules would help, because then I could have "people," "organizations," and "projects." But since it's already put together, this would involve a lot of work that probably wouldn't pay off enough to justify it.
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 10:33 PM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. 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
Multiple tables and hooks?
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 191
Same here. My module has guilds, guild halls, and matches, and I want users to be able to comment on all three object types. Writing three modules to maintain this data would be extreme overkill. It seems to me that this is a popular request, but since it's a core function, the only immediate workaround is the unique id solution, which I don't even want to look at. I'd rather restrict comments to matches only until the hooks module can be improved. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 26, 2007
- Posts: 8
I'm trying to do something similar with Pagesetter and EZComments. I want comments for specific publications within publication types i.e. tid_pid but all I'm seeing in the DB is tid_ e.g. 2_
Can someone point me to where I need to make any modifications to make it work? Is it in Pagesetter or EZComments? -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 395
Code
<!--[pnmodurl modname=db type=artist func=display id=$id display=comments assign=returnurl]-->
<!--[ pnmodcallhooks hookobject=item hookaction=display hookid=ar-$id module=db returnurl=$returnurl implode=false]-->
<!--[ $hooks.EZComments ]-->
all u need is a prefix for the id to get unique comments. for example in a module i made, artists are "ar-$id
", albums are "al-$id" etc etc.
edited by: cannibus, Mar 05, 2007 - 08:39 PM -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 191
FYI - I ended up doing the same thing in my module. Any time I call hooks, I prefix an "object type" string before the objectid. It works fine. The hook doesn't get the real object ID, but as long as you call hooks this way all the time, you're safe. In the DB, the objects are still auto incrementing integers, but hooks sees matches as m#, guild halls as gh#, etc.
- Moderated by:
- Support
