Recent Topics

1 Mar 13, 2005 17:18    

I've used the code from the originalb2 skin to make comments popup in a new window. How do I set the width/height of the popup window? (the default is too large for my liking)

2 Mar 14, 2005 03:16

If I'm not mistaken, the code to do the pop-up windows is a php include statement for a javascript file.

If you open that javascript file in a text editor, you'll see that it is simply a open.window javascript command. You can change the default window size (height/width) there.

BTW ... after looking at the file, I realized that one could simply include the javascript code directly into the _main.php file, eliminating the need to have the php include statement.

Either way ... that's where you change the size. (You also have access to all of the other parameters included with the open.window function ... scrollbar on/off, etc)

Cheers.

3 Mar 14, 2005 09:50

You can also change the height width by simply adding a couple of variables to the php include.

<?php comments_popup_script('height','width',scrollbars, status, resizeable); // Include javascript to open pop up windows ?>

These are in pixels, so just enter a number.For the other three, they're just booleans, so put in a true or false (or just leave them if you don't want to change them) in place of the words. They don't need ' and ' around them, but the height and width do. No need to mess around with javascript at all.

4 Mar 14, 2005 14:07

Thank you both for replying.
I used Grahams method because the javascript was actually in b2evocore\_functions_comments.php and I didnt want to screw around with it in case I broke something.

It worked and I can stop swearing at the screen now :]

Thanks again, much appreciated.


Form is loading...