So I am pretty new to this whole PostNuke thing. I've written a pretty basic block for the EZComments module. It pulls the x number of newest comments and displays them in the block.
You can choose whether you want to display the time, username, and if you want the username to link to the user's profile. All heavily inspired by the latest comments block, and the v4bJournal latest comments block.
I don't really know much about how security works in crazy ol' postnuke, so if you are crazy about security maybe this isn't for you. Also it will display *all* comments in the table regardless if the user has permissions to that topic/category/poll whatever. I guess that is a feature request.
The other wacky thing is for some reason the EZComments table doesn't show up when i do a pnDBGetTables(); so if your EZComments table isn't nuke_ezcomments and your users table isn't nuke_users then you may be out of luck.
Basically I am looking for some thoughts, and suggestions. Especially if I committed a major no-no somewhere.
Here is the link if you want to check it out.
Thanks!
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- alfonsomarin created topic »Fillters in Clip« 03:41 AM
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 03:19 AM
- 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
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
EZComments Block suggestions?
-
- Rank: Helper
- Registered: Apr 08, 2002
- Last visit: Oct 21, 2009
- Posts: 614
Thank you for your contribution. I will have a look at it how you have done things.
May I include it in the EZComments distribution?
Jörg -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 31, 2007
- Posts: 28
Hi jn - there is one for PagEd also if you are interested.
Download URL http://canvas.anubix.net/modules.php?op=modload&name=Downloads&file=index&req=viewsdownload&sid=4
Demo at the canvas site, bottom centre block. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 6
Yeah dude, go ahead you can do what ever you want with it. Like I said though, I really just want to learn how to do it "correctly." As I just kind of hacked that together. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 292
The reason that the tables aren't in the pntables array is because the information for that module has not been loaded. This happens automatically when you load an API for a module. You can also load the DB information with pnModDBInfoLoad('[modname]'). That may help you refine that code a bit. -
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 292
I don't think that is necessary since the array is naturally destroyed at the end of every server call. So when the server is done processing the page request that uses that array it gets recycled automatically. If you wanted to make sure of that through your code you could simply set your $pntables array to "" or use a function that does something equivalent, but I don't think it is needed. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: May 29, 2004
- Posts: 3
It's not working on my site, the block doesn't show up at all... When you said that the table needs to be nuke_ezcomments, is that case sensitive? Mine's nuke_EZComments... If this is the problem, is there a way to fix it? If this isn't the problem, is there anything else that could be wrong?
- Moderated by:
- Support
