![]() |
Auto Resize images when Quoted
Auto Resize Images when they're Quoted
Test with: 3.6.5 This is a pretty basic add on and also my first add on. If you see anything messed up in the code or something that could be done better, please comment and I'll fix it. I'm relatively new to the add-on scene, so there could be better ways to do this. What does this mod do? images that get posted within the QUOTE tag will be resized to a width of 100. thumbnails will link to the url of the actual image. Installation: open includes/class_bbcode.php find: Code:
$template = $this->printable ? 'bbcode_quote_printable' : 'bbcode_quote'; Code:
$template = $this->printable ? 'bbcode_quote_printable' : 'bbcode_quote'; Code:
function handle_bbcode_img_match($link) Code:
function handle_bbcode_timg($link) That should be it. Hopefully it works for you! |
Nice thought, Creative idea, Ill try it on my test site :)
|
I'll try it on my test server.
|
working perfectly for me. thanks
|
Works flawlessly... Installed!
|
Nice one thanks :)
|
I changed this to resize to 200 pixels...
It would be great if it didn't increase the size of small images. |
works for 3.65
|
Quote:
|
I have a question regarding this and another hack.
I'm running the Nested Quotes hack and it seems to have killed this hack. I'm not good with the code or I'd fix it myself. Anyway if you feel it's worth your time I'd appreciate it. thanks edit// solved my problem. somewhere along the line the file got replaced so I just had to reapply the hack. |
Will this work with 3.6.9?
|
what a good idea! i'll try it too...
|
This mod work for vb4?
Thank's |
Quote:
Quote:
I think changing to a link would be better, this way no small images are enlarged and saves even more space. In the last code box find: PHP Code:
PHP Code:
|
Quote:
Is there any way you could modify this to return an if/then statement? I am using your modification above, but users are complaining and want to have the first image or two displayed as images, and the rest displayed as links. Is this easily possible? |
@Crimdog: Sorry that's a little out of my PHP knowledge, good idea though.
|
Quote:
Quote:
Quote:
|
All times are GMT. The time now is 04:47 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:
|