Implementing Sources, Citations, & Repositories
| Project: | Family Tree 2 |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
This is a break off from the integrating events and calendar (and location) task.
I just did a lot of work on getting a foundation on impelmenting sources and citations. Clarification: although both sources and citations use the 'SOUR' fact_code, they really are different in specification and it depends on the fact's context as to which it really is (according to the GEDCOM 5.5.1 specs). Aside: I think the reason I work so much to uphold the GEDCOM spec is because we are already heavily using their structure. If we keep relying on the current db structure mucking with the spec is going to make things even more complicated.
I started working on this because it was one of my top priorities, it seems like a good foundation to build other parts from (I added a lot of functionality to the common.inc), and I want to wait until we make some decisions about location ('PLAC') before moving forward there (I will post another task for that). You can see a working demo @ my live prototype. (I do my development locally and then push mostly-working versions to the website.) Nodes of interest: 5, 17, and 22. As of the moment viewing an individual will show individual level sources at the bottom and event sources will display a superscript link to a citation view to see more information. Once at the citation page you can click on the link to see more source information. The final layer on top of that (according to GEDCOM), which still needs to be done, is a repository view. While I was taking one last look before posting I started to get some odd errors on the sources view that I can't figure out about a bootstrap.inc file I don't have. Other than that it all works as designed. Next steps include making them nodes and, in course, making them editable and allowing adding new ones.
As mentioned above I added a lot of functionality to the common.inc. Partly they are functions that pull some of the previous coding out of the individual.inc and view.inc so they can be used more broadly. There is at least one function (family_getfacts(), which I think I originally wrote) which I would like to depreciate and replace with a new one: family_get_subfacts(). They do the same thing but the new one returns a more usable data structure and the name is more meaningful. I would have removed family_getfacts() entirely but the individual.inc still uses it and I didn't want to do a rewrite of that section yet.
Warning, a lot of my code can probably use a healthy dose of cleaning, restructuring, and optimizing. I don't claim it is great but it at least proves the concept and gets us somewhere. Note that it is pretty much essential to understand the fact hierarchy and relationship structure to work on this module. Without that understanding most of the existing code will make very little sense. One of us (I will if I can get the time) ought to write up some definitive documentation about how this architecture works with some examples for discussion. I already started writing little bits of this in my code comments but the work will be in pulling it together and fleshing it out.
All of these modifications were applied on top of the Drupal 5 patch. That means we probably need to get a Drupal 5 fork for the module before I submit my changes to the world or else we will end up with a large pile of patches interdependent on each other to work. I have no idea how to go about doing that. If anyone wants copies of my modified module files just let me know: seth [dot] e [dot] shaw [at] gmail [dot] com (no spaces).

#1
Seth I'm working on committing PFOLK's patch to CVS. It should be in sometime this week. Once we have the new ver. in place, patch against that and I can commit your patch.
Thanks,
Jonathan
#2
Finally got this CVS stuff licked I believe. Please submit your patch against the 5.x-1.0-BETA1 version. Also, would you mind if I listed your site on the project homepage as a demo site?
#3
Make that BETA2. I was still using CVS incorrectly when I created BETA1 and not all of the files were included. BETA2 has all of the features incorporated by PFOLK.
Thanks,
Jonathan
#4
I, for the life of me, cannot get the BETA2 version of the family module. I am new to CVS as well so I don't know what the problem might be. Instead, I downloaded the BETA2 files from Drupal's web CVS interface and updated them with my changes. Would you mind committing my changes until I can figure out how to get CVS working to create my own patches? I have placed a zip file on my development site because I cannot attach zip files to these posts. Thanks.
Feel free to list my site as a demo site.
- Seth
#5
Strange. BETA2 is listed on the module front page, but it may not have been last night. It sometimes takes a while to update.
http://drupal.org/project/family
http://drupal.org/node/188032
http://ftp.drupal.org/files/projects/family-5.x-1.0-beta2.tar.gz
Of course downloading from CVS and editing is just fine as well. You can get around the file restricting by changing the extansion to .txt and noting that you've done so. Either way, the link you provided is fine as well. I will commit your changes to the dev branch a little later today and give them a shakedown. I've also added your site as the demo site.
Thanks,
Jonathan
#6
I have commited your changes to BETA3. All further development should be done directly to the DRUPAL-5 branch until we decide that we have a well rounded stable release. Thanks again for all your hard work so far Seth.
Jonathan
#7
I have added repositories and repository citations (the link between sources and repositories). I also modified the notes display for sources and citations to allow multiple note facts (as required by the GEDCOM specs). The only problem is that I don't have any test data at the moment that use repositories. So, if anyone has an example I can use, let me know. Otherwise I will just have to make one up (I just don't want to create one from scratch via adding database rows.)
Once I test it I will submit a patch.
#8
Most recent changes have been committed to the 5.x dev version.
#9
Setting to fixed.
#10
Automatically closed -- issue fixed for two weeks with no activity.