MyBB Community Forums

Full Version: Mybb İmage Size No Plugin Mycode!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hi, is possible to open the image in a popup ?
Thanks Wink

I did this mycode (without edit global.css) and is working well !

<a href="javascript:void(0)" onClick="window.open('$1')"><img src="$1" style="max-width: 500px; max-height: 500px;" alt="Image" title="Image" /> </a>
There is only a problem with thumbnails, if I click on image it opens thumbnail and not the full image in the site Sad

[URL=http://imgNR.imageshack.us/i/full_image.jpg/][IMG]http://imgNR.imageshack.us/img707/3109/thumbnail.jpg[/IMG][/URL]

There is a solution ?
Many thanks
(2011-03-02, 02:01 PM)MaFeSa Wrote: [ -> ]Hi, is possible to open the image in a popup ?
Thanks Wink

I did this mycode (without edit global.css) and is working well !

<a href="javascript:void(0)" onClick="window.open('$1')"><img src="$1" style="max-width: 500px; max-height: 500px;" alt="Image" title="Image" /> </a>
There is only a problem with thumbnails, if I click on image it opens thumbnail and not the full image in the site Sad

[URL=http://imgNR.imageshack.us/i/full_image.jpg/][IMG]http://imgNR.imageshack.us/img707/3109/thumbnail.jpg[/IMG][/URL]

There is a solution ?
Many thanks

Erm, using the MyCode from the original post, this is what you should actually have:
Mybb İmage Size No Plugin Mycode

Add MyCode
Image Size Mycode

Title: maximage
Short Description: Mybb Max İmage No Plugin
Regular Expression:
\[img\](.*?)\[/img\]
Replacement:
<a href="javascript:void(0)" onclick="window.open('$1', '', 'toolbar=no');myWindow.focus();"><img src="$1" style="max-width: 500px; max-height: 500px;" alt="İmage" title="Click Photo To Enlarge" /></a>
Enabled? : Yes


For a demo, go to
http://www.w3schools.com/html/tryit.asp?...html_basic
And past in this code:
<html>
	<head>
	</head>
	<body>
		<a href="javascript:void(0)" onclick="myWindow=window.open('http://img1.jurko.net/wall/paper/redhead.jpg', '', 'toolbar=no');myWindow.focus();"><img src="http://img1.jurko.net/wall/paper/redhead.jpg" style="max-width: 250px; max-height: 250px;" alt="İmage" title="Click Photo To Enlarge" /></a>
	</body>
</html>

(Paste in the left pane, deleting what exists there)
Now click the Button above the left pane, and a photo of a readhead should appear in the right pane. If you click it, you'll get the full sized version.
WOWW thanks Dylan !!

If I click on image it opens thumbnail and not the full image o the Imageshack site ....

The img url with thumnail is
[URL=http://imgNR.imageshack.us/i/full_image.jpg/][IMG]http://imgNR.imageshack.us/img707/3109/thumbnail.jpg[/IMG][/URL]

Is possible to open only the link in the url ?
[URL=http://imgNR.imageshack.us/i/full_image.jpg/][/url]

The best way, I think, is not process images with small width but how ?

Thanks Blush
Many thanks go to Bycca, your solution is the best I ever seen.

One more question, how to make the same effect for upload attachment?

I know this is already an old post but i have a question.

Is it possible to add an additional function to this Mycode like:

[img=false] (link to image) [/img]

And when it says img=false it wont run this code below:
<a href="javascript:void(0)" onclick="window.open('$1', '', 'toolbar=no');myWindow.focus();"><img src="$1" style="max-width: 250px; max-height: 250px;" alt="İmage" title="Click Photo To Enlarge" /></a>

Wich means the image wont be resized but just displayed with the normal dimentions.

More or less a way for me to still be able to let images be the default size, while users get there images resized.
Oh and i know i could simply create a new MyCode like [noresize] or something. But i rather have it all in one MyCode if its possible ofcourse.
Working fine in my site...but last few days Click Photo To Enlarge not working showing blank page....image resizing but only Click Photo To Enlarge not working. Any solution Mybb experts?
Perfectly working...
thanks.
I'm using Imadige theme and I needed this MyCode, it works perfectly thanks !

I was wondering if we were able to use this code with <img> code from HTML. Does someone got a solution ? Because actually, I use a RSS which give pic and with Imadige it doesn't feet with it..  Undecided
Hey guys, just wondering, what would I need to change in the code to only have it apply to the images in the posts. I have custom image size set for the portal page and signature and this code appears to mess with those as well.
I have a question related to this mycode.

After using this its impossible in forum to add URL in image. User having an image in his signature with url of his steam profile for example, after using this mycode it also effects image in user's signature and instead of directing to that certain URL, it says " Click Photo To Enlarge " and it enlarges when you click.

Any solution?
Pages: 1 2 3