Closed (fixed)
Project:
Bibliography Module
Version:
6.x-1.7
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2009 at 01:33 UTC
Updated:
11 Jan 2010 at 04:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
rjerome commentedWhat about using taxonomy?
Comment #2
bekasu commentedI'll look into it.
I'll let you know what works best when I get it resolved.
bekasu
Comment #3
rjerome commentedI think it should work. You could just create a "Designation" vocabulary and assign it to biblio the create the terms "refereed" and "non-refereed", make sure that in the settings for the vocabulary, "Tags" and "Multi-Select" are not selected and "Required" as desired. Then this vocabulary should show up on the input form for Biblio and allow you to choose either refereed or non-refereed.
You can subsequently filter on these values using the termID.
Cheers,
Ron.
Comment #4
bekasu commentedSince it looked like the Dallas Cowboys would do well in their game, I spent most of the game adding a new variable to biblio. Learned a lot.
Refereed Designation. I'm sure it could stand some improvement, but it appears to work for me.
If you are interested, let me know.
I did go down the vocabulary road, but found I would have to go back and change the info box so I could lose the hardcoded word vocabulary, and then the word biblio. Since I'd have to muck things up anyway, I took a swing at adding it to biblio for now.
bekasu
Comment #5
rjerome commentedSure post or send me a patch and I'll take a look.
Ron.
Comment #7
bekasu commentedRon,
I have the code working on my laptop.
I'm now stepping back to a fresh install of biblio's stable version and trying an upgrade to be sure the install/upgrade works.
Soon as I have everything wonderful, I'll put the patch up.
bekasu
Comment #8
rjerome commentedHey, according to my inbox there used to be a patch here... Where did it go???
You picked a particularly nasty bit of the code for your first attempt at a patch :-) You see that input form is built almost entirely on the fly from the database so the code is probably almost incomprehensible to the uninitiated.
Good luck, and don't worry all contributions are welcome.
BTW, I too do my coding on Windoze with an Apache 2.2 server, but my production servers are Linux.
Ron.
Comment #9
bekasu commentedRon...
I have the code working if it is a fresh install.
On an upgrade, I have 2 of the 4 tables correctly changed. Biblio gets a new field and biblio_fields gets a new entry.
However, I need your guidance on how to update the biblio_field_type and biblio_field_type_data tables.
I was going to drop the tables and then read the csv files again with a table reload. But I don't want to lose any updates that might have occurred prior to this update. I'm not familiar enough with biblio to know if these two tables (biblio_field_type and biblio_field type_data) can be updated by some other method than unloading and reloading the csv files.
How do you want me to handle pulling in the csv file updates?
bekasu
Comment #10
rjerome commentedHi Bekasu,
You wouldn't want to drop those tables and recreate them, since the user may have made changes, additions via the GUI (which would be lost), so you will have to apply any additions you made to the CVS files to the DB manually via INSERT or UPDATE queries.
Ron.
Comment #11
bekasu commentedWill do..
Sorry about the patch tease. I tested it, posted it and then gasped as I realized I hadn't tested an upgrade - only a fresh install.
I'll insert the column to the table and a generic entry into the data table.
I agree about the code ... blew my mind.
I appreciate the guidance on the tables, my gut was telling me to tread lightly.
bekasu
Comment #12
bekasu commentedRon,
I was writing the code tonight to read the existing biblio_field_type table.
I researched the correct way to write drupal inserts and found that db_query(INSERT is not recommended any longer.
It now says we are supposed to use drupal_write_record.
However, all the biblio entries in the install module use INSERT.
Do you want me to start using drupal_write_record or continue using INSERT?
I don't want to muck up any conversion you have in mind.
bekasu
Comment #13
rjerome commentedYes, well there is a reason for that... and if I recall correctly there is a chicken and egg scenario with the .install file. drupal_write_record requires the schema API to be initialized however the schema API is initialized FROM the .install file and therefore not available for use within the .install file :-( This is also why you see calls to biblio_schema within the .install file since you can't use the regular API functions to access the schema during install.
You could possibly get away with it for updates, but if the schema has also changed during that update you could be in trouble.
Ron.
Comment #14
bekasu commentedNo problem.
I'll continue with the INSERT method previously used.
I didn't want to co-mingle two processes and cause you more grief.
bekasu
Comment #15
bekasu commentedRon,
Don't want u 2 think i deserted u.
I accidently smashed 4 fingers on my left hand.. thumb is ok.
I just got feeling back in my pinkie today. Hope 2 be back coding within a week.
Never realized how much you need a left hand to type.
It goees soo slowly with hunt and peck.
bekasu
Comment #16
rjerome commentedOh no, that's terrible! Hope your feeling better soon. I can relate though, I cut off two of the fingers on my right hand a while back. They put them back on, and for the most part they are functional now, but it took a while.
Ron.
Comment #17
bekasu commentedturns out the middle finger of my left hand has a broken bone between middle joint and end of thre finger .. orthopedtrics appt this nect week. takes a while for stuff when you live as rural as i do.
oh my gawd .. 2 fingers reattached... wow
thanks for the encouragemrnt.
bekasu
Comment #18
bekasu commentedHere is my official first attempt at 1) using eclipse & 2) creating a patch
Please let me know what i need to correct ;)
Especially if I should be creating the code in a different directory or something.
Comment #19
bekasu commentedHere is my official - 2nd try . Corrects the branch used and makes the variable definition consistent.
bekasu
Comment #20
bekasu commentedMarking the issue fixed.
Patch was accepted and after a little TLC, incorporated into Biblio.
Thanks Larry Ron..
Bekasu