Recent Topics

1 Jun 16, 2008 19:01    

Hi,
I wrote my own plug in to ask some extra fields when someone write a comment (Comment title, Localization, etc). It works fine, but when the moderator publish a comment I need a hook to be fired before a comment update because I need to modified dbchanges (if applied).

BTW, I need another one when the system display comments on the moderator view to show my own fields.

Is this possible?

2 Jun 17, 2008 09:01

About the closest you can get is "AfterCommentUpdate" which would at least allow you to do your changes

AFAIK there isn't a hook for when you're listing the comments in the admin area so you'd need to hack the core to add one ( inc/comments/view/_comment_list.inc.php )

¥

3 Jun 17, 2008 16:57

Extra form fields to process as part of a comment would be cool. BeforeCommentFormInsert lets you process comments before insertion from either outside or in the back office (in 242), and you can see captcha or turingtest for the hook that will let you add a form field for antispam purposes, but adding a form that gets treated as part of the comment input would be both a hack and way cool.

4 Jun 17, 2008 18:05

¥åßßå wrote:

About the closest you can get is "AfterCommentUpdate" which would at least allow you to do your changes
¥

But I have a little problem with this solution! If moderator doesn't change anything on the Comment data, the AfterCommentUpdate does not fire it up! So I can see if moderator change my "Comment Title", by example!

¥åßßå wrote:

AFAIK there isn't a hook for when you're listing the comments in the admin area so you'd need to hack the core to add one ( inc/comments/view/_comment_list.inc.php )
¥

Is there another way not modifying core files (inc/comments/view/_comment_list.inc.php). I don't want to have problem when I'll have to upgrade my version.

Sorry, I don't write/speak a good english!

5 Jun 17, 2008 19:07

EdB wrote:

EBeforeCommentFormInsert lets you process comments before insertion from either outside or in the back office (in 242)

I didn't know it worked for creating a comment in admin ... mind you, I didn't know you could create a comment in admin, you learn summat new every day .... but, for a "moderator" to be working on comments I assumed that the comment was already made, in which case that hook won't fire

wildduck wrote:

If moderator doesn't change anything on the Comment data

Sorry, but that's the current state of play, more hooks are always nice though, so maybe slapping in a request on the [url=http://forums.b2evolution.net/viewforum.php?f=8]Feature requests and Feedback[/url] would be a good idea? ;)

wildduck wrote:

Is there another way not modifying core files (inc/comments/view/_comment_list.inc.php). I don't want to have problem when I'll have to upgrade my version.

Not as far as I know.

wildduck wrote:

Sorry, I don't write/speak a good english!

You should see how crap my english is at times ;)

¥


Form is loading...