Is there a fair number of people that would like to see this module for Drupal 6?

I recently used this as a base and made my own module, inserting a few site-specific customizations. I can easily remove the customizations and generalize my updates.

I'm going to implement it on the sites I'm working on, and I'd love to give back.

CommentFileSizeAuthor
#2 multisite_search.zip14.58 KBearthday47

Comments

mstrelan’s picture

I would love to use this module but it seems a bit underdeveloped at the moment.

earthday47’s picture

Issue tags: +drupal multisite
StatusFileSize
new14.58 KB

Indeed it is underdeveloped. As I would say, it needs some "serious love".

Attached is a ZIP of my version of Multisite Search. Give it a try and see if it meets your needs.

Important note: Disable AND uninstall the old version before enabling this one. I changed some database names, and some of the functions aren't named correctly, namespaces will collide.

How I got it to work on my installation:

  • I have a multi-site setup, with prefixed database tables (site1, site2, etc.) and a separate database for shared components.
  • I shared the multisite search tables for convenience, so I don't have to add the the site definitions multiple times. It will produce an error when installing on the second, third, etc., sites, but nothing has gone wrong.

My database configuration:

drupal_shared db:

  • multisite_search_dataset
  • multisite_search_index
  • multisite_search_sites
  • multisite_search_total

drupal_main db:

  • site1_
    • site1 drupal tables
  • site2_
    • site2 drupal tables
  • To share the multisite search tables, the settings.php file for each site should have at least this for your $db_prefix declaration:

$db_prefix = array(
  'default' => 'site1_',
  'multisite_search_dataset' => 'drupal_shared.',
  'multisite_search_index' => 'drupal_shared.',
  'multisite_search_sites' => 'drupal_shared.',
  'multisite_search_total' => 'drupal_shared.',
);

Dot notation is for a separate database, underscore is for table prefixing. I think you could use drupal_shared_ as a prefix and it should work, but I haven't tested it.

Then you should be good! Set it up and give a try.

Code changes:

  • Added curly braces {} around database tables, so they can be placed in a shared database.
  • Added the "site_name" field to the Site definition, which is displayed in the search results page via template_preprocess_search_result().
  • Changed the database table names slightly.
  • Moved the link to "Multisite Configuration" into "Site Configuration" instead of in the root of the navigation menu (ew)
  • Changed the name of the tab on the search results page from "Web site" (ew) to "All sites"
  • Apologizes for the coding violations (naming, spacing, etc).

One more thing about customizing the search results: I overwrote template_preprocess_search_result() to add the "site name" to the results. If you don't want that, override that function in your theme to change it.

There's lots more that needs to be changed, I'm looking into getting a CVS account and updating.

mstrelan’s picture

Thank you so much for posting this. The list of changes you mentioned were the exact changes I would have done, even the template_preprocess. Unfortunately for my situation a decision was made to switch to a single shared database and implement the domain access module, so I won't get around to testing out your module. Hopefully it will help somebody else out there!

earthday47’s picture

Project: Multisite Search » Drupal.org site moderators
Version: 6.x-1.x-dev »
Component: Code » Project ownership

Moving to the webmasters issues queue as per http://drupal.org/node/251466.

The maintainer has not responded in two weeks, and the project is already listed under Abandoned Projects (http://drupal.org/user/291168). A commit has not been made in 1 year. In its current state posted on d.o, it is not stable, it requires several fixes just to get it to work.

Link to Multisite Search project page: http://drupal.org/project/multisite_search

I've already uploaded an attachment with my modifications in Comment #2. It's stable, and works on my test site. I'd love to commit this to the project on d.o, and then work on fixing the coding violations and namespace errors in subsequent versions.

I'll be applying for a CVS account if/when I get approval.

Hope this gets the ball rolling.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Category: support » task

@earthday47: If you want to become the new maintainer of the project, you need to apply for a CVS account, or I cannot grant you access to the project repository.

earthday47’s picture

I have applied for a CVS account and referenced this issue.

avpaderno’s picture

Status: Active » Fixed

The ownership of the module is passed to earthday47.

Status: Fixed » Closed (fixed)
Issue tags: -drupal multisite

Automatically closed -- issue fixed for 2 weeks with no activity.

Project: Drupal.org site moderators » Drupal.org project ownership
Component: Project ownership » Ownership transfer