[eluser]thody[/eluser]
So, the challenge is this:
1. Check for new private messages in the DB
2. Return results to the view
3. This must be done on every page of the site for logged in users
4. I don't want to have to call these functions explicitly on every page (calling it in each controller constructor would be ok)
I'm trying to figure out the best way to do this with CodeIgniter. I'm a little fuzzy on what the best attack is (Library, Hook, Filter, etc.).
The library approach makes the most sense to me, but if I'm calling it from the constructor I'm not sure how to send the results to the view. Maybe store the results in $this->messages and create a hook to merge $this->messages with the data array going to the view?
What do you think CI gurus?