Directory of Community Resources

The Directory of Community Resources (DCR) is a drupal based web site that contains hundreds of disability related organizations and resources across the state of Texas.  It is run by the Center on Disability and Development.

The DCR web address is http://disabilityresources.tamu.edu/ and it is hosted on PUBLICWEB.  The site was built by Jonathan Hall and is maintained by the CDD and Technology Services.

Search Tests to do after changes

  • Search with no keyword or other search terms
  • Search with no keyword, include a zip code
  • Search with no keyword, include a zip code, include distance
  • Search with multiple keywords
  • pull the relevance scores for a particular set of search terms and a particular set of nodes.
 SELECT n.title, n.nid, 1.6*(coalesce(n.title regexp 'autism',0) + coalesce(n.title regexp 'aba',0)
 + coalesce(n.title regexp 'respite',0) ) as ts, 0.6*( MATCH(c.service_description) AGAINST ('autism aba respite')) 
 as ds, coalesce(c.keywords regexp 'autism',0), coalesce(c.keywords regexp 'aba',0), coalesce(c.keywords regexp
 'respite',0) AS disp_relevance, c.keywords FROM node AS n INNER JOIN resource AS c ON n.nid = c.nid
 AND n.vid = c.vid  WHERE n.nid in (93,9269,9273,9678);
  • Should also test edit resource and add resource to make sure didn't introduce new error.

Ongoing Issues

required fields for checkboxes

  • 9/6/2010, AS
  • looking specifically at the "Age groups served" checkbox fields
  • In the _form_validate function in includes/form.inc, the elements['#values'] array is populated with (1,1) even when no values are selected for the checkboxes.
  • When boxes are checked, the values are the text values of the checkbox (e.g., pediatric, adult, geriatric)
  • Grab the age value for a vid: select vid,nid,age from resource where vid=58; (vid=58, nid=55 is one I am using for testing)
  • These are serialized values and make it hard to determine which are the selected values. Maybe, values preceded by s:9

Adding a column to show keyword matches

Here is an example query showing conceptually how it might be done.

 SELECT n.title, n.nid, keywords, 1.6*(coalesce(n.title regexp 'autism',0) + coalesce(n.title regexp
 'aba',0) + coalesce(n.title regexp 'respite',0) ) as ts, 0.6*( MATCH(c.service_description) AGAINST
 ('autism aba respite'))   as ds, coalesce(c.keywords regexp 'respite',0), case when coalesce(c.keywords
 regexp 'respite',0) > 0 then 'respite, ' else  end, coalesce(c.keywords regexp 'aba',0), 
 coalesce(c.keywords regexp  'respite',0) AS disp_relevance, c.keywords FROM node AS n INNER JOIN
 resource AS c ON n.nid = c.nid AND n.vid = c.vid  WHERE n.nid in (93,9269,9273,9678);