SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Addict
    Join Date
    Jul 2006
    Location
    Fionnphort, Isle of Mull, Scotland
    Posts
    352
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Converting a web site with searchable database to WordPress

    Some years ago I built a web site with a searchable database for a client. The database contains information about subscribers' products, and visitors can enter search criteria and view matching products. Nothing unusual about that, of course.

    Now my client would like me to convert the site to WordPress. The client seems to be hoping that WP will handle the searching as well as display of the information. I think it will still need dedicated PHP scripting for the search, even if display is via WP templates. Not classing myself as a WP expert (though I've used it), I want to be sure of my facts before reverting to my client.

    Can anyone offer advice, please ?
    Tim Dawson
    Isle of Mull, Scotland

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,032
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I'd want to know a little more about the search criteria and process but it sounds to me like a job for Drupal and more specifically a job for Drupal's "Views" module. Views is a bit of a "swiss-army-knife" module that can be used to accomplish numerous features, one being a way to build custom search interfaces. If you can import the database records as content with various attributes, you can use Views to search those attributes and create a data set of results ordered any way you like.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  3. #3
    SitePoint Addict
    Join Date
    Jul 2006
    Location
    Fionnphort, Isle of Mull, Scotland
    Posts
    352
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply, Andrew,

    Unfortunately (perhaps) Drupal isn't under discussion.

    The site was built using custom templates, CSS, PHP and of course MySQL. It works perfectly well, though it's six years old and has suffered from a number of ad hoc additions. It needs a redesign. The client is familiar with WordPress and inclined to see it as a panacea.

    I have told him that (in my view) even if if there was a new WordPress theme and the static pages were delivered by WP there would still be need for custom code for the search and display functions, which is a major part of the site. I want to be absolutely sure on this point before pressing on. From what you say about Drupal it would seem that even there custom code would be required.

    The current site can be seen at Holiday Mull
    Tim Dawson
    Isle of Mull, Scotland

  4. #4
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,393
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I'd suggest that Wordpress probably isn't the right tool for the job here.

    As awasson says you'd be better off with a content system that's set up to handle multiple attributes - think things like product code, colour, size, weight, documentation, downloadable files, description, multiple categorisation, relationships with other products...and so on.

    Drupal is a possible candidate but consider other systems such as ExpressionEngine or Craft that are easily capable of managing that sort of data...

  5. #5
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,032
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ramasaig View Post
    Thanks for your reply, Andrew,

    Unfortunately (perhaps) Drupal isn't under discussion.

    . . .

    I have told him that (in my view) even if if there was a new WordPress theme and the static pages were delivered by WP there would still be need for custom code for the search and display functions, which is a major part of the site. I want to be absolutely sure on this point before pressing on. From what you say about Drupal it would seem that even there custom code would be required.
    Hey Tim,

    Actually, if it were built using Drupal + Views, I think you would mitigate the need for custom code; perhaps entirely but I'll have a look at the existing site to see for sure.

    The nice thing about Drupal is that it's a step up from a CMS and can be used as a foundation to build pretty much anything you can imagine. I came from the custom build background and it took a while for me to figure out how to do things in Drupal but I've got a pretty good handle on it now. There is a lot that can be done without writing a lick of code which is good for maintainability but if you need to, there is a pretty decent API to make Drupal do the heavy lifting. I'll have a look at the existing and see if I can see anything that would act as a roadblock.

    Andrew
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  6. #6
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,032
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Ok, just had a look at the search feature. Definitely a candidate for Views and I don't really see any need for custom coding at the moment.

    Each location would be a piece of content (called an accommodation or something intuitive). I'd have fields to cover all the important bits and I'd add location fields so that you could geocode each "accommodation" in case you want to show them on a GMap or something as well. For the criteria in the search, I'd create taxonomy lists for each section (type, location, facilities) and finally, I'd build a "view" using the Views module that would allow searching and displaying the results. Even the listings from the menu (hostels, campsites, self-catering, etc...) would just be links to a view that would take the appropriate attributes and deliver the appropriate results.

    * Views is that general purpose module I mentioned earlier that allows you to create displays of content based on either fixed criteria like, content type: posting date, taxonomy terms, filtering if various fields (titles, body, etc....) or user selected criteria from text fields or drop-downs, radio buttons or checkboxes.

    I think I'd use the feeds module to import the content into the site by exporting it to a CSV file, massaging it a little and then importing it. That can be a little tricky to get right but it's generally more efficient that entering manually.

    As far as ease of use for the owner goes, I've built a reputation for building Drupal sites that are easier to manage than Wordpress. It's not difficult to do. You just need to configure the site with the right WYSIWYG tools, create editing roles with reduced access to admin areas they don't need and offer some training.

    That looks like a cool project.

    Andrew
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  7. #7
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,182
    Mentioned
    16 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by awasson
    I think I'd use the feeds module to import the content into the site by exporting it to a CSV file, massaging it a little and then importing it. That can be a little tricky to get right but it's generally more efficient that entering manually.
    I would recommend using the migrate module for migrating the content. The migrate module is increasingly more powerful than feeds though it is only an API. In theory though you can use that API to write a direct database to database migration instead of relying on feeds and all the problems you might run into with that method of content migration. Custom code is probably going to be required either way to get everything perfect as the client wants it. If you go that route digging into the d2d module that was created to achieve drupal to drupal migrations is a good place to start in writing migration for your custom cms data to drupal.
    The only code I hate more than my own is everyone else's.

  8. #8
    SitePoint Addict
    Join Date
    Jul 2006
    Location
    Fionnphort, Isle of Mull, Scotland
    Posts
    352
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you to everyone who's responded. You've possibly answered my question, but only indirectly !

    I asked if the project could be undertaken in WordPress without custom coding for the searches. The consensus seems to be that it could be done in Drupal without custom coding. The unstated implication is that coding would be needed in WordPress.
    Tim Dawson
    Isle of Mull, Scotland


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •