Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mybb İmage Size No Plugin Mycode!
#11
Hi, is possible to open the image in a popup ?
Thanks Wink

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

Code:
<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

Code:
[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
Reply
#12
(03-02-2011, 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 !

Code:
<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

Code:
[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:
Code:
\[img\](.*?)\[/img\]
Replacement:
Code:
<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?filename=tryhtml_basic
And past in this code:
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.
Reply
#13
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
Code:
[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 ?
Code:
[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
Reply
#14
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?

Reply
#15
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:

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

And when it says img=false it wont run this code below:
PHP Code:
<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.
Reply
#16
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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)