I'm in the process of building my 1st extension (oi!) and I need to find a hook that allows me to fire off a routine when a member visits a single entry page.
I have listing pages and single view pages - I only need the routine to fire when viewing single entry pages NOT listing pages.
The list of hooks is extensive but I cannot seem to find one that fits.
The broad picture is:
I have an extension that relies on hooks to update the DB when ever a member adds a reply or adds a new entry. It gets a list of active users in the last 2 weeks, adds their member_id to Solspace 'Favorites' table in the DB in a separate collection.
This is working as expected as I can call the 'fav' module to mark entries on a list view page as 'unread'.
What I now need to do is when a user visits an entry, remove their member_id from the 'fav' table/collection. Someone adds a new comment/entry, it re-adds their member_id and marks the entry as 'unread' once again.
I believe the best approach is to make a module that I can call in the template code within the entry template to remove the user from the 'fav' DB table.