Jump to content

Populate pp_status in $this->memberData


(e) Eric

Recommended Posts

Posted

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...

Posted

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.

Posted

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?

  • 2 weeks later...
Posted

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.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...