I'm a drupal newbie planning to convert an existing *very* simple database driven web site http://e3rg.pserc.cornell.edu/ to drupal. My goals are to (1) learn drupal and (2) make the content management of the site accessible to a non-technical person.
I was wondering if someone with drupal experience could spare 5 or 10 minutes to have a look at the existing site and then give me some pointers on mapping things to the appropriate drupal features.
More details
The site consists essentially of a list of publications and a list of people, some of whom are authors of the publications. The publications are classified under a few categories, which themselves fall under a top level of categories. There is a static home page with links to "People" and "Publications". People is just a list of the people each with a link to a page with a possible blurb about the person followed by a list of the publications they've authored. Publications is a static page of the publication categories, each linked to a list, sorted by publication date, of the publications under that category. In the list, each publication has a link to a page with the details of the publication and a download link for the PDF file. There is also a static "Related Sites" page. That's it!
My thought is to create 2 custom node types, one for people and one for publications. The publication categories could easily be represented by a 2-level taxonomy. What I'm not sure about is how to link the publications to their authors?
I'm also not sure how to customize the listing of a particular node type. E.g. If I wanted the people page to list the people in separate tables, one for each department.
Pointers on automating the process of getting the people and publication data from the existing database tables into drupal nodes would be appreciated. A little PHP snippet that inserts a node of a particular type would probably be sufficient.
Comments
Sent to consulting list
I've sent your post to the consulting list as an excercise in how people would approach this. We'll see what happens.
My first comment is that you may not need to create a "people" node type at all, but rather could use the Drupal user objects plus profile, which would make it easy for each person to maintain their information (or have an admin do so). The display on your current site could work by using the members module.
You haven't said what extra data publications need to contain, other than the standard node info of title + description. The upload module can include attachments. Actually, an older version of the weblink module (example here: http://wiki.bryght.com/weblink/towards-a-dynamic-community-identity-tran...) might be suited to the publication info.
For display, you might want to look at either the directory or article modules. Neither are necessarily exactly what you want, but could provide useful starting points. The new "views" module could compose this display as well.
This sounds like a task that
This sounds like a task that is well suited to Drupal.
I have some users of a Drupal site I run who are confused by the interface on occasion and just email me the story. I then post them and use the ability to edit the node author to simply make them the "author" of the story.
I agree with Boris that you can create the "people" information as part of the user profile.
I'm not sure on the mysql insert statement for moving from the existing database. You may need Flexinode or CCK (content construction kit) to make the "Publications" item.
One idea, I really like the ability to say taxonomy/term/6,23 and then get the information in those two taxonomies. I imagine it would be nice for your site if there were some way to get publication type=3 and user=10 listings. Maybe the views module can get that for you.
There is a whole section in the handbook about migrating from other systems:
http://drupal.org/node/271
That should give you some hints on the sql you will need.
Greg
--
Morris Animal Foundation
consulting list & linking pub to multiple authors
Where do I find the "consulting list"?
A publication currently has the following separate fields:
A person has:
I was unaware of the profile module. Looks like that might work. But how would I link a publication to several authors?
Consulting list is at:
Consulting list is at: http://lists.drupal.org/mailman/listinfo/consulting
The exact purpose of "Consulting" as distinct from other places is still in flux.
The multiple authors problem has been recognized before - http://drupal.org/node/35173 - though I'm not sure if it's been solved (I think not).
Perhaps you could use a two level taxonomy for the authors as well
Department1
-Author1
Department2
-Author2
-Author3
Though that could get tedious if you ever get many more authors.
Through this system, you allow multiple select in your Authors category and then when you submit the file it will be associated with the Authors who did it.
This has the benefit of using the , construct in the URL to be able to find the intersection of different terms in your vocabulary.
If you create a "people" node about the people that is 'sticky' at the top of lists but not on the front page and then tag it with their taxonomy term, and associate it to each author then that would show up when someone clicked on the list of items for that author and help explain them and under that you would have a list of all the articles they are associated with.
It's surprisingly easy to do all of these things, so I'd recommend you get yourself an install to play with and start configuring it and trying out a few different strategies. If it goes wrong, wipe the DB and start over - no big deal.
Your list of items under each publication/person makes me think that Flexinode or CCK (in 4.7 when it is released) is the good way to hold all that information.
--
Morris Animal Foundation
Handling people in Drupal
If you want to handle people in a more robust fashion (full CRM), you might want to look at CiviCRM, which works within Drupal.
You can see a demo and download the code at http://www.openngo.org/
The CiviCRM profile combined with groups, can provide a listing of people for each department.
CiviCRM might be overkill for your usecase, but probably worth giving a look.
David Geilhufe
http://www.openngo.org/
CiviCRM seems like way
CiviCRM seems like way overkill for this site.
Also, does CiviCRM have a way to attribute nodes to multiple authors?
--
Morris Animal Foundation
people vs users vs authors
After a bit more thought, while it might be possible to use drupal's user objects with profiles for the people I think this is a bad design. A drupal user is a drupal user, someone who logs into a drupal site. The entries on my people page are simply data, and have no relationship (necessarily) to users who may visit the site, let alone log in to it.
Likewise my "author" has nothing to do with which user created the drupal content, but rather it is simply a relationship in the data between publication nodes and people nodes.
My current thought is that it makes the most sense to create an Authors taxonomy with a term for each author. Each person node is associated with a single author term, and each publication node is associated with multiple author terms (and one or more category terms from another vocabulary).
The question then is ... is there a way to have the creation of a person node automatically add the corresponding author term to the taxonomy? I'm guessing all of this can be done inside the appropriate hook in a custom person node module.
Sorry for the long lapse in
Sorry for the long lapse in response - I'm not sure where the best way to do this would be. Flexinode http://drupal.org/project/flexinode could get you the custom person node pretty easily as well as the custom publications module.
Then you could either try to trace the node creation and insert the Author into the taxonomy during insert or you could create some code that ran during cron to check for new Author nodes that exist which are not in the Taxonomy and add them at that point.
--
Wanderlusting Travelers
Knaddison Family
--
Morris Animal Foundation
use tagnode module
Just for posterity ... I decided to flexinode for the person and publication node types. I also used the tagnode module to automatically create a term in a taxonomy for each author. The publications then are tagged with (possibly multiple) terms from this author taxonomy.
Exactly what I needed and working beautifully.
Thanks for closing the loop
Thanks for closing the loop and for the information. I wasn't aware of tagnode but it sounds very interesting.
--
Knaddison Family Blog
--
Morris Animal Foundation