Autopost Kunena with Shoutbox pro

Posts: 3
1 year 4 months ago - 1 year 4 months ago #4270 by zmx
Replied by zmx on topic Autopost Kunena with Shoutbox pro
thanks for the reply

this may be simpliest solution.

just use the $data->hold value and insert it in the shoutbox table as trashed value :)

if there is a way (event which triggers?) to check when a message is approved (later)
you may delete the trashed value, but I couldn't find if kunena sends some event on this.

for this we could use a $data->hold ? $data->id : 0 as trashed value to identify the entry later

it seems kunena doesn't trigger the beforeSave event when just approving a message,
so the only way I found is to always check if $data->hold == 0 within the $isNew === false
query and then update the shoutbox db table with set trashed = 0 where trashed = $data->id

and another suggestion:
may be you can add (part of) the topic title (substr or $data->subject) to the notification message
just using $data->subject as an add. TEXT::sprintf value
(I also use this on new post with message: "new post in topic xyz")
Last edit: 1 year 4 months ago by zmx.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum