By electronicmonkey on
My brain just froze unfortunately. I need to do the following on my web site wwww.redbridgereview.co.uk.
1. Set up a form by which my writers can register giving details like name, location, speciality, publications (I think webform should do that nicely)
2. Set up a similar form by which publishers can do the same. (I think webform should do that nicely)
3. I want to set up a search system which should search the database for the entries (name, location, speciality, publications ) either in combination or individually . I want the search to be either for 1 (writers) or 2 ( publishers) and not site wide .
How do I accomplish this ?
Comments
I've never heard of WebForm,
I've never heard of WebForm, but CCK is probably what you want... make new nodes for Writers and Publishers..
Then you can use a module to configure search ... called Search Config ... to only search those nodes.
Mark
http://codebaboon.com
Drupal based services
Ta !
A more elegant solution undoubtedly
Thats sort of a very broad
Thats sort of a very broad design question, but I'll see if I can at least give you some useful starting points.
The first thing you want to decide is if you want your users to be plain old vanilla drupal users or actual nodes. For the former, just enable the profile module and customize it the way you like. They can then be searched by the standard drupal search at search/user.
If you want your users to exist as nodes, and from your brief description it sounds like they are your main IP so you probably do, you'll have to investigate one of the "users as nodes" (nodeprofile, user nodes, bio, etc) modules and add the CCK module and any required CCK field types that you want for your customizations. Then, you can use the Views module and setup 2 page views--- one for Writers and one for Publishers that can serve as you advanced search page. This is the most flexible option and probably what I would do but is definitely more complicated and laborious than the first option.
hope that helps....
Duh!..
I was initially going to create two new content types (writers, publishers) and then customise the forms with CCK and then use the search configuration module. Looks like yours is more flexible (and harder) . Which one of the user as nodes would you greatly recommend ? When I set up two page views (writers and publisher) how does that work ? Is it that in one view yo will see only the writers and in another only publishers ? Will I also have two different logins (writers and publisher) ?
In drupal there are often
In drupal there are often multiple roads to the same destination. None are "right" or "wrong", just different.
What popped into my head when I first read your post was that I visualized writer/publisher as simply different drupal roles (which tie directly to permissions)-- not different user node types. Users are users-- I'm not sure if the users as nodes modules offer the option of different types of users. Also, I'm not sure if views has access directly to a user's role-- but I was thinking they would have a field on the user node form for "Role" or "Function" or something like that. Once it's a field, you can then use views to play with the presentation (writers vs. publishers).
Sorry I don't have a recommendation for the users as nodes modules--- my users are just users and I enabled core profile module just to store some descriptive data about them. I'm sure a drupal.org search should be able to get you some info. Also, check the issues queues for the modules-- i find that very instructive. Which issue queue has a lot of issues? Which is most responsive? That kind of thing.
As for setting up the page views, the views module is very customizable. If you can visualize a layout, you should be able to create it with views. It's basically a canned custom query for your nodes. You could segregate writers/publishers into different views or simply sort them in the same view. Whatever you want/need.
And, no, I don't think you want different logins. That introduces a whole 'nother set of issues (default drupal only allows one login per email addy, though there are ways around that).
hope that helps.....
Duh!..
I was initially going to create two new content types (writers, publishers) and then customise the forms with CCK and then use the search configuration module. Looks like yours is more flexible (and harder) . Which one of the user as nodes would you greatly recommend ? When I set up two page views (writers and publisher) how does that work ? Is it that in one view yo will see only the writers and in another only publishers ? Will I also have two different logins (writers and publisher) ? Thanks
What about using some exposed views?
Hey there! Well, check out exposed Views maybe? I am running a site that has a separate section/Directory called Find An Advocate. Sounds similar maybe? After much research and complication on how to search it, we used "Filters" in Views, and exposed them to users. For an example, see http://www.povnet.org/find_an_advocate/alberta
This limits what users could look for to two particular Vocabularies (but it doesn't have to be vocabularies! - can be cck and content types, etc.) and then we used the Quicksearch module plugged into Views to allow a keyword search of both as well.
Views was the most solid way I could find to create custom searches of limited/specific content.
So you can create a single view that allows users to combine writers with publishers somehow, or you could just create two simple views that each generate a page, one for writers and one for publishers. They could rely on a content type or field and generate some exposed select boxes that users can use to filter even more. Really that part depends on how you have organized your site/vocabs/content.
I am not sure if I totally understand your situation, but if this example looks helpful, I can try to help more!