Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Ron,
Is it possible to intigrate your grate module with CCK and Views?
Comment | File | Size | Author |
---|---|---|---|
#56 | biblio.tar_.gz | 14.58 KB | Coornail |
#29 | biblio_views_234891.tgz | 3.85 KB | David Lesieur |
#27 | biblio_views.module.add_style_apa.patch.txt | 2.93 KB | tatien |
#21 | biblio_views.tar_.gz | 4 KB | David Lesieur |
#14 | biblio_views.patch | 3.33 KB | David Lesieur |
Comments
Comment #1
rjerome CreditAttribution: rjerome commentedThere has been some work done towards this end with Drupal 5.x, although it's not really ready for prime time. The D6 implementation is waiting on a stable views module.
I have to admit that I haven't used views very much and never really looked at CCK. While I can see how views might be useful, I still need some convincing on CCK and how users will benefit from this.
Ron.
Comment #2
fm CreditAttribution: fm commentedWith CCK, an administrator can add fields you may not feel are core to the biblio module (e.g., genre, author's photo, type of binding, a book's appraised value, or a publication's word count).
Comment #3
rjerome CreditAttribution: rjerome commentedFair enough, I guess I really need to sit down and play with CCK a bit. It's not that I'm against it, I'm just blissfully ignorant.
Ron.
Comment #4
fm CreditAttribution: fm commentedWhile I believe Biblio should support both Views and CCK, I also believe Biblio supporting Views is more important and should come first. But then, that's just one man's opinion ... and more significantly, the opinion of one who won't have to do the coding. ;)
Comment #5
pharma CreditAttribution: pharma commentedI also believe Biblio supporting Views is more important and should come first.
Comment #6
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedSupport for Views would be a great addition to this already great module.
Views provide a lot more flexibility for listing and reporting titles, which is currently done by the bibliography module's core. Eventually, All the reporting and listing functionality can be provided via Views integration, making upgrading and maintaining simpler and allowing the developers to focus on the core features of the module. Existing searches and reports can be provided with the module as views or add-ons that use views.
CCK is important for private collections or non-standard collections, such as Congress libraries in other countries. I recently tried to use this module to keep an on-line compilation of Laws in my country and was unable to do so because I needed a significant amount of custom fields with special formats...
Both Views and CCK have been designed with flexible API and integration in mind, so the task might not be as complicated as expected...
In any case, it's a great module and can only become better with such additions. I'm willing to pitch US$50 or US$100 to support the new features... anyone willing to pitch-in as well?
Comment #7
David Lesieur CreditAttribution: David Lesieur commentedI'd certainly go with CCK first. If Biblio fields were actually CCK fields, Views support would come for free, since CCK already provides very solid Views integration.
In addition to gaining Views support, moving Biblio data to CCK would automatically make it usable with all kinds of modules that understand CCK data (field permissions, tokens, contemplate, node import, etc.). It would benefit from display options that are already provided for CCK fields. Administrators could manage Biblio fields through the same familiar UI they already use for CCK.
In the end, Biblio could concentrate less on data representation, filtering and sorting, which would be handled by CCK and Views, and focus more on features that are specific to bibliographic data.
Changing the whole data layer that's behind Biblio and re-thinking Biblio features to work with a generic framework like CCK are no trivial tasks, however, but the benefits would be tremendous!
Comment #8
pharma CreditAttribution: pharma commentedYou are right david . If those fields are CCK filed are CCK fileds views will automaticall support. I correct myself.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedAgreed, all Biblio fields would become exposed (I assume) through the Views interface, it should make life simpler.
Maybe this would make it easier to write code for custom content for blocks. e.g., find all content of type Biblio where author contains "someName" -- right now it's not clear which field names correspond to which labels (I realize it depends on the publication type).
And (just saw what Carlos said) yeah I would kick in some money, if it's wanted.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm seeking guidance on how to list publications by a specific author in a sidebar on that author's personal web page.
I tried Views but as the Biblio creator points out, Biblio is not completely integrated with Views. When I try to call out various Biblio fields within a View, it doesn't seem to work.
So, I tried php code in a Block to call the fields I want directly from the database.
The Devel module exposes what seems to be the query I want (on the line pager_query), and I modified it for the specific author:
SELECT DISTINCT(node.nid), biblio.biblio_year AS biblio_biblio_year, biblio.biblio_authors as biblio_biblio_authors, node.title AS node_title, node.changed AS node_changed FROM node node LEFT JOIN biblio biblio ON node.vid = biblio.vid where biblio.biblio_authors like '%someAuthor%' ORDER BY biblio_biblio_year DESC;
I wrote some code, embedded that query, stuck it in a block (within < ? php ? >etc.), with no result. I omit the code for now, as I didn't even get error messages - the block just doesn't appear.
Is this something I would be better off handling through the taxonomy feature in Biblio? Any pointers?
I've heard of Profile pages but I think these are not nodes (?)
Is it time to try CCK instead?
Thanks.
Comment #11
rjerome CreditAttribution: rjerome commentedAssuming you are using 5.x, you can use code like this...
Don't forget to change the input format of the block to "PHP code" when you create it, also after you create it, you have to assign it a location or it won't show up.
The only problem with this approach will be that it will show up for all users of the selected group. I think profile pages are probably a better bet.
Ron.
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedThank you, I wonder if the above function references the author *of* the Biblio record (?), vs. the author *in* the Biblio record. (?)
Anyway it doesn't produce anything. The block is configured (with proper input format, within php code statements), assigned to an existing region in the theme, etc.
Next, I downloaded Biblio Views and activated it, but I don't see a way to interact with it directly.
However there seem to be new items in the Filter pop-ups: Biblio:Authors is one.
So I added Biblio:Authors as a filter and chose an author's name.
This resulted in a mysql error message:
* warning: Invalid argument supplied for foreach() in /Volumes/data/WebServer/Documents/drupal/drupal-5.7/modules/biblio_views/biblio_views.module on line 280.
I'll try Profiles, but won't the same Biblio issues arise? And anyway I don't see where in Profiles you can pull in Biblio records. Or does Profiles only work with CCK content?
There must be a way to list customized publications, It seems a natural application for Biblio and a small extension to whatever query produces the built-in biblioviews view.
My first query (mentioned in previous post) works at the mysql command line (produces customized list of pubs).
Maybe I didn't embed the query properly in PHP, I'll revisit that.
Or maybe there's more than one query necessary? The devel module shows two 'pager_query' lines underlying biblioviews. One seems to produce a count of the number of records. Does that need to be considered?
Thanks.
Comment #13
rjerome CreditAttribution: rjerome commentedFirst off, what version are you running? If it's 5.x-1.9, then you don't even have the code which does the profile pages for you, nor does it have the capability to filter by UID these features came in a later release. I would suggest getting the latest release if you don't already have it.
The code I gave you earlier is referring to authors "in" a biblio entry, if you want a list of entries created by a certain UID then you can replace author with uid and name with the actual number...
I tested this in a block on one of my systems and is seemed to work. You can also test this as a url by simply entering http://example.com/biblio/uid/21 or http://example.com/biblio/author/smith
That biblio views module is kind of old so I wouldn't put much faith in that.
I would have to see the code you wrote for the query to tell you what was wrong with it, but if you want the listings nicely formated, theres more to it than just querying the database, each node has to go through the style functions.
With regards to the count query, it is only needed if you do a pager query, a regular query does not require it.
Hope that helps,
Ron.
Comment #14
David Lesieur CreditAttribution: David Lesieur commentedReverting the title to the more generic issue that was initially targeted here. ;)
Speaking of Biblio Views, I think it might be worth releasing since it improves Biblio's Views integration and adds some very useful features. It also makes sense as a separate module since not everyone might want the Views stuff.
I have used it successfully, along with the attached patch that allows using any Biblio field as a Views filter.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedI'm using Biblio 1.15.
I think I've found a way to do what I want (put a user's publications in a block on the user's page) but I'm not sure how to find the field containing the publication title.
========================================
example:
$result = db_query("SELECT biblio_authors, biblio_secondary_title, biblio_year FROM biblio WHERE biblio_authors like '%whoever%' ORDER BY biblio_year");
while ($term = db_fetch_object($result)) {
$strURL = url("taxonomy/term/or/$term->tid");
$strName = $term->name;
$items[] = l( $strName, $strURL);
}
return theme('node_list', $items);
========================================
I'm using the Devel module to find which fields to pick from which table, but the title shows up in different places. In one publication it gets stored in biblio_secondary_title, in another it only shows up in biblio_coins.
On the web page, it's only called "title".
?
p.s. The biblio_coins field is never empty and seems to contain the title as "rft.title" -- is there a way to lift rft.title out of there?
Comment #16
rjerome CreditAttribution: rjerome commentedThe title of the publication is stored in the {node} table. The secondary title field contains different things depending on the type of publication (Series Title, Book Title, Journal Title, Conference Name etc.)
Try...
Ron.
P.S. If you have any further comments/questions on this topic, please open a new issue as this is somewhat off the topic of the original issue.
Comment #17
rjerome CreditAttribution: rjerome commentedComment #18
lejon CreditAttribution: lejon commentedIs this to be uploaded as a separate module file within the biblio folder?
I'd love to have the ability to combine with views ASAP - it's really frustrating not to be able to filter biblio records by type!
Thanks.
Comment #19
rjerome CreditAttribution: rjerome commentedBut you can filter by type, could you elaborate on what you mean by that?
Comment #20
lejon CreditAttribution: lejon commentedHi,
Yes, you can filter by type in the biblio view but not using Views, which is what I'd like to do to using the 'exposed filter' option in Views.
At the moment I'm having to add an extra field through CCK to repeat 'document type' in order to be able to get this up in Views as both a field and a filter as I want to use these views in Organic Groups panels.
Or maybe I missed something?
Comment #21
David Lesieur CreditAttribution: David Lesieur commentedSince the Biblio Views module is not part of any Biblio release, one can only find it with CVS. Here's the full module, patched with #14, in case it helps.
Comment #22
lejon CreditAttribution: lejon commentedI have just tested the views patch submitted by David Lesieur (comment #14) (I ended up patching manually with notepad++ - if anyone knows of any simple way of patching a one-off file in windows, please let me know as I tried gnu patch.exe, tortoise, jedit and so on, all without any luck).
I can confirm it works. However, it had the following bugs when trying to produce a view:
1) Couldn't find the field 'Biblio:Title' (used Node:Title instead). Gave the following error: Unknown column 'biblio.title' in 'field list'
2) 'Biblio:Type' displays the numeric code for a Biblio Type rather than 'Book' or 'Newspaper article' etc.
I would vote for this to be tested further by releasing biblio views as it is an absolutely excellent module add-on. I'm putting it on my production site now!
Thanks.
Comment #23
rjerome CreditAttribution: rjerome commentedThanks David,
While this goes a long way in filling the "Views" gap, it does still have a few issues that will have to be addressed like filtering, and hooks for the style functions (I don't like the idea of a lot of duplicate code). For these reasons, I'm a wee bit reluctant to package it with the main module because I'm afraid it will come back to haunt me, and I'm up to my neck in 6.x muck right now (unless of course you would like to support it :-).
Ron.
Comment #24
David Lesieur CreditAttribution: David Lesieur commentedHi Ron,
I totally understand your point of view and your priorities. I can only help on Biblio very sporadically, but I provided the patch to help make a small step forward.
The full vision will happen when it happens. :)
Comment #25
matthew_ellis24 CreditAttribution: matthew_ellis24 commentedI would be very interested in CCK integration. I have a custom content type that is information (pictures, taxonomy and distribution) for beetle species. Biblio CCK integration would very easily allow me to have fields within the content type for papers directly relevant to the species in question (eg the describing paper and papers on ecology etc).
So yes, I would be interested in seeing biblio integration into CCK.
Comment #26
silurius CreditAttribution: silurius commentedSubscribing.
Comment #27
tatien CreditAttribution: tatien commentedI had a few issues after installing the biblio_views module suggested in #21. I'm working with 5.x-1.16.
I had the following error :
and:
The attached patch on #21 fixes these errors.
Comment #28
jippie1948 CreditAttribution: jippie1948 commentedsubscribing
Comment #29
David Lesieur CreditAttribution: David Lesieur commentedHere's a new version of the Biblio Views module that includes Tatien's patch in #27, but avoids duplicating code from
biblio_style_classic.inc
and the likes while adding support for all styles (not just Classic and APA). Also removes some debugging code.Comment #30
ntripcevich CreditAttribution: ntripcevich commentedAnother benefit to views integration is that we could have A/B/C style glossary headings at the top of each page that provide a shortcut, for example, to all the authors with names beginning with "A" in your Bibliography.
I've been able to do it using the Views Alpha Pager module but you're stuck displaying using the BiblioView table mode.
In any event, the Views Alpha Pagers (for Views 1-5.x) works very nicely. There's a built in glossary for Views 2-6.x.
Comment #31
masood_mj CreditAttribution: masood_mj commentedI downloaded the biblio_views_234891.tgz, but I cannot understand with which version of biblio and drupal it works. I have drupal 6.8 and biblio 6.x-1.0-rc2, and I got this error in the module list:
"This version is incompatible with the 6.8 version of Drupal core."
Could you tell me how can I change the module to work on this platform. I really need this feature to have categorized views of publications, for example, list conference papers of a certain research group.
Comment #32
rjerome CreditAttribution: rjerome commentedThat version only works with the 5.x versions of Drupal. A new views module for Drupal 6.x is in the works, perhaps sometime in January.
Ron
Comment #33
John Bickar CreditAttribution: John Bickar commentedSubscribing. Do I understand that the views module that is "in the works" will expose Biblio fields (such as author) to Views, as in Drupal 5?
Comment #34
rjerome CreditAttribution: rjerome commentedYep, that's the plan. And it's really just a plan still since I've been bogged down in another issue (#355995: separate fieldsets for different contributor types? ) for the last little while.
Comment #35
catdevrandom CreditAttribution: catdevrandom commentedComment #36
John Bickar CreditAttribution: John Bickar commentedClosed because it's been resolved, as of the latest version(s) of biblio?
If so, sweeeet :)
Comment #37
jjo CreditAttribution: jjo commentedI am using biblio-6.x.1.1 and views-6.x-2.3 (ie, the latest versions of each) and I do not see biblio fields in views. Using cck-6.x-2.1. Do I need to update this as well? I am assuming from the posts here that biblio fields are now exposed. Am I correct? Are there additional settings that I am missing?
Thanks,
JJO
Comment #38
rjerome CreditAttribution: rjerome commentedGive the -dev version a try. It is essentially the same as 6.x-1.1 but has a few bug fixes and a more useful views implementation.
Comment #39
jjo CreditAttribution: jjo commentedI tried the 6.x-1.x-dev version of Biblio and still do not see exposed biblio fields in Views. Are these fields supposed to be exposed now?
BTW - biblio is really coming along nicely. I especially like the author merge/edit capabilities.
Comment #40
rjerome CreditAttribution: rjerome commentedThey should be there, however you may need flush your cache (admin/build/views/tools) before you see any change. Once that is done, you should see a "Biblio" view type on "admin/build/views/add"
Ron.
Comment #41
patrick.legros CreditAttribution: patrick.legros commentedThanks for the integration with views. It seems that one can easily modify the way the fields are displayed but it seems that the unique field that can be filtered is "biblio: contributors". There is no possibility to filter with respect to the types of publications for instance. Am I missing something?
I understand that with the new version of biblio complex filters (say display all biblio records of NAME corresponding to publication types 100, 104 and 105) can be created with php but I have very little knowledge of php and do not know how to proceed.
Thanks for your help.
Patrick
Comment #42
rjerome CreditAttribution: rjerome commentedI am just beginning to look at the "Views" integration (I didn't write it), which is in it's infancy, so it may take some time to get all the required functionality :-).
I believe a bunch more filter and handler code is still required, but at least this is a start.
You can craft URL's to do what you describe, i.e. biblio/author/smith/type/100/type/104/type/105
Ron.
Comment #43
patrick.legros CreditAttribution: patrick.legros commentedthanks Ron; and "bravo" for your module...
Comment #44
rjerome CreditAttribution: rjerome commentedYour welcome,
BTW, after I posted that I realized that what I told you won't work as you desired because those types are ANDed together rather than ORed :-(
Ron.
Comment #45
patrick.legros CreditAttribution: patrick.legros commentedI was traveling and tried the url before reading your post; indeed it does not work. So in order to have multiple types of biblio on the same page, the only way currently is to use PHP I suppose?
Comment #46
rjerome CreditAttribution: rjerome commentedWe should really move this discussion to another thread it we're going to continue it, but to give you a little background... I'm working on two fronts which will potentially address your problem. I'm currently in the process of rewriting the query builder which is native to biblio and in doing this will probably be able to get the "OR" type of feature you are looking for in a URL style query. I am also enhancing the Views capabilities which in the end should also allow you to do the same thing with views. Both of these things will take a bit of time, so you may have to wait a few weeks before seeing capability in a release version.
Cheers,
Ron.
Comment #47
patrick.legros CreditAttribution: patrick.legros commentedthanks for your answer. It seems worth the wait. Thanks for your continued help!
patrick
Comment #48
Ether CreditAttribution: Ether commentedsubscribe
Comment #49
mlncn CreditAttribution: mlncn commentedKeep your eye on the Summer of Code project Porting Biblio to CCK.
benjamin, Agaric Design Collective
Comment #50
mattgilbert CreditAttribution: mattgilbert commentedsubscribing
Comment #51
mlncn CreditAttribution: mlncn commentedComment #52
Aren Cambre CreditAttribution: Aren Cambre commentedJust wondering how this progressed over Summer of Code?
Comment #53
fm CreditAttribution: fm commentedStill wondering.
Comment #54
rjerome CreditAttribution: rjerome commentedAs am I, these questions should be directed to the mentor kvantomme or the GSOC coordinator Alex UA
Comment #55
kvantomme CreditAttribution: kvantomme commentedI'll ask Kornel to post his work in here as a patch.
Comment #56
Coornail CreditAttribution: Coornail commentedHi!
Here is my summer of code work.
I would gladly commit it somewhere if I'd have access.
Comment #57
yngvewb CreditAttribution: yngvewb commentedNice! :-) I'll test this! Is it just to replace the old biblio module with this?
Comment #58
looplog CreditAttribution: looplog commentedtracking
Comment #59
yngvewb CreditAttribution: yngvewb commentedIs it posible to get some instructions? It seems like the CCK biblio module creates a new contet type with most of the fields that biblio has. But I can't see how this integrates with the biblio module. Import is still happening to the old biblio content type.
Comment #60
rjerome CreditAttribution: rjerome commentedyngvewb: The code attached to comment #56 is the product of a Google Summer of Code project by the student Coornail who was mentored by kvantomme.
As near as I can tell, this is a somewhat incomplete CCK integration effort and I neither recommend nor support this code. You should direct questions to either of the aforementioned people.
Ron.
Comment #61
Aren Cambre CreditAttribution: Aren Cambre commentedPer #46, this issue is mostly about Views integration, which is completed, and a separate issue needs to be created to discuss CCK. I've created #682044: Support fields (CCK) in D7 Bibliography Module.