PDA

View Full Version : Last poster info on forumhome


Maccrob
08-27-2011, 09:47 AM
Hi all.
I try to get additional information about last posters on forum home without performing new query. On forum thread lists I used hooks and JOIN some db requests to append needed data into $thread. But on forum home there is no such variable like $thread or db query where I can add my ‘JOINs’ query.
So, is there any possibility to get needed data about last poster on forumhome without new db request?

Lynne
08-27-2011, 01:51 PM
The last poster info is actually stored in the datastore table all together so it is easily accessible. You would need to actually modify the query that saves that information when a post is made.

Maccrob
08-28-2011, 01:51 AM
Thanks, I checked this table and queries which save data to this table. But datastore doesn't store needed data (maybe I misunderstood something). Sorry, I’ll make more clear explanation about what exactly I want to achieve.
In user table I have two additional columns: xperience and post_thanks_thanked_times. I wanna use these data on forumhome in $lastpostinfo variable to display them in forumhome_lastpostby template.
Of course, I can hook into lastpostby, make query, but I try to find another way with adding JOIN to existed query (because some data about last poster already retrieved on forumhome)

Lynne
08-28-2011, 02:14 AM
Look at the datastore table where title=forumcache (yes, it is all serialized) and you will see where all that information is saved. You need to put your information into there also.