The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How does vB check which attachment is associated with which thread? In the 'thread' table, it just has a variable to determine if there is an attachment, and in the 'attachment' table it only has attachmentid.
I am trying to modify a news system to display a link to a file attachment at the end of the post. http://www.sandiegopegasus.com uses vB as the news system and many times there are file attachments. This would be *very* helpful! Thanks for any help! |
#2
|
||||
|
||||
Let's say you have $attachmentid:
Code:
$getthreadid=$DB_site->query_first("SELECT threadid FROM post WHERE attachmentid=".intval($attachmentid)); $threadid=$getthreadid['threadid']; |
#3
|
|||
|
|||
Quote:
? |
#4
|
||||
|
||||
Use regular mysql_query() if it's not a vBulletin page.
|
#5
|
|||
|
|||
So actually it was even easier than that. You don't need to do another sql query because the news program already gets the postid, which is all you need.
PHP Code:
|
#6
|
||||
|
||||
You are welcome.
|
#7
|
|||
|
|||
Thanks FireFly. You got me to actually think about how it works and I actually did something on my own!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|