- Moderated by:
- Support Team
-
- rank:
-
Freshman
- registered:
- January 2006
- Status:
- offline
- last visit:
- 30.03.06
- Posts:
- 18
Hey folks
I am going to develop a custom module and I want to have comments on several pages. I have a few questions which I were not able to find any information about by searching..
1. Can someone point me to some docs to help me write my module to support hooks?
2. Is EZComments the recommended comment module? I've seen at least one other (dpComments or something)
3. How do I actually put comments on a specific page? I call a hook function?
Thanks in advance for helping! -
- rank:
-
Professional
- registered:
- January 2004
- Status:
- offline
- last visit:
- 22.03.06
- Posts:
- 958
Hi,
- [*:1883429e6b]The latest addition to docs.postnuke.com is about the example module. That module also shows the usage of hooks calls. I'm not sure if the hooks code is commented on but you can always ask specific questions here.
- [*:1883429e6b]I think it depends on who you ask whether EZComments is the *recommended* comment module but I like it a lot. But then again I also like EZForumComments...
- [*:1883429e6b]Yes, at least if you use EZComments or EZForumComments you call a display hook and that makes sure the comments belonging to the item from your module are displayed together with the links/buttons to add comments.
HTH and Happy Coding! -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
In answer to 2 as ainigma32 has covered 1 and 3 well..... EZComments will replace all commenting code shipped with PostNuke.8x and beyond. IMO it's the best commenting module for PostNuke
-Mark -
- rank:
-
Helper
- registered:
- November 2002
- Status:
- offline
- last visit:
- 29.05.07
- Posts:
- 203
I looked through my document and noticed I had somehow skipped over the example_user_display.htm template, which is where EZ Comments would be called via hooks. I updated the document to detail this template and also updated the example_user_view template because I actually understand hooks a little better now. I had some questions about the last two lines of the template in the original version of the doc.
The new section is 2.4.1.6 Displaying an item in detail – example_user_display.htm
Link -
- rank:
-
Freshman
- registered:
- January 2006
- Status:
- offline
- last visit:
- 30.03.06
- Posts:
- 18
Thanks for the answers everyone, I have EZComments working on .761.
My problem now is that I also need a commenting module for a .750 installation (it's not my decision to upgrade or not although I am of course saying that it should be done :) ).
Is it at all possible to get EZComments on a .750 installation, and if so, can you give me a few hints how it's different from .761?
Thanks in advance.
(if it's not possible, can you suggest an alternative that is rather good?) -
- rank:
-
Steering Committee
- registered:
- December 2002
- Status:
- offline
- last visit:
- 23.11.08
- Posts:
- 13415
Hooks are pretty much identical in .750 as in .760 - the only difference is that some of the core modules don't take to hooks as readily.
--
Regards,
Simon
itbegins.co.uk - Zikula Consulting
Please read the Support Guide -
- rank:
-
Freshman
- registered:
- January 2006
- Status:
- offline
- last visit:
- 30.03.06
- Posts:
- 18
Thanks all
I have EZComments working under .750 also, although I read several places that it was not possible :)
I only have one issue: returnurl
For some reason, returnurl is always sending the user back to the index page after having submitted a comment (happens in .761 also). I know I'm passing a correct URL to returnurl, and I've tried writing it straight in like below also.
Code
<!--[pnmodcallhooks hookobject="item" hookaction="display"
hookid="$id" module="myModule" returnurl="http://www.postnuke.com/"]-->
This is located in a template. The $id is unique and things are working except the returnurl.. any ideas?
Code
<input type="hidden" name="EZComments_redirect" id="EZComments_redirect" value="" />
No value there.. the rest of the form is correct
I tried reading the source of EZComments but I couldn't find where the EZComments_redirect is being set -
- rank:
-
Professional
- registered:
- January 2004
- Status:
- offline
- last visit:
- 22.03.06
- Posts:
- 958
/modules/EZComments/pnuser.php line 120Code
if (!is_array($args['extrainfo'])) {
$pnRender->assign('redirect', $args['extrainfo']);
} else {
$pnRender->assign('redirect', $args['extrainfo']['returnurl']);
}
Maybe you could try a print_r($args) to see what's being passed to EZComments?
HTH -
- rank:
-
Freshman
- registered:
- January 2006
- Status:
- offline
- last visit:
- 30.03.06
- Posts:
- 18
I was using this version of EZComments:
http://lottasophie.sourceforge.net/index.php?name=Downloads&req=viewdownload&cid=3
EZComments 0.2 preview
I will try EZComments_1_3_RC1 now, and I'm guessing that's where I will get trouble installing for .750 :| -
- rank:
-
Moderator
- registered:
- March 2002
- Status:
- offline
- last visit:
- 26.08.08
- Posts:
- 7720
