The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How would I go about printing the filehash beside attachemnt name?
So as the subject says, I want to display the filehash from the attachment table beside the attachment when you are viewing a post...
So something like this in the attachement section filename.zip (1.9 KB, 2 views) (MD5: *filehash*) replacing *filehash with the value from the table... How would I mod the templates to do that (and which templates)? |
#2
|
||||
|
||||
anyone? Someone out there has got to have already done this before....
|
#3
|
||||
|
||||
It would require hooking into the attachment upload process and scanning for the MD5 hash using md5file().
|
#4
|
||||
|
||||
the hash is already stored in the attachment database. But I don't know what to edit to get it to show up in the template...
It is in the database at attachment->filehash So how do I get this value to show beside attachment in the showthread template (I think that is the right template)?? |
#5
|
||||
|
||||
There is an attachment template, you'll have to edit that and add the text you want with the corresponding variable.
|
#6
|
||||
|
||||
ok, but what is the variable I use? That is the part that I am having trouble figuring out...
|
#7
|
||||
|
||||
What are some of the other ones in the template?
|
#8
|
|||
|
|||
If you get this to work, it would be great if you could share it. thanks.
|
#9
|
||||
|
||||
I was bored, so I decided to find out for you guys. In the template postbit_attachment, find:
Code:
($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>) Code:
($attachment[filesize]<if condition="$show['views']">, <phrase 1="$attachment[counter]">$vbphrase[x_views]</phrase></if>) (MD5: $attachment[filehash]) |
#10
|
||||
|
||||
Thanks!
Ok, not working. $attachment[filehash] prints nothing. Is there something elsewhere that has to populate the array or something? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|