Hi,

I'm using biblio and would like to be able to create a new entry,
by selecting keywords from a dropdown list which fill in certain biblio fields (in this case keywords).

I've created two custom content fields for a biblio node (see pic)
but I'd like to find a way to fill in a certain field in the biblio node when the user has selected an item from the dropdown list.
I know I can include some PHP code for the custom content fields, but that's only to manipulate the allowed values,
not (I think) to do anything with the resulting selection.

Is there a way to add PHP code, or can I do this manually myself in the module files? where in the code would this be?

thanks,
Gert

CommentFileSizeAuthor
#9 tag3.jpg104.3 KBgsteenss
#5 tag2.jpg55.97 KBgsteenss
#5 tag1.jpg57.36 KBgsteenss
bib2.jpg68.16 KBgsteenss
bib1.jpg115.48 KBgsteenss

Comments

rjerome’s picture

If you could make those lists (Tema, Subtema) into taxonomy vocabularies, then it would be trivial (in fact automatic), otherwise your best bet would be to add some code in the function biblio_save_keywords() which lives in the biblio.keywords.inc file. You might want to look at the latest -dev version for an example of how this is done with taxonomy terms.

Ron.

gsteenss’s picture

Thanks for the quick reply, I'll have a look which option is the easiest to implement.

gsteenss’s picture

Another question related to your suggestion: can I have taxonomy keywords be displayed in dropdown list, instead of an autocompleted text field?

rjerome’s picture

Yes, if you create a taxonomy vocabulary, fill it with terms and assign it to the biblio module, then a dropdown list will appear on the input form for each of the vocabularies and you will be able to choose one (or more if you make it a multiselect vocabulary) terms from each list.

gsteenss’s picture

StatusFileSize
new57.36 KB
new55.97 KB

Hi,

I did what you suggested and this worked fine: using taxonomy to tag biblio entries with certain predefined categories,
and additionally give the option to enter more keywords that describe the entry.
i had version 1.0 running, nog after upgrading to the lastest, I get the following:
when selecting the category for a new entry, it also shows up in the keywords list. (also see pics attached)

which is not exactly what I wanted...
If i read the changelog right, this may be result of changes in v 1.3, is there a way to disabled this?
or a hint on where to intervene in the PHP code to prevent this?

Thanks a lot for all your help, nearly there... :-)

rjerome’s picture

Yes, what you are seeing is the result of that change. I guess I could put an admin setting to turn that (copying of terms to keywords) on or off.

gsteenss’s picture

if you don't want to bother, an alternative is telling me where more o less i need to look for the code so I can 'patch' it myself :)

rjerome’s picture

Status: Active » Fixed

It's already done (in the HEAD CVS branch), I'll merge it over to the 6--1 branch later today and it will the appear in the 6.x-dev version and subsequent releases.

Ron.

gsteenss’s picture

StatusFileSize
new104.3 KB

great, Thanks.
I think I'll wait for the official release before upgrading.

another thing, not sure if it is an error on my side, but when I try to edit an author from the list (after selecting search by author)
I get a page not found error because the link is wrong, it says something like: http://intranet/drupal/?q=56/edit
when instead the correct link should be: http://intranet/drupal/?q=biblio/authors/56/edit
also see pics...

rjerome’s picture

That one has also already been fixed... http://drupal.org/node/450030

Ron.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.