![]() |
Quote:
I'm going to have to look into it a bit more. |
Quote:
replace this line in your class_bbcode.php file: Code:
return '<img src="' . $link . '" border="0" alt="" />'; Code:
return '<img style="max-width:800px;" style= "width: expression(this.width > 800 ? 800: true);" src="' . $link . '" border="0" alt="" >'; IE, in it's infinite wisdom, decided to not include this style attribute. As a result we have to use a java expression to resize the image. In the past there were issues if I quoted a post with an image in it, but it appears to be better now that the two style expressions are seperate. With any luck IE will add the "max-width" and "max-height" expression for future versions of IE. |
^^Works great mate...thanks...
Peace |
|
ot
for the attach,someone has an idea for me? |
I'm not sure if something is seeing is related to this hack or not but in either case, I could use a little help.
I'm seeing some weird behavior, ONLY in IE. The image in question is being resized properly but the page is still going wide...even though the image isn't even wide enough to caus that to begin with! Here's what I've discovered. If I paste the page source into Dreamweaver and save it and preview it in IE, the page is still strtched wide, inspite of all the missing css and images...so I start debugging and find the fulcrum upon which this behavior tilts. There is an image: http://i68.photobucket.com/albums/i1...ccident015.jpg if I edit the URL so that the host is www and not i68, the horizontal scrolling issue disappears. Can anyone see any reason for this either due to this hack or IE itself? |
none of the codes work for vBulletin 3.6 Beta 3. (at least if you edit the message)
PHP Code:
|
Some invalid html image code shows up if you edit the message...
|
Quote:
I tryed this hack before https://vborg.vbsupport.ru/showthrea...t=99286&page=7 which does have that option but i had loads of trouble getting it to work.Sometimes it would work others it would not especially in IE6.Thanks also note im using VB 3.5.4 if thats of any relivence. |
Quote:
See, the reason I needed an image resizer was mostly for my news fetch (click here to see what I mean). I'm perfectly fine with everything, except the bbs main body is actually larger than the news fetch body, and it poses a problem with signatures. I'm ok with main body images being resized, but is there a way to keep signatures unaffected by image resizes? Or, even better, make it so that the signature images have a different resize limit? EDIT: Nevermind, I found out how to make the image stay at it's normal size unless it stretches the page. Just replace this: PHP Code:
PHP Code:
|
Anyone using this code with vb 3.6 ?
|
Quote:
|
Quote:
http://www.vgreality.com/testphp.php |
Yeah i know what you mean,I have been trying to do the same with the script found on a previous page but it seems the script will not accept sizes in % rather then pixels.I liked that script over the one you are looking at mainly due to the fact that it has the ability for a user to click the resized image to display the original image in a new window.It seems vB doesnt allow to many things in % in it's code not even the sizes for the text editor which would be really handy.
|
Quote:
|
I love the idea of this but am confused as to which of the codes I should be using.
I am running 3.5.1 and want to make sure these image sizes stay at 450 pixels wide. Thanks for any help. |
Quote:
I tried this and images no longer appear. Damn... I love the idea of only one line. |
NEW METHOD:
I can't believe I didn't think of this before. Some of you may have editted your class_bbcode.php ( as per my instructions before ) to have it work correctly. I'd now recommend you don't do that and just add a few lines to your CSS file instead. Add the following to your CSS: Code:
IMG { The benefits of doing it this way are hopefully obvious. No code changes are required, so upgrading won't be an issue. IE is the real problem here b/c they are not totally CSS2 compliant. I believe it's been fixed with IE7, but the second statement (width: expression..) is just for people using old browsers. |
^^ That wont work because it even resized large image headers on sites that use forum width sized banners - its resizing banners on my site
|
Quote:
Thanks. |
ok for vb 3.6?
|
Yes. Works fine with vb 3.6.
|
Quote:
|
I've found an alternative solution (I'm running a vBulletin 3.6.1 board)
Open your /forum/includes/class_bbcode.php file: On line 1879, replace: PHP Code:
PHP Code:
HTML Code:
.resize {max-width: 728px; width: expression(this.width > 728 ? 728: true);} Tested both in IE7 RC1 & Firefox 1.5.0.7 Resized image will keep it's link if it has any. Demo: http://www.msxlabs.org/forum/dogadan...tml#post224010 Actual image width is 1024 pixels (resized to 728px) and the thumbnail keeps the link. |
Very useful, neutralizer thanks - this is by far the easiest way to do this.
I personally set both max width and max height in the CSS definition, as extremely 'tall' images can be annoying too, i.e. I use this CSS code: HTML Code:
.resize /EDIT: Nevermind, I wound up modifying and using the code here and it works a treat for me :) |
Quote:
|
Quote:
|
I'm confused !! which code is used for vB3.5.5 ??
|
This works great but how do I stop the images in signatures from being resized too?
Thanks Quote:
|
in vb 3.6.3 not work.
when I can change the code? thank's. |
Quote:
|
Quote:
|
lol. still working even on 3.7.0. beta2 :)
not sure why it is not default in vbulletin??? |
Quote:
this tut so cool, have no "product" & no javascript ^^ thank you very much |
problem:
if image width is smaller "max-width", it still makes a "link" on that image. |
Made a slight tweak, to remove the link if the image was smaller than or 730px wide:
PHP Code:
also working on getting lightbox2 working with it :) ANYONE using My code pre 12:44 20th january 2008 CET please update your code! |
All times are GMT. The time now is 05:58 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:
|