The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
automatic change large image form [img] to [bimg]
I do not know if there is hack can do :
automatic change large image form [img] to [bimg] |
#2
|
||||
|
||||
There are a number of image resizer mods out there that will resize large images automatically- I've never seen a separate bbcode for big images.
|
#3
|
|||
|
|||
thanks BirdOPrey5 for your fast reply
I do not want to resize the image I need to make image as link if it's large so the page will load faster I think this will be good for SEO |
#4
|
||||
|
||||
OK well at least I understand the logic now.
This would be pretty easy to do be editing the bbcode file but the problem is it would need to request the file size of remote files on every page load, from a remote server. That will likely lead to much longer times for page loads, not save any time. Thinking out loud the only practical way to do this would be when the new post is first saved- do a check for each image and if it is bigger than X bytes in size replace the [img] code with [url] code. This way the delay is only going to happen when a user submits a new post. The major limit of this would be that if the remote file changed from a small image to a big image (or big to small) the post would remain hard-coded as an image or url based on when the post was first made. Someone would need to manually edit the post to fix that if it was a problem. Does [bimg] bbcode you talk about do anything different then a regular [url] bbcode? |
#5
|
|||
|
|||
I agree with you BirdOPrey5, The only way to do it have to be when the new post is first saved
[bimg] = regular [url] bbcode if it's difficult to know the file size then the image dimension is ok changing the file later I think will be rear for most of the cases so we can ignore it |
#6
|
||||
|
||||
File size will be easier to find then the dimensions, and file size is more important on how fast a page loads anyway. I see an admincp setting where you can set the max file size in kilobytes and any images larger than that value will be replaced with [url] links instead. If I get fancy maybe I'll put the file-size next to the link. Like....
http://somedomain.com/image.jpg (251 kb) I will probably play with this but no promises on how soon I can do it- if someone else comes along willing to try it I will gladly defer to them. |
#7
|
|||
|
|||
|
#8
|
||||
|
||||
Check it out: https://vborg.vbsupport.ru/showthrea...57#post2320457
|
#9
|
|||
|
|||
Thanks BirdOPrey5
Well done |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|