I'm pretty sure there is a simple solution for what I'm trying to achieve, so please let me know.
1) I want to create a menu item which will be a Vocabulary name (eg. Species). When visitor clicks on it I want her to see a table. On vertical axis will be all the terms within this vocabulary, and on horizontal axis will be node types. Like this:
Species:
| Users | Groups | eJournals | Biblio
-----------------------------------------------------
Cats | 37 | 4 | 1 | 2
-----------------------------------------------------
Dogs | 54 | 5 | 3 | 8
-----------------------------------------------------
Monkey | 76 | 7 | 9 | 17
-----------------------------------------------------
each one of these numbers will be link to those particular Users or Groups which are interested in Cats or Dogs
The problem is that taxonomy_dhtml displays totals and does not discriminate between node types
Any idea how I could get such a table generated???
2) It would also be nice to put a drop-down filter (just like in this drupal.org forum) , which would contain terms from another Vocabulary (e.g. Color) , so as to narrow down the number of Vocabulary1 (Species) terms displayed
3) Users are not nodes. So how can I get them to be displayed in this taxonomy table if their interests (in Profiles) include some of these taxonomy terms??? (e.g. Interests: Cats, Monkeys, Rhinos)
Comments
Try Views.
Try Views.
Hmm...
I'll have to see what I can do for you in a little while. I don't know about the user part though; you'd have to give me more details on your profile set up.
Users can be nodes. There is a lot of interest in profiles-as-nodes with several modules to make it happen; there's even a group on it at groups.drupal.org.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Try this
The only thing you need to change is the vocabulary number at the top.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Thanks, but what should I do with this code?
Wow... Nancy W, thank you very much! But I'm not too technical of a person. I would really appreciate if you could tell me what to do with this code???
I pasted it inside taxonomy_dhtml.module , but that broke my site until I removed it. Please tell me what to do with this code.
thanks again
Just a page
Just create a page that is php-format and paste this code into it. It works fine for three of my sites.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Fatal error
hi,
I made a testpage.php out of this code. (my desired vocabulary number on my drupal site happens to be also "2" -- so I didn't do any changes to the above code) But the moment i go there it says:
Fatal error: Call to undefined function taxonomy_get_vocabulary() in C:\wamp\www\dev\testpage.php on line 3
Line 3 is the one that reads
$vocab = taxonomy_get_vocabulary($vid);More on the proposed Taxonomy/Node table & also my profile set
My initial idea behind this table was as follows. In theory (from the way that I see it) Drupal is composed of an interplay of two basic components: 1) Nodes (content in various content types) and 2) Taxonomies (which govern, systemise and structure Nodes in a very flexible and powerful way). So I thought, why not make a table out of it: Nodes on x-axis and Taxonomy-terms from the most important vocabulary on y-axis. I thought somebody would have come up with some kind of module to generate such a seemingly simple table, but one that pretty much reflects the content of a given website.
The other idea to make such a table even more efficient and easy to use for surfers, was to have a Filter (or more than 1 filter) at the top of this table (I have noticed such filters are widely used throughout drupal.org and groups.drupal.org). This filter (or filters) could contain either a drop-down menu from another vocabulary (so as to narrow down the long list from the vocabulary on y-axis) and/or free-fill-autocomplete box that can also surve as a filter. These filters, of course, would also speak to the related-terms. Like this end-user can play with a combination of 2 vocabularies to get to exactly the kind of information that he is looking for and have a variety of Content-types (blogs, OGs, events, etc as well as USERS) which relate to that kind of information, displayed right in front of her.
Basically, it's about displaying a summary of the entire website where there is a LOT of content and also allowing the user to keep narrowing down until she finds exactly (aand also aproximately) what she is looking for. I think this could be a lot cooler and user-friendlier than having a "site-map" or "advanced search".
I thought a module of this kind would have existed already. If not, I strongly believe a module like this should exist, but I don't know any PHP whatsoever.
As for my profile set, answering your post, it is as follows. Basically it is a kind of social networking website. During registration (not after) users fill a variety of fields which later become values. Some of these fields are Country, City, University, Political Beliefs but the most important one is INTERESTS. Later on when users click on their interests they are able to find other users who are interested in the same thing. This is a very important feature because it allows users to find each other and later form OGs. At the moment the page that is automatically generated by Profile.module (dev version) , even though it took me few weeks to get this working. The lists that are generated are huge , but I don't know how to put filter(s) on top to allow end-users to narrow down the number of users that they are looking for.
But my biggest problem in this department is that while these Interests are very often similar to the kind of interests that I have defined in my Vocabulary 1 (the one I want to but on y-axis of the proposed table), they are not getting connected with those Taxonomy terms. Say for instance if UserX is interested in Cats, and if there are 7 Groups dedicated to Cats (among other things), there is no practical way of bringing them together. Similarly, if I search for "Cats" I will find OGs and Events and other content-types dedicated to "Cats" , but no Users who have Cats listed in their interests. So in effect, the realm of Users and the realm of Content-types remain un-integrated and separate from each other.
I have heard that there is a module that makes users into nodes. But I don't know the repercussions of using that. But I'm still very interested because this could be the solution to unite Interests in profiles with the Taxonomy-terms in y-axis and thus have users as searchable and displayable items along with other content-types. This kind of solution, if at all possible, could also help me set up a "Deceased User" user-role, which is basically Profile nodes and biographies created by other users. So if you have any advice in this department or pointers, I would very much upreciate that.
Any help will be greatly appreciated. But in recent months I have noticed that many other Drupallers are looking for these kind of solutions, which are possible with CMS like Drupal. So it would also be a contribution to the bigger Drupal community.
Thanks
matrixfighter
Wow, long post
Let me see if I can address some of this anyway.
First, some good news. This code is now part of the Site Documentation module. It will still require a php page, but with very minimal stuff in it.
There are at least two modules that I know that do use taxonomies to refine a search. One is Refine by taxonomy and the other is Taxonomy Filter. BTW, I also noticed some others that might interest you called Directory and Interests.
Now to users. I agree that, in many respects, support for users seems to be sort of an afterthought. However, with the increasing interest in users-as-nodes, I would not be surprised to see Drupal 7.x address this issue. The current state of user support is haphazard and not well organized. Views doesn't even really support listing users (unless they are nodes).
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru