Current time: 07-24-2014, 12:21 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mybb İmage Size No Plugin Mycode!
03-02-2011, 02:01 PM (This post was last modified: 03-02-2011 10:02 PM by MaFeSa.)
Post: #11
RE: Mybb İmage Size No Plugin Mycode!
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
Find all posts by this user
Quote this message in a reply
03-02-2011, 10:55 PM
Post: #12
RE: Mybb İmage Size No Plugin Mycode!
(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?...html_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.

CodeWeavers - CrossOver: Windows Compatibility on Macintosh and Linux
[Image: Advocate_125.png]
Doesn't like unsolicited PMs
Find all posts by this user
Quote this message in a reply
03-03-2011, 06:34 AM (This post was last modified: 03-03-2011 12:18 PM by MaFeSa.)
Post: #13
RE: Mybb İmage Size No Plugin Mycode!
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
Find all posts by this user
Quote this message in a reply
07-06-2011, 08:40 AM
Post: #14
RE: Mybb İmage Size No Plugin Mycode!
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?
Find all posts by this user
Quote this message in a reply
04-22-2012, 02:03 AM (This post was last modified: 04-22-2012 12:11 PM by anori.)
Post: #15
RE: Mybb İmage Size No Plugin Mycode!
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.
Find all posts by this user
Quote this message in a reply
02-13-2013, 04:47 AM
Post: #16
RE: Mybb İmage Size No Plugin Mycode!
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?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread:

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication