This module gives Drupal the ability to easily change links into popup dialog boxes.
IMPORTANT INSTRUCTIONS
------------------------------------------------------------------------------------
Ajax updating only works with themes that have selectable content areas.
If you are not using garland, you will need to figure out the selector for your theme,
and enter it into the "Content Selector" field on the admin/build/themes/settings page
for your theme. Open the page.tpl.php file for your theme, and search for "print $content".
The $content should be surrounded by a div with an id. Ex:
In this case, just enter '#content-content' into the Content Selector field.
Unfortunately, a lot of themes do not have well defined content areas. Just add the div yourself,
and then complain on the issue queue for the theme. It is important that there are no other
print statements inside the div.
LIMITATIONS
------------------------------------------------------------------------------------
Does not work with tinymce. Unlikely to work with other WYSIWYG's.
HOW TO USE THE POPUPS API
------------------------------------------------------------------------------------
If you just want to use the built in admin links, just enable the Popups: Admin Links
module and you are good to go.
If you want to add popups behavior to new links, or incorporate popups into your module,
there are a couple of ways to do it.
#1) Attach popup behavior to a link with popups_add_popups() call.
----------------------------------------------------------------
// In your code
popups_add_popups(array('#mylink', '#mylink2=>array('width'=>'200px')));
This is the simplest method, especially if you want to pass in per-link options.
The first key is a jQuery selector. It should select an 'a' element (unless you
are using the 'href' option). See http://docs.jquery.com/Selectors to learn more
about jQuery selectors.
The array is a set of Options. See below for the list of options.
No array means just use the defualts.
Note: popups_add_popups does not work in template.php.
#2) Add the class="popup" to an existing link.
-------------------------------------------
And then either be sure popups_add_popups() is called sometime for the page,
or use the "Scan all pages for popup links" checkbox on the popups settings page.
Example on the theme level ("Scan all pages for popups links" must be checked):