ARCHIVE: Override or add a primary links delimiter in Drupal 5

Here's how I added the ' | ' character between each link in my primary navigation menu in Drupal 5.

Following the standard template.php override procedure, I copied the theme_links function from theme.inc into my template.php file, and renamed it phptemplate_primarylinks. Then I edited the last few lines of the function from this:

      $i++;
      $output .= "</li>\n";
    }
    $output .= '</ul>';
  }
  return $output;
}

to this:

Adding modules and themes

"Do I need all these extras?"

Each module requires memory to run on your site

Before installing extra modules, you should consider the required functionality for your site, and only add a module if your site really needs it. Unnecessary modules consume memory and other resource needs of your site, and will make pages load slower. Because a module is popular or someone tells you that "every site needs it" doesn't mean that yours does. There are good sites that have been built with absolutely no contributed modules at all.

Also, you should focus on content, functionality, and configuration of your site before you consider how it should look (the theme), since that decision can be made later and may detract from your thinking about functionality and content.

Be selective

Themes are largely a matter of taste. For example, many people do not like to use a "fixed width" theme, but lots of people do. One nice thing about themes is that they are mostly independent of your content so you can switch them when you want. Caution, though, there are parts of your site (blocks, for example) that get built based on the theme, so switching themes can leave junk lying around to slow down your site.

Now, if you experiment with different themes and modules, you should also look at the Update Status page in the administration section and the Site Documentation module to make sure the modules are up-to-date and your site is clean.

Setting up cron

More complete information can be found on the main cron page. If you can understand that page, then use it first.


Cron is an extremely important resource to your Drupal website setup. Many modules, including major system modules, utilize cron's power to do their jobs properly. Practically speaking, cron will alert you to security and other updates necessary to your site, provide a list of broken links and pages on your site, and perform other scheduled tasks (like back-ups).

Tips for making a good issue report

This page details the process for creating a well-crafted issue report. For a drier description of the fields associated with an issue report, refer to Issue submission form fields.

About the issue queue itself

Drupal makes use of the Project issue tracking module combined with the Project module to keep track of issues that are found in Drupal Core software, Modules, Themes, Theme Engines, and Translations. This system tracks several pieces of information about each issue but also leaves a large empty box for you to enter your own bug report. If you want your bug to get fixed, it is extremely important that you take the time to enter the proper information into these fields.

Before you open an issue

You should also see How to troubleshoot Drupal for self-help steps to do before raising an issue. And remember always to search the issue queue first.

Existing Drupal Core issues

Existing Drupal Core issues have a different protocol. For more information, refer to Write an issue summary for an existing Drupal Core issue.

Templates

Using IMG tags with image module

A common question is how to display images. In addition to other modules such as img_assist, you can also use img tag.

With clean URLs

<img src="http://www.example.org/image/view/##/preview" />
<img src="http://www.example.org/image/view/##/thumbnail" />

Without clean URLs

<img src="http://www.example.org/?q=image/view/##/preview" />
<img src="http://www.example.org/?q=image/view/##/thumbnail" />

If you go to admin >> settings >> image and look at the sizes, you will see a default name, preview and thumbnail. You can add and label other sizes as you choose.

If you want to link to your original image, the syntax is the same with the tag of _original.
With clean URLs

<img src="http://www.example.org/image/view/##/_original" />

without
<img src="http://www.example.org/?q=image/view/##/_original" />

With clean URLs it is possible to use relative paths for the image URL. For example:

<img src="/image/view/##/_original" />

So, to break it down, sitename / image / view / image ID# / label will get you to an image suitable for use in an <img src=""> tag. If you add additional sizes to the your image module settings, you can link to them by their label names as well.

What do all those Unix commands mean?

You will notice references to Unix-like (*nix) commands in some documentation or forum posts and may feel intimidated by them. The authors of the docs, issues or forum postings do this to express clearly and concisely the steps needed to administer your system or fix the problems being discussed.

Having a better understanding of these *nix commands can help you understand what your hosting control panel or GUI FTP client does, and can help you be more productive. Hopefully this will help you become less intimidated by the command line.

Pages

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