Architecture Advice re: cck type modification with Javascript

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
rmjackson's picture

Hi Guys,

I'm looking for some advice on how to design a cck type modification, inserting some prompts before the $content actually loads the view. In a nutshell, when a user lands on the page/node, before the page renders the content, I need to present the user with a prompt, asking them if they really want to view this page. If yes, then I need to make a soap call to a .net service, passing it username, node id, and language variables, to track which nodes a user has viewed. Depending upon the response, I need to ask them if they're sure. If they elect not to view the page redirect them before the page renders. If they'd like to proceed, just load the content. I'm thinking the best way to do it is by creating a custom .tpl.php file specific to this cck type, using Javascript for the various prompts, and an include php function to handle the .net call, but I'd like to be sure. Any advice would be greatly appreciated so I leave a trail of happy Drupal Developers who follow me.

Sincerely,

Robbie Jackson

Comments

Misleading subject

raintonr's picture

OK, step back a second.

This username/password they would need to enter:

  • Is that defined per-user (each user has a separate user/pass - which differs from their standard login)?
  • Or is it per-node (eg, any user can type the correct user/pass for the node and see content)?
  • Or is it a combination of the two?

The title of your post is a bit misleading as the solution is little to do with CCK and more to do with node security.

I have no idea what the end goal you have in mind is, but to limit access to nodes close groups with OG or some other solution might be better?