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