Gobb
Member
Hi,
Just wanting to know if there are any real negatives to hooking into the controller post dispatch functionality to add additional params which are obtained via SessionActivity repository/finder/entity? I understand ideally I would be extending the Index action of the Thread parent. However, I'm just making a simple 'user's viewing the thread' addon for XF2 for a forum with approx 10 users on at any one time and extending the Index action doesn't display the user clicking into the thread on initial load. However, it works correctly by extending the controller post dispatch as this allows the data to be fetched after the user activity has been updated. As far as I can tell querying the session activity table instead of making and maintaining another table makes the most sense in my case?
Or is this method of adding additional params not really best practice/correct?
Any guidance would be appreciated,
Thanks
Just wanting to know if there are any real negatives to hooking into the controller post dispatch functionality to add additional params which are obtained via SessionActivity repository/finder/entity? I understand ideally I would be extending the Index action of the Thread parent. However, I'm just making a simple 'user's viewing the thread' addon for XF2 for a forum with approx 10 users on at any one time and extending the Index action doesn't display the user clicking into the thread on initial load. However, it works correctly by extending the controller post dispatch as this allows the data to be fetched after the user activity has been updated. As far as I can tell querying the session activity table instead of making and maintaining another table makes the most sense in my case?
Or is this method of adding additional params not really best practice/correct?
Any guidance would be appreciated,
Thanks