![]() |
Attachment Size in Postbit (like vb3)
First off, I take no credit for this hack. It was created by Mist. He does some wonderful work! If you need something custom made, contact him.
I decided to release this as I thought it may be useful to others. What it does: This hack simply adds the file size (in kb) next to an attachment, kinda like vb3 does. vb3 uses bytes, but I thought it would be cleaner in kb One edit each to showthread.php and functions.php One modification to postbit_attachments template. I cannot provide support for this hack. |
nice work matey :)
|
Nice work, I'll add this to my site as I've been up all night working on it! :)
|
Nice one mate ;) any chance you could PM me how much it cost to get it done? Im just thinking of getting a custom one made thats all and needed a rough idea. I'ma install this baby now :) Cheers!
|
Quote:
|
Quote:
|
I've thought of a couple of hacks i would like made, but money is the issue for me, Basically i cant afford to spend out loads on a hack :p Hence me asking how much this one cost
|
Thanks, it's great!
Could you make another add-on, so I can choose the place where the attachment link shows up - in the left or right corner, or at the top of the post, can you?! |
Ok then please contact me in private instead of discussing this publically :)
|
Yeah fair enough but i wasnt really discussing it ;) Just asked him to PM me telling me how much it cost. So you might hear from me soon Mist ;)
|
I am runing vb 2.3 and installed this hack but all attachments says this Files downloaded X amount of times 0 kbs No matter file size it is allways 0kb any ideas
|
haven`t downloaded but I`m guessing that this will only work on new attachments as it writes the filesize into the table along with the rest of the attachment data and then just reads it from there for the postbit..
|
Quote:
|
Quote:
|
Here is what i have done.
In functions.php Code:
if ($post[attachmentid]!=0 and $post[attachmentvisible]) { Code:
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')." Code:
<p><normalfont><img src="{imagesfolder}/attach/$post[attachmentextension].gif" width="16" height="16" border="0" alt="">Attachment: <a href="attachment.php?s=$session[sessionhash]&postid=$post[postid]" target="_blank">$post[filename]</a></normalfont><br> |
Just a minor note tpearl5, your installation instructions is missing the $ sign off of the 1st piece of code to find.
This bit-- PHP Code:
|
Quote:
|
Quote:
|
I also have the 0kbs problem on vb 2.3.2. I doubled checked everything twice... even removed it and installed it again... but still nothing :(
|
Quote:
in 2.2.9 the showthead.php has Code:
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter good hack btw |
That did it... Thanks sir.
|
Quote:
That did it :) Thanks for helping out ! [high]* mskgr clicks install :)[/high] |
nice
|
I must been doing something wrong in here, although i checked it twice,
The files is 20kbs, not 20320kbs.. |
All times are GMT. The time now is 03:52 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|