| w1ckd |
|
|---|---|
|
Hi,
I searched the whole forum as far as the searchresults go but with a negative result. When a user add a image in the forum he enters it by [img] However these images are always wider then my forum, so i always have that scrollbar. How could i change the [img] tag to a limited size ex" 500px width? It should be something with bbcode right? or is there a plugin? Thank you in advanced [/img][/img]For our Freedom and Yours!
|
| pieter |
|
|---|---|
|
Hi,
If you go to admin.php?m=bbcode Search for [img] In the column "Replacement" add inside the <img ...> a class: eg class="resizeimage" If got this: <a href="$1"><img src="$2" alt="" class="resizeimage" /></a> In css: /*This is for Jquery*/
/* for understanding browsers */
.resizeimage { max-width:250px;max-height:250px;}
/* for Internet Explorer */
/*\*/
* html .resizeimage{
border-width:1px solid #000000;
height: expression(this.height >= this.width && this.height > 250 ? '250px' : true);
width: expression(this.height < this.width && this.width > 250 ? '250px' : true);
}[/img]... can we help you ...
|
| w1ckd |
|
|---|---|
|
Thank you very mutch pieter
![]() For our Freedom and Yours!
|
| pieter |
|
|---|---|
|
Can you change the topic title?
change [img] in [ img ] That's why my post and your first have a [ /img ] at the end. ... can we help you ...
|
| GHengeveld |
|
|---|---|
|
That's an interesting bug. Best solution for the image resize problem is a piece of JavaScript that detects image sizes and downscales if necessary. I'm sure there's scripts like that available online.
|
| pieter |
|
|---|---|
|
this is javascript, I forgot the headerpart:
<script type="text/javascript">
$(document).ready(function() {
jQuery(function($) {
$("a[href]").filter(function() {
return /\.(jpg|png|gif)$/i.test(this.href);
}).slimbox({}, null, function(el) {
return (this == el) || (this.parentNode && (this.parentNode == el.parentNode));
});
});
$(".scale").jScale({ls:"550px"})
});
</script> ... can we help you ...
|
| Kort |
|
|---|---|
|
Any lightbox clone can handle resize for images marked by a rel or class, which is easy using bbcodes.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
|
| ez |
|
|---|---|
|
You can also do it with hooks and tpls..
I have made solutions were image sizes are controlled by php and not by js... ==- I say: Keep it EZ -==
|