Browsing as a guest
Hello! You are currently browsing this thread as a guest, If you would like to reply to this thread, please
or Register


Spartan
How to Auto ReSize images on MyBB 1.8 & 1.6
#1
Hello Spartan here today I well be teaching you how to Automatically re-size an image in a mybb 1.8 or 1.6  forum post, Enjoy.
Since mybb doesn't do this already, I learned this code a while ago to us on my old forums.
I'm not sure where I learned it from, but heres how you do it.


Go To > Templates & Style > Theme (s) you use > Showthread.css

Now add this code to the top in advance mode
Change sizes if you'd like
Code:
.postimage {
    width: expression(this.width > 350 ? "350px" : true);
    max-width: 350px;
    max-height: 350px;
    height: expression(this.height > 350 ? "350px" : true);
}

After You have done that go to
> Configuration > MyCode > Add New

Title: image
Regular Expression *

Code:
\[img\](.*?)\[/img\]
Replacement *

Code:
<img class="postimage" src="$1"></img>

Done
Private message me with Questions, Comments, or Concerns.
Reply
#2
Nice man, is this active here?
Reply
#3
Yes sir
[Image: Pleiades_large.jpg]
Private message me with Questions, Comments, or Concerns.
Reply
#4
Great this will help me if I ever want to show of my background or send someone a bacgkround, and such.
Reply
#5
Can someone not using Chrome confirm this is still working?
Private message me with Questions, Comments, or Concerns.
Reply
#6
(10-15-2014, 04:38 AM)Spartan Wrote: Can someone not using Chrome confirm this is still working?

Internet explorer seems to be working.
Reply
#7
OI don't really have a use for the code but it's nice that's used here in case idk have big picturea
Reply
Browsing as a guest
Hello! You are currently browsing this thread as a guest, If you would like to reply to this thread, please
or Register