The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Need to extract all the posts allocated to a thread and store this information in an array.
I can use the following to fetch thread info for 1 thread: PHP Code:
threadid : 29 title : Extract this thread firstpostid : 39 lastpostid : 43 lastpost : 1211157483 -- I don't know what this number is for? forumid : 3 ... And I can use the following to fetch post info for 1 post: PHP Code:
postid : 41 threadid : 29 parentid : 40 username : test userid : 2 title : 3rd post from Test User dateline : 1211155226 pagetext : This is a 3rd post ... Q1. The trouble I'm having is fetching ALL posts that belong to a thread. Q2. Can I do this using vB Data Managers (is there an existing DM for this?) or do I need to query the database via the vBulletin DB Class (https://vborg.vbsupport.ru/showthrea...ht=fetch_field ) Q3 - Heres my proposed solution. Please pick it to bits - security, speed, stupidity, etc.. Currently I'm thing of using Data Managers and looping through posts as follows: 1) fetch the thread_info 1st and find out it's LAST post ID and FIRST Post ID 2) fetch the post_info for the LAST post and save it's details to an array ($allposts) 3) use the LAST post's "parentid" to find the next post to look for. 4) repeat this process until the Post's "postid" == the Thread's "firstpostid" --------------- Added [DATE]1211242198[/DATE] at [TIME]1211242198[/TIME] --------------- This seems to work well: PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|