Video: Using the POPUPS API in Drupal6Video: Using the POPUPS API in Drupal6

Categories:

Have you ever wanted to add the dazzle of POPUPS to your site? Maybe you have used lightbox for the POPUP effect on images, but how do you simply add popups to other elements or pages or forms?

One of our faithful Drupal Video Blog watchers asked for an explanation of the POPUPS API module which can be downloaded at http://drupal.org/project/popups and does a very good job of explaining itself. But this video will get you through it even quicker!

Here's what I did:

  1. Install the POPUPS API module into your sites/all/modules directory
  2. I strongly suggest that you also visit the README file within the module folder ot see all the tips and tricks that they explain! :-)
  3. Enable the module
  4. Goto the settings pageSite-Configuration -> POPUPS
  5. Tick the box next to "Scan all pages for popups" [I do note that this may not be the best idea if your site gets a lot of traffic as this "scan" will draw upon some resources thta you may or maynot want running on every page request
  6. In my example I went into the hard-coded CONTACT ME link in my page.tpl.php and I added the POPUPS class to the anchor. [ex. <a href="/content/contact/doug-vann" class = "popups">Pop This Link</a>]
  7. After refreshing the page, we noticed that the link for CONTACT ME suddenly had a very small, little box near the upper right of the link-text.
  8. I clicked the link in the header at DougVann.com and, sure enough, the form popped up! [Want to say HELLO & test it out? Click my link (opens a new page) and see the popup in action!]

I have tested this method and submitting the form DOES result in a properly validated form submission. Look into the README file for various other classes you can apply to links to fine-tune the way the POPUP will interact with form submissions.

- Doug Vann

Doug Vann's picture

 I will certainly look into the Modal Window API. The Popups API was suggested to me for a project and as a video request for the CMSQS video blog. So I went for it.

When I tried it out it worked so well and so easily that I decided to stick with it.

I promise to visit the alternative and do a video on it as well.

- DV

Anonymous's picture

Popups API is deprecated...

patcon's picture

Thanks for the tutorial Doug! I'm at work, so haven't been able to watch it yet, but was there a reason you went with Popup API instead of Modal Window API? Was it that there was a feature you couldn't get otherwise?

Again, thanks so much for putting this together!

Need a Custom Designed Theme?

If you need a custom designed theme for your business then our designers can work with you to create a unique concept that is consistent with your brand, clearly communicates your value proposition and helps you achieve your goals. >> Click here to contact us and let us know about your needs and we'll analyze and provide you with an estimate for designing and development your custom theme.