The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Please Help: Trying to modify recent post hack to add post previews on front page
I am using this mod to add a list of the most recently posted threads at my forum ebeaver.
I am trying to add a preview of the thread's first post under the given titles, but I am having a hard time figuring out how to query? this out of vbulletin. Quote:
Can anyone point me in the right direction? |
#2
|
||||
|
||||
What is your Query? Are you even getting the pagetext in your query? And, after you do so, you need to format it and sometimes the coder changes the name of the field at that point. So, you'll have to look at your query and the code under it to figure out the correct variable to call.
|
#3
|
|||
|
|||
no I am certainly not getting the pagetext. I get zip from that code My problem is that I really have no idea what variable I have to call. I know that for displaying this the thread display template the variable is post.pagetext.
So I know that this may not be possible with only one variable call but I know I need to call the pagetext from the first post of the thread. (I hope that made sense) My difficulty is that the hack doesn't call any of the vbulletin native variables for posts that can be called but I can't find any relevant documentation on the native variables that would let me call posts or posts pagetext. I hope I made sense here, I am a bit of a code noob. |
#4
|
||||
|
||||
There are no 'native' variables to be used there. The only variables you may use are ones that you define. So, you need to go look at your php code and see what variables are defined. You can't just throw variables names out and hope they give you something. Well, I suppose you can do that, but you shouldn't be surprised if they give you nothing.
|
#5
|
|||
|
|||
ok, then, I suppose my problem is that I don't know for instance if there is a db query that would let me id the first post in a thread.
I am looking for information on how vbulletin stores all the thread and post data in the database so I can call it. or am I just showing my ignorance of php and sql? |
#6
|
||||
|
||||
The query is in the mod. You said you were using a mod and trying to modify the output. Well, the output comes from the code in the mod. So, you need to look at the modification code to see what the query is and what he is actually selecting and if the post text is one of the things being selected (probably not). If not, then you need to add it.
|
#7
|
|||
|
|||
ok, so the mod selects variables from the thread table so I added in a query for firstpostid, and I am adding in a query of the post table to select for the post's pagetext.
My problem now is how to use the firstpostid from the thread table query to properly select the pagetext from the post table query |
#8
|
||||
|
||||
SELECT pagetext FROM post WHERE postid = $firstpostid
You will need to format that correctly. You could probably just use a JOIN in your original query to grab that depending on what the query looks like. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|