Sorry to bother you with the following:
I'm trying to write a plugin that adds some functionality to made comments for a short time. To identify the comments made by a specific user, I wanted to save the session_id() combined with the comment_id. But I don't succeed in reading the comment_id. Shouldn't something like
I don't have the code right now, but in those cases I usually fopen() a logfile for writing, and simply dump a print_r() of $eventData and $addData to the file, and then see what the keys/values are...?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Thanks Garvin.
Going that way revealed $addData was really empty, I forgot to add it to the event_hook-call.
I fear that the 'comment_id' ain't what I searched. Neither $eventData nor $addData contain an unique_id which I could use to identify the saved comment when it get fetched again. comment_id seems to be just the entry_id. Do I oversee something?
sincerely
You're right. The return value of serendipity_insertComment() is not stured. This is a bug of the s9y core, we need to store that and commit it to trunk.
Until then, you might want to call serendipity_db_insert_id() again in the frontend_savecomment_finish hook, and hope that no other plugin listened on that hook already and made a new insert statement
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Sorry, I forgot to report back here. Yesterday I committed an update and now set "comment_cid" to $cid. I left "comment_id" to point to $id, because it might be that other people's plugin already used that..
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/