Would be great if it does what promiced I've editted an already placed oversized image that whas reduced with the 3.xx BIMG tags but it did not turn into a link. Maybe it will only work with new posted images.
Would be great if it does what promiced I've editted an already placed oversized image that whas reduced with the 3.xx BIMG tags but it did not turn into a link. Maybe it will only work with new posted images.
It should work with all [img] tags providing that they are [img]url[/img] or [IMG]url[/IMG].
The only thing it won't work with is pure HTML. But no-one allows users to post HTML because of security risks, right?
Anyhow, so long as you have a DOM capable browser that supports XmlHttp and either element.parentElement (IE6) or element.parentNode (Mozilla and the others, this is the W3C implementation)... then it will call the script.
Oh, but if you have edited your templates from the vb default and nuked the following from the postbit templates, then you will prevent the hack from working:
And if you're sure it's not working, just say and I'll add some trace/debug stuff to it so that you can optionally see it working before you switch it to run silently.
Would be great if it does what promiced I've editted an already placed oversized image that whas reduced with the 3.xx BIMG tags but it did not turn into a link. Maybe it will only work with new posted images.
I think I read that wrong too.
With the hack installed you don't need to edit anything
You just view them.
Order of events:
Registered user views a thread
Thread contains large images in the post body
Image gets detected by the JavaScript
JavaScript SILENTLY calls the trimOversizedImages.php file
The php file checks that the postId supplied is cool, and then converts the [img] bbcode to [url] bbcode
That user, still saw the image and wasn't even aware that he just caused the large image to be converted on the server. However the next refresh of that page goes like this:
User views a thread
That's it Because the large image was converted to a link, so none of the above repeats itself.
So you don't need to edit anything. Just CTRL+F5 to ensure your browser has the latest version of vbulletin_global.js, and then view the thread. Once viewed, click CTRL+F5 again to refresh the page and the image should be gone.
Refreshed several times, logged in and logged out etc. but the image stays large. I've looked into the js and the url to trimOversizedImages.php is correct. I'll check the
I'll add a debugging option for you... that way you can see what happens... via the wonder of JavaScript alerts
It will be off by default, but you can enable and disable debugging and if enabled it will give you popup messages from the web service saying what happened.
<a href="http://www.cyberty.nl/forums/showthread.php?t=8987" target="_blank">http://www.cyberty.nl/forums/showthread.php?t=8987</a> look at the size (should be 500 - 500 when conversion to link must work) ... it shows no alert, no reducing.