Hello.
I am trying to show a icon in WAP2 that links you to the full hot linked image. Want users able to see images, but not forced to. I have figured this out with attachments, but they are outputted different. My forum resizes pictures in topics at width=760. Also these have extra code that links to the full image. So you start with something like this.
[url=http://somesite.com/test.jpg][img width=760 height=570]http://somesite.com/test.jpg[/img][/url]
I would like the end with something like this for $wireless_message.
[url=http://somesite.com/test.jpg][img]http://somesitet.com/thumb_icon.jpg[/img][/url]
Showing thumb_icon instead or resized pic. I think I need to do this with preg_replace, but im not sure how to search and replace here.
Replace
from [img to [/img]
With
[img]http://somesitet.com/thumb_icon.jpg[/img]
This is were it gets tricky for me. The replace link changes a lot and there might be multiples. It will probably break smileys to.
$wireless_message = preg_replace("??????????", "\[img\]http://somesitet.com/thumb_icon.jpg\[/img\]", $wireless_message)
Is this even possible with expressions? Spent some time searching and trying with no luck. Any help is appreciated.
Thanks Todd
Solved!
Added to wireless.css
img {
max-width: 100%;
height: auto;
}
img {
max-height: 100%;
width: auto;
}