Options for creating a file from a node?

drupalcornwall - May 14, 2008 - 15:56

Hi
I'm a relative noob and have no idea how to create a file from a node.

My situation is the need to fill out a content type ('business lead') composed of various cck fields, and auto export it's contents to a predefined folder (ideally outside the webroot) in a format that can be downloaded by users.

How would I go about this? Is there a 'node export' module that specifically does this that is non-coder friendly? I'm looking thru the modules but a bit baffled at the moment...

Thanks for any advice!

Drupal 5.7 by the way

Why use a file. you can

nevets - May 14, 2008 - 16:11

Why use a file. you can simply make the content type available on line for review by others.

The file version is to be sold

drupalcornwall - May 14, 2008 - 18:56

...as a file download in ubercart. It will contain data which is hidden in the display of the node on the site.

Basically, the node contains details about a Business Lead, and the downloadable file is the displayed node, plus some now visible contact details, which can be purchased by a financial advisor.

It's just a pain to have to retype the node into a .txt or whatever file and then ftp that to my downloads directory, and then attach that file to the displayed node as a purchasable feature. Well, not for me, but for the person who I'm building the system for! It just seems there should be a way of automating this...

I'm looking at the Import/Export API but not sure it does what I think it does.

Anyone got any ideas for this? :) Thanks

If people pay for access to

nevets - May 14, 2008 - 19:28

If people pay for access to all the lead data (vs a subset) you could use CCK to build your lead content type and then use field permissions to hide the "extra" fields from most people and only show to people who have a special role (that get after paying).

Would the field permissions module work for this?

drupalcornwall - May 14, 2008 - 19:36

I tried this, selling a role assignment, but had difficulty getting it to work - i'm not sure the cck field perms module for 5 is up to date with the latest cck? or i may have configured it wrong... it's important that only a single access is sold i.e. the appointment can only be sold to one user. it's then effectively sold out.

I had trouble as i think i couldn't restrict the granted role to a 'one off'. other nodes became fully visible. but maybe my error somewhere. It sounds perfectly doable, I'm just having trouble getting it right.

I think field perms is in cck core for D6 , wish it was production ready!

Thanks for your ideas... perhaps i'll give role perms another go. The download method is admittedly a little drawn out for what I want to do.

If only one person can by a

nevets - May 14, 2008 - 19:52

If only one person can by a lead field permission will not do the trick since it is role based and I doubt you want to make a role for every buyer. I seem to recall a module that does what you want, it allows for a short version for people who have not payed and the full version for people (or the person) that has payed but I can not recall the modules name.

sounds ideal

drupalcornwall - May 14, 2008 - 19:58

Would it have been a D5 module, in the last 18 months or so? i'll have a look for this... please do post if you recall anything else!

Thanks again

D5 module seen in the last

nevets - May 14, 2008 - 20:01

D5 module seen in the last 3-6 months.

The premium module is the

nevets - May 16, 2008 - 02:58

The premium module is the one I was thinking of.

If you're using Ecommerce,

danielb - February 7, 2009 - 06:12

If you're using Ecommerce, try EC Node Access Product http://drupal.org/project/ec_nodeaccess
Lets you buy view access to one or more nodes from a product node.

 
 

Drupal is a registered trademark of Dries Buytaert.