The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I'm customisizing my threadbit and i want a download button for the attachment contained within the thread but im having difficulty getting the url correct.
Ive been using this .. Code:
<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]"> Any ideas where im going wrong? |
#2
|
|||
|
|||
![]()
You are trying to reference a thread from the threadbit. To my knowledge you must first reference a specific thread before calling any of its information.
Let me see what I can find out for you. Well mate, I can get everything to work except the display of the 'attachmentid'. If someone can chime in on how to display the attachmentid then this will work just fine. You need to modify your code to look like: PHP Code:
-What happens when there are multiple attachments? -In your original code, you did not have the HTML correct to even display anything, you only posted a link. -In the future, please remember, when you are calling thread information you must refer to them with "$thread". Hope I was able to help ![]() // Edit // I don't have the time to modify that, however that will display on every thread, regardless if there is an attachment. That must be modified to an IF statement to display/hide if there is/isn't an attachment. If I have time I will code and post. |
#3
|
||||
|
||||
![]()
I am pretty sure you will have to write a plugin to grab the attachmentid. And, as brought up, you will have to determine *which* attachmentid you are going to grab if there are multiple attachments.
|
#4
|
|||
|
|||
![]()
in the threadbit list, you always see the attachment icon when there is attachments in that thread... click on it, and you have a popup with the full list of all the attachments... click them and if you have permission, you will be able to download them too...
|
#5
|
||||
|
||||
![]()
I totally forgot about that. Thanks, nexia.
|
#6
|
|||
|
|||
![]()
Thankyou all for your replies, im still no further forward but i will have a play and see what i get.
There will always be an attachment in the forums i am using this in, these forums use a different template to the others. Thanks again |
#7
|
|||
|
|||
![]()
Before you begin tinkering with anything you may want to ask yourself the questions some of us presented. In specific how you will go about handling multiple attachments.
Question - Why is it you don't want the window to pop-up? Any specific reasoning behind that? |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|