MyBB Community Forums

Full Version: popup Window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!
I do not know this mycode is really useful or not but I want to share it. it's a very very simple code! Big Grin

for showing your URLs or pics, etc you can use this, for example I use this in my forum for showing bar codes Big Grin

Title: popup window
Regular Expression:
\[popup\](.*?)\[/popup\]

Replacement:
For this field, if window size is not important use this code:
<a href="#" onclick="MyBB.popupWindow('$1');"><strong>VIEW</strong></a> 

And if it is important for you, use this code for show a popup window with specific height and width:
<a href="#" onclick="MyBB.popupWindow('$1', 'popup' , 500, 500);"><strong>VIEW</strong></a>

Enabled? Yes

[Image: lightbulb.gif]** You can change sizes with edit 500
('$1', 'popup' , 500, 500);



[Image: lightbulb.gif]** You can show an image replace "VIEW" word.
for this, change this code:
<strong>VIEW</strong>

to:
<img src="You image address" alt="title" border="0">


Is it useful? So rep me! [Image: nishkhand.gif]
Hi, I'm a noob and I'm afraid of meddling with the templates in my forum. I like the idea of this but is it okay if I request an image, or an example? I just want to see it so I can be sure this is something I wanted in the forum.
(2012-09-17, 05:45 PM)Deadite Wrote: [ -> ]Hi, I'm a noob and I'm afraid of meddling with the templates in my forum. I like the idea of this but is it okay if I request an image, or an example? I just want to see it so I can be sure this is something I wanted in the forum.

It's not related to the template system at all.

ACP > Configuration > MyCode > Add New MyCode