would drupal be the best cms for a craigslist type of website?

Comments

bwv’s picture

I am building what I hope will become a craigslist clone (drupal 6.9); not quite done, but I think you will get the idea.

http://community.bwv810.com

I think drupal would be best suited for such a site. Others may have different opinions.

funnyman230’s picture

hello BWV I am french and a new in the drupal communauty. I need exactly what you have donne with your craigslist clone site !!!
Can you detail more what kind of modules did you use and how did you built your views and taxonomy. My probleme is the search engine key word in relation with the terms. I explain (sorry for my english). I want the same type of search as craigslist (a keyword field depanding on what term filter we are in) example. I have 3 vocabulary (for sale, housing, services) then few terms in each vocabulary, my problem is that I don't know how to dispaly a views of all the ads and put at the top of the page the same search system as craigslist. I also built one content type (ads) with the the following field: title, description, image (upload by the user), price, location, contact, post date, author.

Please I really need somme help or tips to started with the best practice.

funnyman230

bwv’s picture

Hello... The modules I am using are Views2 and CCK, as well as tabs, pathauto, path redirect and a few others. My taxonomy: each vocabulary (for sale, housing, jobs, etc.) has terms (which you can see on the front page, under the heading) attached to it.

To put the ads on the front page, I use this php snippet (I put the code into a block, then set the filter to php) which will generate a listing of all the associated terms and the number of posts attached to that term.

<?php
$vid = 11; /* <---- put correct vocabulary ID here */
$terms = taxonomy_get_tree($vid);
print "<div class=\"item-list\">";
print "<ul>";
foreach ( $terms as $term ) {
$tcount = taxonomy_term_count_nodes($term->tid);
print "<li>".
l($term->name." (".$tcount.")",'taxonomy/term/'.$term->tid, array('title' => $tcount." posts in ".$term->name)).
"</li>";
} /* end foreach */
print "</ul>";
print "</div>";
?>

And here is the code for the View that creates the form at the top of the page (just import this in Views2):

$view = new view;
$view->name = 'search';
$view->description = 'Search form';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'label' => 'Click to view',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'changed' => array(
    'label' => 'Posted',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'html' => 0,
    ),
    'date_format' => 'raw time ago',
    'custom_date_format' => '',
    'exclude' => 0,
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'vid' => array(
    'operator' => 'in',
    'value' => array(
      '13' => '13',
      '1' => '1',
      '11' => '11',
      '3' => '3',
      '5' => '5',
      '8' => '8',
      '4' => '4',
      '12' => '12',
      '7' => '7',
      '2' => '2',
      '6' => '6',
      '14' => '14',
      '10' => '10',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'vid_op',
      'identifier' => 'vid',
      'label' => 'Category',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 0,
    ),
    'id' => 'vid',
    'table' => 'term_data',
    'field' => 'vid',
    'relationship' => 'none',
  ),
  'body' => array(
    'operator' => 'not',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'body_op',
      'identifier' => 'body',
      'label' => 'Some text (case sensitive)',
      'optional' => 0,
      'remember' => 0,
    ),
    'case' => 1,
    'id' => 'body',
    'table' => 'node_revisions',
    'field' => 'body',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'forum' => 'forum',
      'communityad_intl' => 'communityad_intl',
      'community_ad' => 'community_ad',
      'job_ad' => 'job_ad',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('empty', '<br>
<hr>
<br>
<h3>Sorry, your search generated no hits.  Please try again.</h3>');
$handler->override_option('empty_format', '2');
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'changed' => 'changed',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'changed' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler->override_option('exposed_block', TRUE);
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'search');
$handler->override_option('menu', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));

Let me know if you have any other questions. david

funnyman230’s picture

Hi David you make my day save. Thank you for share.

shiba-2’s picture

I want to integrate Classified Advertiser features in my existing site so that Advertisers to be able to upload images in pre-determined, pre-set customary sizes. Advertisers to be to choose length of contract, three, six or twelve month, with discount for 12 month contracts, and pay via PayPal. Administrator can be view all the payment details of Advertisers.I am using Drupal 6.9 version.Can you tell me which Drupal module can i use to get all this features?

willk’s picture

Thanks for such a nice write up. Where do the PHP snippets go? Are you using contemplate?

bwv’s picture

The first snippet goes into a block, set to php code.

