MyBB Community Forums

Full Version: Zoom MyCode (Not jQuery)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
A simple mycode that you put around an image. If you click on the image then the image will get bigger on each click, if you shift-click on an enlarged image then it will go back to standard size. No page reloads required.


Regular Expression
\[zoom\](.*?),(.*?),(.*?)\[/zoom\]

Replacement
<img class="zoom" src="$1" border="1" width="$2" height="$3"/>

Put the attached file in your jScripts folder and add the link to it in to your headerinclude
Incase anyone don't know how to use it, here is a simple example;
[zoom]IMAGE_PATH,WIDTH_IN_px,HEIGHT_IN_px[/zoom]

Make sure that the input values should retain the same structure.
Well thanks for sharing but what is the use of this mycode buddy ?
(2012-05-29, 04:33 AM)Verilog Wrote: [ -> ]Well thanks for sharing but what is the use of this mycode buddy ?

It was a request by someone. You can click on a small image and make it larger, then shift click and make it smaller.

Lots of things seem useless until you need or want them. Unless you are looking for something to do with the buddy list? In which case it is not any use. Or maybe you are calling me buddy, in which case please don't, I am not your buddy.
I think he asked because you didn't explain at all what the MyCode did in the first post. I didn't really understand either. "Zoom" is not very specific. And he called you buddy likely because English isn't his first language, and he was being nice. Your response however was shockingly rude for such a harmless question.
It is not my first language either Brad. I don't see the harm in asking him to not call me buddy.
(2012-05-29, 03:25 PM)Leefish Wrote: [ -> ]It is not my first language either Brad. I don't see the harm in asking him to not call me buddy.

It's just kind of an odd request, people don't usually have a problem being called buddy.

But staying on topic.....

Why would you want to define the width and height every time you use the mycode? Wouldn't it just be simpler to set it to something?
Well, it was the user who requested it like that. I made it and published it. I copied the set up for the post from another mycode post.
Sorry for calling you buddy, i asked because there was no info about it.
Yea, it is ok, I was confused with the buddy thing. I will edit the first post with some more detail assuming I can Big Grin
Pages: 1 2