Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt November 11, 2024
(e) Eric Posted June 19, 2010 Posted June 19, 2010 I noticed that the memberData array in 3.1 does not keep the member's current status in pp_status anymore. Not sure if this is intentional, but if there is no reason for it to be empty, it might be a good idea to go add it back. I'm updating Post Author's Status, and without the member's pp_status easily accessible, I'll need to add another hook somewhere to grab it. And that probably won't be too efficient, depending on how $this->registry->getClass('memberStatus')->fetch works...
bfarber Posted June 23, 2010 Posted June 23, 2010 pp_status was used when a user had a single status. Now that the status system has been overhauled, it's not feasible to do that. I suppose it's possible to cache the last status, but there's not much point on *our* end to do that.
(e) Eric Posted June 23, 2010 Author Posted June 23, 2010 Yeah, makes sense. Would you by any chance have a recommendation for a good spot i could hook into to add each poster's latest status into their pp_status for topic view? One that wouldn't add 20 queries per topic?
(e) Eric Posted July 3, 2010 Author Posted July 3, 2010 I got this all sorted now. :) I made a template hook and in replaceOutput (OMG I didn't even know there was that method until 2 days ago when I reread the template hook article again) I went through the postData and grabbed all the unique poster ids. Then ran a simple query to grab the latest status for all those posters ids, and lastly looped through postData and added each author's status to pp_status.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.