• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Alerts Action Hook ?

#1
Is there is hook to get alerts as they are generated? I'm working on a plugin for a friend using Node to handle real-time notifications, just trying to find the right location of the hook so I can push the alerts to the node server and display them to the correct users.

Also if any developer is interested in this project I don't mind sharing the node side code. Would be interesting for XenForo to be the one of the only forum software to support real-time notifications like FB which is as easy as a plugin.
 

Brogan

XenForo moderator
Staff member
#2
If you ask your friend to add your forum account to their customer account, you will then have access to the customer forums and I will be able to move this thread to the correct forum.
 
R

ragtek

Guest
#5
Is there is hook to get alerts as they are generated? I'm working on a plugin for a friend using Node to handle real-time notifications, just trying to find the right location of the hook so I can push the alerts to the node server and display them to the correct users.

Also if any developer is interested in this project I don't mind sharing the node side code. Would be interesting for XenForo to be the one of the only forum software to support real-time notifications like FB which is as easy as a plugin.
Yes.
Check the class XenForo_DataWriter_Alert.
That's the class responsible for creating/editing/deleting the alerts
 
#6
hmm, i seem to be having a problem, right now im extending using the proxy to extend XenForo_Model, so i can access the alertUser() function, but to build an alert I need to query the additional information so i need to access that alert's id, however once saved i cant seem to access the lat insert's id so i use it to query the db. Is there any specific way of getting it? or am i going about this the wrong way ? i just need to build the alert so i can pass it as JSON string.