Sunday, November 19, 2017 02:42 pm EST

Drupal 6

Bri's picture

Ubuntu Crontab for Drupal 6 Sites

On rackspace cloud servers running Ubuntu, I have been using the following:

0 */3 * * * wget [URL to cron.php file]

to run cron at the 0th minute every 3 hours every day. To get in to the cron tab, SSH in to the server and run

crontab -e 
Bri's picture

Theme Files to Open in a new window based on Mime Types

There is a thread on drupal.org that describes how to theme drupal 6 filefields and Drupal 7 files to have them open in a new window based on the mime type. I am posting this here so that I can find it easier the next time I need to do so. I didn't write this code. I haven't tried the Drupal 6 code, but the thread appeared to have several people confirm that it worked. I myself can confirm that the code for drupal 7 works.

Add one of the following to your template.php file in your theme.

For Drupal 6 file fields

  
Bri's picture

How to Patch a Drupal Module on Windows

If you use Drupal on a regular basis, chances are that you will want to apply a patch to a module at some point in time. Perhaps somebody has posted a patch in the issue queue that sounds like it will address a problem you are having. Patching files on windows is simple. Just follow these steps.

1. You will need to download the patch software. You can download the Patch program at http://gnuwin32.sourceforge.net/packages/patch.htm

2. Run the setup file and install the program using all of the default settings.

Bri's picture

Using a Custom Image Button with Drupal 6 Search Form or Block

So you decided that you want to use an image instead of styling the inputs for the Drupal search block or form. Luckily, this isn't a difficult task at all. Using the hook_form_alter you can accomplish this. You will need to create a small module in order to make this happen. I called mine "modified_search". Here is what the .info file looks like:


; $Id:
name = Modified Search
description = Inject the search how i want it to look.
package = Other
version = VERSION
core = 6.x

And now for the contents of the .module file:

Bri's picture

Create Custom Drupal 6 Search Box and Theme It

If you are looking for a way to customize the search box in Drupal 6, here are some suggestions that may prove helpful. This info pertains to the search that is built into some themes rather than the search block.

The core search module specifies that the template to be used for the search_theme_form should be search-theme-form.tpl.php. If you theme doesn't already have this file included, you can copy it from the core search module folder.

Syndicate content