![]() |
Attachments show up as links if larger than a certain size.
Note: I have revised this hack to use the MySql LENGTH() function.
This hack alters the attachment view property. If the size of the attached image is larger than a specified size, the attachment will show up as a hyperlink as opposed to the actual image. The size limit for the time being is hardcoded at 50000. I know I should have made it configurable. My apologies. :( I will work on it if anyone is interested. This hack was requested by Fzale. Here are the instructions on how to implement it. In admin/functions.php, look for the following text: PHP Code:
PHP Code:
|
Very nice. :)
Although, I think you should use LENGTH() directly in MySQL as I think it will be faster than catching the data for PHP. And, you should also do this query in showthread.php, in that huge query that gets all the info. That way you don't need to add another query for every attachment you have in the thread. Good job nonetheless! :) |
Thank you for the kind words and the suggestions. :)
I feel so honored to be complimented by the great FireFly. :) Thanks again. :) |
ver nice man... now I need to make my damn attachments hack :O
|
Thanks neo. :)
BTW, I like the ideas of your current projects. :) I will be very interested in getting them when you are finished. :) |
works perfect :)
thanks a bunch |
You're welcome. :)
|
Quote:
Do you have a little time to do the coding you explained? If not, its cool... :) (Thanks again Zzed) |
Ok, I revised the code to use the MySql LENGTH() function. I already tested it. Works like a charm. :)
I have already edited the original post and I have reposted the revised instructions file. ;) |
Quote:
|
All times are GMT. The time now is 09:22 PM. |
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:
|