Help with integrating coldfusion login with drupal

Events happening in the community are now at Drupal community events on www.drupal.org.
Femmebot's picture

Hi!
I am trying to figure out an easy way to make users on my site log in to a coldfusion database before they are able to view pdfs.

Here is what I have set up now:
http://aceee.rste040vlmp01.blackmesh.com/research-report/north-carolina-...

Current behavior: It has a link to the pdf on the page and when you click on it (without having logged in) you get a full iframed login page (in a same browser window) that has all the appropriate wrapper/formatting. Then, once you log in it opens the pdf in a new browser window (which leaves the full iframed browser blank after logging in).

Main downside: I have to create a new Drupal page for each pdf in order to support the iframe display. This is an issue because it is anticipated that there will be a lot of pdfs.

Can anyone out there with more PHP knowledge than I do help me set up a dynamic page so I don't have to create a log in page for each pdf?

I would like to set up a link on the pdf landing page to (something like):

http://aceee.rste040vlmp01.blackmesh.com/research-report/getfile.php?fil...

And then set up a dynamic page, that takes the parameters and displays the file name and opens an iframe pointing to the pdf: http://iframes.aceee.org/getfile.cfm?publicationid=126 (Where the 126 is a dynamic variable). I know that's coldfusion language, so what I need is the php way of doing it so Drupal understands.

Hope someone can help!

Moochas gracias,
Femmebot

Comments

Suggestion/Question

ben.bunk's picture

Where are the files located (ftp, database)?

Can you have drupal import the users or authenticate to the other database?

Importing users/authenticating to other database...

Femmebot's picture

Hi!

Thanks so much for the reply. Another developer said that the functionality I'm attempting can be done more cleanly by integrating parameters into Drupal directly since Drupal has a pretty decent API. He said, "We'll code a Drupal module that makes use of the filter and menu hooks. Using the menu hook the page can be passed additional parameters in the URI (e.g. if the iframe is at /node/3249, a call to the page might look like /node/3249/123 where 123 is the publication id) and we can grab those. Then using the filter hook, we can filter the content easily and replace the src attribute on the iframe so that the correct publication is loaded... it's more or less that straight‑forward and requires very little code."

Maybe this might help someone else with the same challenge...

Thanks again!
Femmebot

john.zhu's picture

I concur that fundamentally and cleanest approach, is to have Drupal replicate the CF login-logic all the way into UI. This is the best solution.

I would however offer that, the least elegant way is to have ColdFusion side to append a logic to accept a new token (say "Drupal_verified), that will be processed Drupal and then passed over to CF.

And CF code, when accepting this "Drupal_verified" the first-time, will set a ColdFusion's sesion.variable that can sustain the session or cookie.

However, I am not clear the overall business flow.
1. Are you saying that,
a) there is a PDF at the bottom of page of http://sameple/research-report/north-carolina-s-energy-future-electricit...
b) There will be another PDF at the bottom of node/1000001
c) There will be another PDF at the bottom of node/1000002 ...
Or
a) there will be a list of PDF at the bottom of page on http://sample/research-report/north-carolina-s-energy-future-electricity... ?

  1. Are you also asking that, once an user has login CF side once, he/she has been through a (kind of) Single-sign-on, so as not to need to login into CF database every time on?

Washington, DC Drupalers

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: