Online document "cart"
July 8, 2011 9:18 AM   Subscribe

Development question: What is the functionality behind the "binder" module on this site: and how can it be recreated in Drupal/Joomla open source world? Thanks...

I'm not a developer but want to learn more about the functionality behind the "binder" tool on the linked law site and also learn how it could be recreated in open source ( and the effort behind it) If there's a module that achieves this it would be great but I doubt it.

The binder does two things, it seems, for all text content items across the site:

1) Saves links
2) Allows the collection of links "cart" to be emailed to the user and/or pdf downloaded.

No payment or signup is required.
posted by sweetkid to Computers & Internet (4 answers total)
Builtwith is your friend, first of all.

They are using and Javascript. You could do the same with PHP (what the open source CMSes use) and Javascript. Basically, when you click on, say, a lawyer BIO, JavaScript calls ASP which notes that you've added that page in your browser session on the server. When you're ready to convert to PDF, you click on the link and Javascript has the server generate the PDF (libraries for this in any language) and then display the download link using what's called a callback function in JavaScript.
posted by michaelh at 9:26 AM on July 8, 2011 [1 favorite]

posted by sweetkid at 9:35 AM on July 8, 2011

The overall concept is extremely simple - no more than a couple hours work for a competent developer - then add a dash of javascript (ajax specifically) to streamline the process.

Most likely they're storing a database reference to the content as well as the raw url (saves having to reparse the url to find the content later) then they're using a html->pdf library to render page content from the db. All, pretty simple stuff. I guess its also possible they have set up pdf rendering instructions for each page (the automatic html->pdf libraries I've worked with don't usually come out that nice, especially with css) but its more likely they've just found one that handles css well.
posted by missmagenta at 9:40 AM on July 8, 2011 [1 favorite]

If I were using Drupal, I'd:
  • Use the Flag module, which allows each user to manage a custom list of bookmarked content
  • Use the Views module to create various sliced and diced listings of the content they've bookmarked
  • Use the Views PDF module to let people download the content they've bookmarked in PDF format
  • Dig around for a module that lets them receive the contents of a View via email.
You can code it from scratch, definitely. If you're interested in adding that kind of functionality to an existing Drupal site, though, those are the building blocks I'd start with.
posted by verb at 3:54 PM on July 8, 2011 [1 favorite]

« Older How can I cool my top floor?   |   Vistaprint for over-sized postcards? Yay or nay? Newer »
This thread is closed to new comments.