The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Here is code for VB3, how it can be work with VB4 damaged because the database of completely different vbb4 and it does not have postid.
Code:
$postid = $newpost['postid'];
$attachs = $vbulletin->db->query_read("
SELECT dateline, filename, attachmentid
FROM " . TABLE_PREFIX . "attachment
WHERE postid = $postid
ORDER BY attachmentid
");
|
|
#2
|
|||
|
|||
|
I think you want something like this:
Code:
$contenttypeid = vB_Types::instance()->getContentTypeID('vBForum_Post');
$postid = $newpost['postid'];
$attachs = $vbulletin->db->query_read("
SELECT dateline, filename, attachmentid
FROM " . TABLE_PREFIX . "attachment
WHERE contenttypeid = $contenttypeid AND contentid = $postid
ORDER BY attachmentid
");
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|