The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Download counter attachments
Hi,
I'm looking for a mod that can show how many times a given attachment has been downloaded. E.g. next to the link in a post: movie-from-my-holiday.mpg (downloaded: 135 times) Is that possible? Thanks //Michael |
#2
|
||||
|
||||
That should be visible by default- it's called "views" but it's there.
Look at the attachment in this first post: https://www.vbulletin.com/forum/show...rum-04-23-2012 I see it is currently at "403 views." |
#3
|
|||
|
|||
It's excactly what I want! But that's not visible in my forum. Is it something that I have to "turn on"?
--------------- Added [DATE]1335779546[/DATE] at [TIME]1335779546[/TIME] --------------- Maybe something is wrong/missing in the postbit-attachment template? |
#4
|
||||
|
||||
Post a copy of your postbit attachment template here- they are small... Put it inside [CODE] bbcode so it's easy to read.
Or, here is the default code for postbit_attachment: Code:
<li> <img class="inlineimg" src="{vb:stylevar imgdir_attach}/{vb:raw attachment.attachmentextension}.gif" alt="{vb:rawphrase file_type_x, {vb:raw attachment.attachmentextension}}" /> <a href="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>>{vb:raw attachment.filename}</a> ({vb:raw attachment.filesize}<vb:if condition="$show['views']">, {vb:rawphrase x_views, {vb:raw attachment.counter}}</vb:if>) </li> |
#5
|
|||
|
|||
Seeing anything wrong?
Code:
<li> <img class="inlineimg" src="{vb:stylevar imgdir_attach}/{vb:raw attachment.attachmentextension}.gif" alt="{vb:rawphrase file_type_x, {vb:raw attachment.attachmentextension}}" /> <a href="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>>{vb:raw attachment.filename}</a> ({vb:raw attachment.filesize}<vb:if condition="$show['views']">, {vb:rawphrase x_views, {vb:raw attachment.counter}}</vb:if>) </li> |
#6
|
||||
|
||||
No... I don't know why the showing of views would be disabled- I didn't see any options that control this...
In the code change: Code:
<vb:if condition="$show['views']"> Code:
<vb:if condition="1"> There is an option in Admin CP -> Settings -> Options -> Attachment Options that lets you decide if views are updated immediately or the default once per hour to reduce load on the server. |
#7
|
|||
|
|||
I tried to change the code. Did nothing.
Do you mean "Message Attachment Options" in "Settings/Options"? I cant find the option you mention here. Thanks for the support! |
#8
|
||||
|
||||
Setting <vb:if condition="1"> made no change? Are you sure you made it to the correct style?
Can I get a link to a post on your forum with an attachment in it? The setting I was talking about is actually under "Server Settings and Optimization Options" - sorry. |
#9
|
|||
|
|||
I changed the postbit_attachment template in Postbit Templates.
Code:
<li> <img class="inlineimg" src="{vb:stylevar imgdir_attach}/{vb:raw attachment.attachmentextension}.gif" alt="{vb:rawphrase file_type_x, {vb:raw attachment.attachmentextension}}" /> <a href="attachment.php?{vb:raw session.sessionurl}attachmentid={vb:raw attachment.attachmentid}&d={vb:raw attachment.dateline}"<vb:if condition="$show['newwindow']"> target="_blank"</vb:if>>{vb:raw attachment.filename}</a> ({vb:raw attachment.filesize}<vb:if condition="1">, {vb:rawphrase x_views, {vb:raw attachment.counter}}</vb:if>) </li> |
#10
|
||||
|
||||
The link you sent me- the issue is those are "inline attachments" so they show up differently.
It actually tells you the views if you mouse-over the link. To get the real counter like they have on the link I sent you to vBulletin.com you need to edit the post and remove the attachments from being inline (just delete them from the editor box) and they will show up as real attached files with the view counter. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|