Change apache solr search keyword operator OR/AND

By default, the apachesolr Drupal module is set to do an AND search when there are 2 keywords, and then applies some fuzziness with DisMax for 3 or more keywords. This is set via the mm parameter in solrconfig.xml which default to 2<-35%.

You can inhibit this behavior by setting the mm parameter in the query before it is sent to solr:

Drupal 7 - Making a Guestbook, a Gallery, a Status Wall, Chat Room ...

If you are already using the following modules, you can easily make a guestbook or an alternative without additional modules.

You need: if you need photos

1. Create a content type guestbook
2. Make this content type a content profile node
3. Make a mini Panel with user context showing only comments and comment form for this content type
5. Place the mini panel in the user panel and make the setting as Tab -
4. Make a Redirect Panel which redirects to the users profile when someone
wants to view a node of that type to the coresponding tab e.g.
5. activate if you want to attach photos to a comment

The principle is that guestbook entries or facebook statuses are comments.

What do you think?

I am sure there are other ways as well. The good thing with the above approach is that you can do very complex visibility rules within panels using UR relationship, OG, Context ...

Usernode (Drupal 5) to Content Profile (Drupal 6) - Upgrade

The process for migrating from Usernode to Content Profile, is remarkable simple. This approach instructs content_profile to use usernode as its content type.

Before you run update.php

We need to make sure that the usernode content type will still be available in Drupal 6, so run this SQL command to switch usernodes to being a user-defined content type:

Bakery Installation instructions

These steps should be compatible with 1.x and 2.x branches of the Bakery module for Drupal 6 and Drupal 7.

Bakery provides single sign-on (SSO) functionality for two or more sites. Deploy this module on the authoritative "master" Drupal server and the secondary "slave" or subsite server. The master and slave must be on the same domain*.

Enable Bakery on master site

Enable and configure Bakery on the master server first. It is recommended that you use the UID 1 Drupal account for this configuration.

1. Enable Bakery on the modules page
2. Visit the Bakery configuration page to setup Bakery

You must designate a site as the "Bakery account master".

3. Check the box for "Is this the master site?"
4. Enter the full URL of this site including ending forward slash

For SSO to work between sites, Bakery must know of the other sites, the "slave" or subsites.

5. Enter the full URLs of each slave site, separated by newlines, with ending slashes.

Two other required fields for Bakery to work are the private key and the cookie domain.

6. Enter a long and secure private key

Install Drupal 7 in one-minute (or Drupal 6) Using Webhost Control Panel Script

2011.04.06 - Working Draft. 04:11-gmt

You can fully install Drupal 7 (D7) or Drupal 6 (D6) in less than one-minute once you know how. All you really need to know about computers is how to use a keyboard and mouse.

I have set up many Drupal 7 baby installations on my webhost account already, but I was curious how long it actually takes. So I did it again and I used a stop-watch.

The time lapse from my being logged into my webhost's control panel page until I was looking at my new site's home page was forty-one seconds.

If you follow these instructions, you can easily install your new Drupal 7 or Drupal 6 website even if this is your first day of using a computer.

And then do it again for fun and time yourself. At a semi-leisurely pace you can do it in one-minute: I bet.

What are your two passwords? Never-mind that question for now, though, if this is your first time reading this page.

Oh— In case you did not know: Drupal is free— as it always has been.

HowTo Get your new Drupal 7 (or D6) WebSite

  1. Get a Free GMail (by Google) eMail account; or any eMail account you might already have will do fine.
  2. Get a webhosting account that features automated scripts; I highly recommend "SimpleScripts" (a free and common WebHost feature).
  3. Log into your webhost account.

Drupal 6 - Adding Images using CCK, Filefield, ImageField, ImageCache, LightBox2, and Insert

Drupal 6 – “Best Practice” for adding images to content.

"Best Practice" in this instance is open to interpretation - this is my first effort at writing for Drupal. Best Practice for Placing Images depends on your individual site, but I think most people seem to like using CCK with Filefield and ImageField (and perhaps Insert module with Lightbox2). You'll also probably need to use ImageCache with this.

Install CCK (checking Content, Content Permissions, and File Field) and then install ImageField and ImageCache (Image Cache UI, Image Api and GD2) and lastly Insert and Lightbox2.

Now go to Image Cache and set up some imagecache presets - such as scale images to 150px wide, 200px wide, 250px wide, scale and crop images to “150px x 100px”, etc.

Adding Thumbnails linked to node
Go to Content and click on "Edit" beside the content type you wish to add images to, and add a new field (using "File" for type of field and "Image" for Widget type). I usually call the field that I am going to use as a thumbnail "add_image" and place it above the body field ((some css later on will tell the imagecache present that will populate this to float left); if I wish to have an image that will float right, I add a second field called "add_image_right" (and add some css to the theme to tell it to float right). Click save.


Subscribe with RSS Subscribe to RSS - Needs copy/style review