Building an area directory
I've had a lot of people asking about the directory I'm working on here: http://couleeregiononline.com/directory . I plan on doing a tutorial but first I need to finish version 3 of user profiles along with all the other stuff I have to do. So it's going to be a while. In the mean time, here's a few pointers to help those who can't wait:
- I use CCK to make content types for different types of listings so they can have different fields. Such as store, restaurant, non-profit, website, church, etc
- For taxonomy, I have a vocab "Directory categories" which is a structured listing. Each listing must belong to at least one of these. I also have a vocab for "Directory tags" which is a freetagging vocab.
- The "browse" page of the directory is a panels_by_term view which you get when you have both panels and views bonus installed. It's pretty heavily themed. You can get an idea from an earlier tutorial I wrote.
- Since I expect paid listings to be low volume, I will be doing them by hand. I added a "premium expires" cck date field that is only visible to the admin (through form_alter). When someone pays, I'll put th expired date in. I'll then use that date to determine whether to print the premium fields.
Hopefully that will help a bit until I can get the tutorial written.
Michelle
Site contents are licensed under a
That is exactly what I'm after! ETA on when it will be up?
First I need to finish my directory then I need to finish version 3 of the user profiles tutorial, then I'll get to this. I may post more bits like the rate & review as I go along, but the full tutorial + glue module is a ways off.
Michelle
I understand fully. However, is there any way you could answer 2 easy questions?
For your directory, you used Tagadelic. Are your Summary Block "Tag Cloud Summaries" using views? Or are they in fact custom block code?
Also, what is your argument setup if you are in fact using views? Thanks Michelle! I click on your ads whenever I can to support the site.
I'm not using tagadelic in the directory. I'm assuming you mean the browse directory page? That's a heavily themed panels_by_term view. This will get you started: http://drupal.org/node/139934 . I've done more theming since I wrote that, but it's a start.
As for the other, I'll just say thanks... Don't want to get banned for talking about it.
Michelle
I found something that should help you out immensely (performance wise).
http://mediumexposure.com/techblog/making-efficient-tag-clouds-drupals-t...
I think I'm going to go the CCK Select List route instead of Taxonomy. I've only got 1 Content type that uses Terms ( except Forums) . What do you think about CCK Select Lists vs Taxonomy?
Thanks for the link. If I decide to use tag clouds at some point, I may try that method.
I use taxonomy heavily. Haven't really thought about replacing it. It works fine for me.
Michelle
I assume this means you use the structured listing for categorisation and the free tagging vocab as a kind of folksonomy? How do you combine both these vocabs for a content type?
And, I suppose you then show only the tags and not the taxonomy terms themselves? How do you accomplish that?
Thanks for sharing the results of your various experiments so far.
I don't know what folksonomy is. Basically I use the structured category to organize the directory formally. Every entry needs to be in at least one category. The free tagging lets them put in extra tags that are more specific. Because I'm dealing with a small area, it doesn't make sense for me to break the categories up into small details. For example, I have "restaurant" not "restaurant, pizza" "restaurant, chinese" etc. So they'd select "restaurant" for their category and then stick "pizza" in the tag. You can see this on Pizza Corral.
I show both and just split it by vocabulary.
No problem. My apologies to people waiting on a tutorial for this. I've gotten so far behind in my projects that CRO is nearly abandoned right now. I'm hoping to get back to it in February if I can catch up.
Michelle
Michelle,
I was curious if you could tell me how you went about using the expanded lists for your "Directory Categories"?
Here's a link to what I'm talking about, as an example:
http://couleeregiononline.com/node/add/nonprofit
This is very cool and much easier to view than using a dropdown.
This is the taxonomy super select module: http://drupal.org/project/taxonomy_super_select .
Michelle
Thx Michelle.
Also, if anyone else is interested, the correct link is:
http://drupal.org/project/cck_taxonomy_ssu
Ah, I was close. Was off the top of my head.
FWIW, I'm looking at replacing it with http://drupal.org/project/hierarchical_select when I get back to working on it.
Michelle
Thanks very much for the clarifications.
Hi,
Question 1:
I see you are also looking at cck_taxonomy_ssu or hierarchical_select.
The benefit of cck_taxonomy_ssu is the possibility to add freetagging terms WITH parent choosing. So a freetagging term is placed nicely in the right hierarchy.
I asked this as a future request for hierarchical_select (or is it already possible)?
Question 2:
Did you migrate your already available terms to cck before using cck_taxonomy_ssu ?
If so, or if you know. Please explain the SQL you used to copy the terms to the cck_fields to be able to use cck_taxonomy_ssu.
I am looking also into cck_taxonomy_ssu and it is a great module! except the already available terms are not converted to cck table, so I have to do this manually.
Thanks a lot for your answers.
Greetings,
Martijn
I've never heard of cck_taxonomy_ssu and I don't use freetagging with my directory categories, either, so I'm not any help. I suggest you ask in the issue queue of that module.
Michelle
Hi Michelle,
Thanks for the tip, I have already, and are waiting for an answer there.
May be it is confusing, but I asked you this question because it is described in above thread ( http://shellmultimedia.com/tutorials/building-area-directory#comment-148... ).
Quite perculiar that you are not familiour with the module then, but no problem.
You have great tutorials, and thanks for your quick responding!
greetings,
Martijn
Martijn - I said I use "Taxonomy Super Select". It was someone else that linked to that "CCK Taxonomy Super Select Ultra" that you're talking about. I've never used that one.
Michelle
Hi Michelle, I love the site, have been watching your work on advanced forum and profiles with a great deal of interest - amazing! And thank you!
One thing, as an anonymous user I can see the field "premium expires" if I try to add to the directory on your region directory. Is this intentional?
Secondly, and a more general question, I'm working on a complex site with lots of CCK and about 5 new node types, not dissimilar to your directory. I've almost got it all to work with minimal coding but lots of cck. However, I'd like to be able to plug it all together into a glue module that will allow me to roll it out to a number of other sites I'm running. My question is, therefore, how would you go about doing this? If I asked you to build an area X, Y and Z version of your site, how would you port all of your work across to those new sites. A single glue module? Is there a way to easily turn a set of node types built with CCK and module settings into a single module to install?
Thanks, Stephen
No, not intentional. I started working on that (on the live site, shame on me ;) and then got pulled away and just never got back to it. The site doesn't get used much so I haven't gone back and fixed it. I just haven't had the time for it. I'm going to set aside some time this Spring and make a big push to get it all up and running and hopefully it will get used.
As for porting CCK, have a look at advanced_profile.module. There's code in there that I got from Wim Leers for building the type. That's what I use to let users create the uprofile node type.
Michelle
I have tried the advanced_profile. Almost gettting there ... Malaysia golf portal. I am planning to keep in touch on your building an area directory to build our malaysia golf courses directory. But from advanced_profile, things are not straight forward panels2 & views .... your assistance/guidance hre is appreciated.
BTW, I can't figure out where the page title "%profilenode" is coming from? definately not from panel?
Please see the issue queue. That title argument has been discussed. This article is not the appropriate place for advprofile support.
Michelle
Michelle, your Coulee Region website is really nicely made. I hope a lot of people will find it useful. I think many users will find one aspect of the directory confusing though. Lets take as an example "Websites". A casual user would expect the number next to the "Websites" link to be the number of objects (in this case nodes) belonging to the sub-terms. Clicking on the "Websites" link would in most UI take you to a full page of the taxonomy.
However, in this case, "Websites" is a term itself and can classify nodes. Many users will miss the fact that they can get content at this link, expecting only to view the taxonomy detail. I expect that nodes which choose these top level taxonomies will be at a disadvantage when trying to attract visitors.
From a UI perspective, it would be effective to not allow nodes to be tagged with the Parent terms, and parent term links would lead to a view of all content tagged with the sub-terms.
If you have a different opinion about this issue and chose this behavior for a reason, I would be interested to hear why.
Andrew
Well, the idea is that they will select a subterm. If listings are assigned to the top level, that means I need to add another category so they have a fitting subterm. I don't really have the UI worked out as I haven't finished the directory, but that's the intent. I don't like the idea of simply disallowing adding items to the parent term as then they are forced to choose a category if none fit, which is harder to track down than listings attached to just the parent term. I'll probably make a view or something to give me a report of items that need moving to a subterm.
Michelle
Just been following this, and it's been a month now.
Thanks
The two modules I already have take up way too much time as it is. Plus, there's stuff going on with panels that I'm going to want to use. The web directory module is looking like it's not going to be coming for some months and then possibly only in D6. That may change... CRO is going to be on 5.x until probably next Fall so I may decide to do something in D5. We'll see.
Michelle
would I be asking for too much if, I asked for your node.business.tpl.php
and the css file
so I can look at the variables against mine.
Cheers
The problem with requests like this isn't that I don't want to help but that my directory is so entangled in my theme that I can't really share just that without sharing my entire site. I give away a lot of my work but I really don't want to give my whole site away. I want to turn it into a module not only because it is better for my own needs to compartmentalize it but because then I can share it. I can post my node-business.tpl.php here and you'll see why it's not terribly helpful:
<?php
if (arg(0) != 'node') {
include path_to_theme() . "/node-business-teaser.tpl.php";
return;
}
?>
<?php include path_to_theme() . "/shared-nodeheader.tpl.php"?>
<div class="content">
<?php include path_to_theme() . "/shared-ratingbox.tpl.php"; ?>
<?php include path_to_theme() . "/shared-dirtoplinks.tpl.php"; ?>
<div class="slogan">
<?php print $node->field_slogan[0]['view'] ?>
</div>
<div class="descrip">
<?php print $node->field_description[0]['view'] ?>
</div>
<?php if (!empty($node->field_hours[0]['view'])) { ?>
<div class="hours">
<strong>Hours:</strong> <?php print $node->field_hours[0]['view'] ?>
</div>
<?php } ?>
<?php include path_to_theme() . "/shared-nodebottomtabs.tpl.php"; ?>
</div> <!--End Content Div -->
<?php include path_to_theme() . "/shared-nodefooter.tpl.php"; ?>
The CSS isn't separate at all so I can't post that part of it. I'm sorry this is taking so long and I know this is something a lot of people want but so are user profiles and a better forum and I simply don't have enough time to do it all.
Michelle
I have been trying hard to use contemplate but couldn't do it.
Now I have seen how you pull certain variables
Cheers
PS: so you have a node-business-teaser.tpl.php and the node-business.tpl.php as seperate things??
Heh, ok, guess it was helpful after all. I didn't realize that's all you needed. At any rate, to those waiting on the directory module, it is coming but not likely any time soon. At this point, I think it's quite likely I'm going to wait and do it on D6 after panels is ported.
Michelle