The second snippet is a view that you can import into Views 2; it will give you the search form that you can find at the top of the website I referenced.

eddie719’s picture

hey i dont know where to past this in does it go to index.php ,

can u please explain how u did this

Thank you
eddie

Anonymoushero’s picture

Drupal can handle just about anything you throw at it out of the box. I'm sure many of you know about this, but for those who don't Lullabot and a few other companies have a series of training sessions called Do it with Drupal that shows how to create certain types of sites using the Drupal CMS. http://www.doitwithdrupal.com/

If you need major customizations, you can always hire a Drupal developer to help you :)

AH
Michigan web developer

willk’s picture

bwv, I was looking at your sites and they are impressive. I have a site still on local host and I have set up a views filter (exposed) to filter nodes by country-> state->city
For some reason when I created the dummy content I got duplicates (The node duplicated itself x4) and when views filter is not very effective. For example if I filter for content USA->California->Sacramento I get nodes entered under USA->Kansas->Wichita. I have views filtering by node: type node: published Taxonomy: Term (exposed) The taxonomy term is exposed and I am also using the Hierarchical select module http://drupal.org/project/hierarchical_select. Could this module be causing the issues? Is the search facility on http://jazz.vinylclassics.biz/ a views filter block? Do you know how to add a text field where users can enter text to query? I am using Drupal 6.19
Thanks

bradann’s picture

Hello,
Drupal is the best CMS for the job. Just to give you some idea about a craigslist clone look at this website that was done http://ziark.com it was done with CCK, Views2 and Drupal 6.8. any questions?

Brad
http://ziark.com

bwv’s picture

Very nice!

einsteinsboi’s picture

You should do a write up on how you did that, it would make for interesting reading :)

mrgoltra’s picture

Hello,

Nice site. I was wondering how did you create this type of view(date listing)?

Tuesday June 30
Node Title

Tuesday December 30
Node Title

http://losangeles.ziark.com/apa/

Any chance you can share?

Thank you,

Mark

destinee13’s picture

in views go to edit, in the Fields tab click the plus sign then node post date. Remove the label, check exclude from display, date format make this custom, type in the custom date format box ( l F d ) click update.then on the right hand side of the page you will see (Sort Criteria) click the plus sign. add node post date, click descending, on granularity click seconds, click update and your done.

please post question or comment at http://drupal.org/node/511770

Thanks Brad

mrgoltra’s picture

Hi Brad,

now quite working. I will try to figure it out.

Thanks,

Mark

bradann’s picture

Ya
I think the whole World would like to know! I've read alot of post where people are being paid to make a craigslist clone, but the final product looks like a clone of a bad clone. Maybe one of these days i may give it away or sell
it, but it was very easy to do CCK, VIEWS2 AND DRUPAL 6.8.

Brad
http://ziark.com

funnyman230’s picture

As regarding myself I don't want a craigslist clone, I mean the look and field can be diferrent I don't care, my probleme is the views module and the search keyword engine. As I said before, I have 3 vocabulary and one content type (ads). I want focus my job on how I can display my results and have on the top of each a search engine and a filter by terms.

I can't find good information about that. Futhermore, my english is bad so to catch all the details of the views 2 configuration (argument and relationship sound hard to understand) anyway I have to wake up early...

if I am not clear sorry about that, I would try.

funnyman230

bwv’s picture

Did you create the subdomains manually, or did you use a module (http://drupal.org/project/subdomain) to virtualize/automate the process?

willk’s picture

I found this module that is supposed to help with a classifieds site (http://drupal.org/project/taxonomyblocks ) They even shave a demo of a site using the module. Please scroll to the very bottom of the page. http://www.pixelclever.com/advanced-taxonomy-blocks-module-drupal-6-rele...
By the way. Thanks BWV.

knowledg3’s picture

let me know if you need anything. Thanks for the resources. here is what i pumped out.
http://classifieds.trpgold.com

thanks
Ramon

general need’s picture

^ Nice job. How on Earth did you get the category lists grouped like that?

k1’s picture

I followed the posts above but I am lost. Can you take if from begining how you did it? Very nice work

kn100’s picture

What procedure did you use for setting up the tables so well? It's very good.

Torpedo’s picture

Anyone knows any plugin to archive that? I have interest on a similar website. Also, i would like to make a classified on my another site (http://www.oi-torpedo) using drupal. Are there any tutorial on this? Thanks