![]() |
The most simple image resizer
1 Attachment(s)
If you're sick of all those JS based image resizers, you can use this simple code modification to resize high resolution images everywhere.
Go to: /includes/class_bbcode.php (Line 1987) Find: PHP Code:
PHP Code:
There are no other edits required, if user wants to see the full image he'll have to go right click and then view image. Which is in my opinion way better than that fancy "Click to see it in full resolution". Simple but effective! :D |
Very interesting simple edit... :up:
If you changed it to this: PHP Code:
|
Yup, that's also good. Even though you could add target="_blank" to open in a new window, to make it easier if there are many images in the thread.
|
hoe can we doing " alt="thema title" "
|
hi thanks for the mode
I use it like this Code:
return '<a target="_blank" href="'. $link .'"><img src="' . $link . '" border="0" alt="" style="max-width: 700px" /></a>'; if the image is has a link for a post or any url it will not lead to the link I want to for example https://vborg.vbsupport.ru/external/2011/08/49.png |
Ist here any way to set an if for the image size ?
I mean if the image size was bigger than 600px it makes it like this HTML Code:
return '<a href="'. $link .'"><img src="' . $link . '" border="0" alt="" style="max-width: 600px" /></a>'; HTML Code:
return '<img src="' . $link . '" border="0" alt="" style="max-width: 600px" />'; any help is really appreciated ... |
Yes and no...
You could test for it but it would require custom php code and you would need to download a copy of every image, at least temporarily, to you server so you could read the size- this would be a relatively slow process but possible, yes. |
thanks for the reply,
got it, so I think I am gonna leave it for now :) |
Simple and elegant solution. The BOP5 boost to it really helps too.
|
unfortunately if I add <a href="'. $link .'"> before the image links in class_bbcode.php, all of images will be linked to themselves so they won't accept URLs anymore.Its a big problem for my website.
|
All times are GMT. The time now is 10:07 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:
|